Hi,

I'm attempting to perform some testing using some of the distributed
features of Tuscany. I have done the following:

1) In one Java main class, started a new domain.
2) In another Java main, started a node that registered a service. I was
able to verify the service was working correctly by doing something
like:

compositeService =
node.getDomain().getService(ScopeConversationalService.class,
"TestConversationalService");
compositeService.initialize2();

This worked properly.

3) Leaving both the domain and nodes running, I then attempt to use the
SCADomainFinder class in another Java main to get a handle to the domain
so that I can retrieve the service:

SCADomainFinder domainFinder = SCADomainFinder.newInstance();
SCADomain domainProxy =
domainFinder.getSCADomain("http://localhost:8877";);
compositeService =
domainProxy.getService(ScopeConversationalService.class,
"TestConversationalService");

However, it always fails with a null pointer exception on the
domainProxy.getService call:

java.lang.NullPointerException
        at
org.apache.tuscany.sca.node.impl.SCADomainImpl.getServiceReference(SCADo
mainImpl.java:417)
        at
org.apache.tuscany.sca.node.impl.SCADomainImpl.getService(SCADomainImpl.
java:348)

The same error occurs even if I put a bogus port in the for the domain
URL (8877 is correct).

What my objective in this testing is to determine how I can get a remote
handle to the service so that I can invoke it that way in a distributed
fashion. I suppose I can always instantiate a new domain locally that
has a reference, via one of the bindings to the remote host where the
services primarily will reside, but this doesn't seem like the best way
of going about things (maybe it is, I'm pretty new to Tuscany, so I'm
just trying to get a handle on best practices).

jeff 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to