On 8/12/07, Florian Rosenberg <[EMAIL PROTECTED]> wrote: > > > hi SCA folks, > > I'm pretty new to SCA and I want to develop a new component type > implementation, similar to BPEL (sorry for any terminology mismatch). The > stuff I'm currently having here is basically a composition engine for > RESTful services which I currently running on Tomcat (as a servlet with > some backend stuff). Now I want to bring the whole stuff into SCA to > allow > component types to be implemented as RESTful compositions. > > The problem I'm having now is the following: we envision that the user > creates a Tuscany based web-app deployed on a servlet container and we > dynamically register our composition engine servlet during startup of the > container. Nevertheless, I could not figure out how to do that. I have it > running in the embedded mode, where I start a tomcat server by myself in > the provider implementation but that is not what is desired (for example, > if the user deploys this Tuscany app in a Tomcat then, it crashed since > the > port is already used). What I would need is a way to get access to the > servlet host (which runs the Tuscany app) and register my servlet there, > but all I tried started a new servlet host internally (which can't work if > the Tomcat hosting the SCA app is already using port 8080 and using > another > one is not really desired). > > Any help and ideas are appreciated. > -Florian
If I understand correctly what you're asking for then you can see examples of this in some of the existing Tuscany extensions. See [1], [2] and [3]. These get hold of the Tuscany ServletHost from the extension activator and then use that to add their own servlets. Is this what you want? ...ant [1] https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxBindingActivator.java [2] https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBindingActivator.java [3] https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/axis2/Axis2BindingProviderFactory.java
