Hi,

Based on the various usage scenarios, I think we need to resolve the issue from 
the following perspectives:

1) The mode: Managed vs. Unmanaged application

    - For managed application, there is a container/launcher which is 
responsible for bootstrapping the Tuscany runtime and making the runtime 
available to the application code. This is typically done by a hosting platform 
specific hook.

      * Webapp with a ContextListener or Servlet Filter 
      * Geronimo/Tuscany plugin
      * OSGi extender with BundleListener or FrameworkListener
      * A JSE Launcher

    - For unmanaged application, the application itself is responsible for 
loading the Tuscany runtime. For example, the JSE main() , the JUNIT testcase 
or OSGi activator that call the Tuscany Node API.

2) The configuration: Where are the Tuscany runtime jars located? What 
contributions are required? What deployable composites should be activated?   
    - From the application classpath (for example, packaging all the Tuscany 
jars in the WAR)
    - From the container classpath (for example, the Geronimo/Tuscany plugin or 
deep Tomcat integration)
   - From some configuration, for example, set the TUSCANY_HOME system property 
or parameter in web.xml. 

3) The client model: How do we make the SCA Node and/or services available to 
the application code if it's started by the container hook? We need to find a 
way to access the SCA services in the application. This is the entry point to 
the SCA domain from outside world.
    * Lookup the SCA Node from JNDI, ServletContext or other registry, and then 
call Node.getService(...)
    * Dependency Injection, for example, add @Reference to Java components, EJB 
or JSP/Servlet
    * Via external protocols, for example, a non-SCA client calling into a Web 
Service or JSONRPC service exposed by SCA components which in turn connects to 
other SCA components using Dependency Injection or ComponentContext lookup.

Thanks,
Raymond 


From: Simon Laws 
Sent: Monday, January 19, 2009 7:41 AM
To: dev@tuscany.apache.org ; antel...@apache.org 
Subject: Re: [2.x] [DISCUSS] Tuscany runtime launching


[[snip]]

 

  I think it boils down to three main options;

  1 - a launcher to support running tuscany in the "command line" style 
environments we have supported

        real command line (starting nodes and domain)
        test code (run from ant, maven or eclipse)

  2 - web app support, TuscanyServletFilter/ContextListener

  3 - Eclipse plugin for "right click" support

  The user is also able to use the SPI directly but then they have to manually 
specify the classpath, although we may give them some help with some aggregate 
(manifest?) jars. 

  Simon
       

Reply via email to