On Sat, Jul 9, 2011 at 9:53 PM, Amindri Udugala
<amindriudug...@gmail.com> wrote:
> Hi,
>
>
> After going through the Tuscany code carefully I decided that the best way
> to access runtime artifacts like Endpoints, Components, Composites and
> Services was to access the DomainRegistryFactoryExtension
> Point. Bellow is code snippet where I access these objects.
>
> for (DomainRegistryFactory factory : factories.getDomainRegistryFactories())
> {
>             Collection<DomainRegistry> domainRegistries =
> factory.getEndpointRegistries();
>
>             for (DomainRegistry domainRegistry : domainRegistries) {
>
> compositeManagement.register(domainRegistry.getDomainComposite());
>                 List<Component> componentList =
> domainRegistry.getDomainComposite().getComponents();
>
>                 for (Component component : componentList) {
>                     componentManagement.register(component);
>
>                     List<ComponentService> componentServiceList =
> component.getServices();
>                     for (ComponentService componentService :
> componentServiceList) {
>
> componentServiceManagement.register(componentService);
>                     }
>                 }
>
>                 Collection<Endpoint> endpointCollection =
> domainRegistry.getEndpoints();
>                 for (Endpoint ep : endpointCollection) {
>                     endpointManagement.registerEndpoints(ep);
>                 }
>             }
>         }
>
>
> The problem is that when I run the code there it doesn't receive any data.
> (I have attached an image of the Jconsole -nodata.png) . But the
> PolicyProviderfactories in ProviderfactoryExtensionPoint are shown (have
> attached an image of that too).
>
> What I did to bootstrap tuscany was, executing LaunchCalculatorContribution
> with a Thread.sleep(10000) right after invoking node.getService(.....). I
> found it a bit tedious to run the tuscany shell. Is it because the way I
> have bootstrp tuscany that I don't get nay data to rest of the beans? Is
> there a better way of accessing runtime artifacts?
>
> Also I have a problem with the jmx-activator module. This module should be
> invoked when Tuscany is boot strapped as it implements the ModuleActivator
> interface, also I have taken other necessary actions as mentioned in the
> development guide. But it is not invoked, so just for testing purpose i
> created an object of JmxModuleActivator in the LaunchCalculatorContribution
> and called the start method in it.
>
> Hope you can give me some advice on these issues. Also I will attach the
> revised patch to JIRA.
>

Without knowing all the details, this seems like missing dependency
issues. The Tuscany runtime use the service discover pattern to
register extensions and to activate the module activators. Maybe this
can give you a clue for further investigating the problem.


-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Reply via email to