You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Jeremy Boynes <jb...@apache.org> on 2006/02/27 20:07:23 UTC
Passing the TuscanyRuntime to This sounds like a problem many a webapp
Rick and I were chatting about how the axis2 servlet could obtain a
reference to the TuscanyRuntime. As a transport provider, it needs to be
able to look up an entryPoint for the current model rather than another
component or external service so it can't use the CurrentModuleContext API.
This sounds like a problem any transport provider may have, which
implies we need a well defined way to pass a reference to the runtime
into a web application.
I'd like to propose we bind the RuntimeContext into the application's
ServletContext under the well defined name
"org.apache.tuscany.core.runtime.RuntimeContext" (specifically the class
name of RuntimeContext itself).
It would be the responsibilty of the bootstrapper to make sure this is
done. In a portable J2EE environment, the bootstrap can be done in a
ServletContextListener and that listener can do the bind; in a
container-integrated environment, the integration code would be
responsible (e.g. in Tomcat it can be done in response to a Context
start event).
--
Jeremy