Re: Registering ModuleActivators without specifying a META-INF/services/org.apache.tuscany.sca.core.ModuleActivator file
Hi, I'm using a pre-1.2 code base. I'll grab the 1.2 base and give it a try. This refactoring sounds like it's exactly what I'm looking for. Thanks Jean-Sebastion. Richard On Wed, Apr 23, 2008 at 4:20 AM, Jean-Sebastien Delfino < [EMAIL PROTECTED]> wrote: > Richard Mah wrote: > > > Hi, > > > > Yes. I'm interested in only a subset of Tuscany and not the entire > > runtime. Thanks for the answer. > > > > The ModuleActivators I'm trying to use are > > WSDLInterfaceRuntimeModuleActivator, > > JavaInterfaceRuntimeModuleActivator, and JavaRuntimeModuleActivator. > > This leads to another question. For the JavaRuntimeModuleActivator, it > > seems to require bootstraping code which adds a > > ContextFactoryExtensionPoint/DefaultContextFactoryExtensionPoint to the > > registry. However ContextFactoryExtensionPoint and > > DefaultContextFactoryExtensionPoint are non SPI. What do I need in my > > bootstraping code in order for me to use JavaRuntimeModuleActivator > > without > > SPI violations? > > > > Thanks. > > > > Richard Mah > > > > > I can't find WSDLInterfaceRuntimeModuleActivator in the 1.2 code base. > What level of Tuscany are you using? > > JavaRuntimeModuleActivator belongs to the runtime layer (in module > implementation-java-runtime) so that's probably not what you want if you > want to use the Tuscany models without bringing the whole runtime. > > In SVN revision r650720 of trunk I've moved some of the Java model > initialization out of JavaRuntimeModuleActivator into a new > JavaImplementationModuleActivator in module implementation-java. > > This will allow you to get an initialized model environment (and in > particular a JavaImplementationFactory configured with all the right Java 5 > annotation processors that introspect Java component implementation classes > and populate the Java models) without having to drag module > implementation-java-runtime and its runtime dependencies. > > So the short answer to your question is: You shouldn't need > JavaRuntimeModuleActivator anymore :) > > I've also committted new sample programs [1] that show how to bootstrap a > subset of Tuscany to work with the various models without runtime > dependencies. > > [1] > http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/samples/domain-management/ > > Hope this helps. > -- > Jean-Sebastien >
Re: Registering ModuleActivators without specifying a META-INF/services/org.apache.tuscany.sca.core.ModuleActivator file
Richard Mah wrote: Hi, Yes. I'm interested in only a subset of Tuscany and not the entire runtime. Thanks for the answer. The ModuleActivators I'm trying to use are WSDLInterfaceRuntimeModuleActivator, JavaInterfaceRuntimeModuleActivator, and JavaRuntimeModuleActivator. This leads to another question. For the JavaRuntimeModuleActivator, it seems to require bootstraping code which adds a ContextFactoryExtensionPoint/DefaultContextFactoryExtensionPoint to the registry. However ContextFactoryExtensionPoint and DefaultContextFactoryExtensionPoint are non SPI. What do I need in my bootstraping code in order for me to use JavaRuntimeModuleActivator without SPI violations? Thanks. Richard Mah I can't find WSDLInterfaceRuntimeModuleActivator in the 1.2 code base. What level of Tuscany are you using? JavaRuntimeModuleActivator belongs to the runtime layer (in module implementation-java-runtime) so that's probably not what you want if you want to use the Tuscany models without bringing the whole runtime. In SVN revision r650720 of trunk I've moved some of the Java model initialization out of JavaRuntimeModuleActivator into a new JavaImplementationModuleActivator in module implementation-java. This will allow you to get an initialized model environment (and in particular a JavaImplementationFactory configured with all the right Java 5 annotation processors that introspect Java component implementation classes and populate the Java models) without having to drag module implementation-java-runtime and its runtime dependencies. So the short answer to your question is: You shouldn't need JavaRuntimeModuleActivator anymore :) I've also committted new sample programs [1] that show how to bootstrap a subset of Tuscany to work with the various models without runtime dependencies. [1] http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/samples/domain-management/ Hope this helps. -- Jean-Sebastien
Re: Registering ModuleActivators without specifying a META-INF/services/org.apache.tuscany.sca.core.ModuleActivator file
Hi, Yes. I'm interested in only a subset of Tuscany and not the entire runtime. Thanks for the answer. The ModuleActivators I'm trying to use are WSDLInterfaceRuntimeModuleActivator, JavaInterfaceRuntimeModuleActivator, and JavaRuntimeModuleActivator. This leads to another question. For the JavaRuntimeModuleActivator, it seems to require bootstraping code which adds a ContextFactoryExtensionPoint/DefaultContextFactoryExtensionPoint to the registry. However ContextFactoryExtensionPoint and DefaultContextFactoryExtensionPoint are non SPI. What do I need in my bootstraping code in order for me to use JavaRuntimeModuleActivator without SPI violations? Thanks. Richard Mah
Re: Registering ModuleActivators without specifying a META-INF/services/org.apache.tuscany.sca.core.ModuleActivator file
Richard Mah wrote: Can someone point me to some examples or info on how I can register ModuleActivators without specifying a META-INF/services/org.apache.tuscany.sca.core.ModuleActivator file. ... I'm assuming that you only want to run a subset of Tuscany, not the whole Tuscany runtime. The simplest then is to do this: ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry(); ModuleActivator activator = new YourModuleActivator(); activator.start(extensionPoints); Basically new up your ModuleActivator and call its start method. Which ModuleActivators are you interested in initializing that way? -- Jean-Sebastien - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]