[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ecf-dev] trouble creating proxy, when my service interface is in a distinct bundle
|
Scott,
Some background:
In integrating ECF into my Equinox OSGi/Eclipse RAP application, I
decided to create a couple extension types like the one you described.
This extension tells an application to listen to register
cftcp://127.0.0.1:3787/server1 as a container.
<extension
point="org.inqle.ecf.servers">
<ecfServer
uri="ecftcp://127.0.0.1:3787/server1"
port="3787"
protocol="ecf.generic.client"/>
</extension>
This extension registers that the app is to produce a service using
the generic container type, for the IHello service:
<extension
point="org.inqle.ecf.services">
<ecfService
serviceInterfaceName="org.inqle.qa.common.services.IHello"
serviceClassName="org.inqle.qa.common.services.Hello"
clientProtocol="ecf.generic.client"
serverProtocol="ecf.generic.server"
produce="true"
consume="false"/>
</extension>
So bundles in my app can easily contribute a specification for which
ECF servers to listen for, using which protocols, and which ECF
services they produce or consume. To consume a service, any bundle in
my app can do this
Servicer servicer = Servicer.getInstance();
IHello hello1 = servicer.getServiceObject(IHello.class,
"ecftcp://localhost:3787/server1");
log.info("hello1.hello() to hello1 service object returns: " + hello1);
So my setup is a little complex, and that certainly confounds things.
End background.
To answer your questions:
> a) What version of Eclipse/Equinox is being used?
Galileo
> b) What version of ECF/remote services is being used (i.e. the 'new
> stuff'...in your workspace...or some previous version of ECF...i.e. which
> one?)
I am using what you provided me earlier, 3.1
> c) What ECF provider are you using (I assume you are using the ECF generic
> client/server provider, but want to verify).
yes, generic client/server
> d) Can you describe the case where things *don't* work (i.e. you get the
> class not found exception)...in terms of the bundles and classes? e.g.
> 'bundle A' has the service interface class (and what/if any other classes),
> 'bundle B' has the service implementation class(es), 'bundle C' has the
> client application code (and perhaps makes the ECF client container),
> 'bundle D' has the server...or whatever the bundle/package/class arrangement
> looks like for your situation.
I have found lots of cases where things don't work :)
My source is here
http://code.google.com/p/inqle/source/browse/#svn/trunk
So when things were not working:
Bundle org.inqle.qa.common had service interface class IHello, and the
implementation class Hello. [I have since turned off exporting of its
package and placed the interface in the fragment, bundle
org.inqle.qa.services]
Bundle org.inqle.ecf.client has the client and declares the
"ecfServer" extension point.
Bundle org.inqle.ecf.server has the server
Bundle org.inqle.ecf.common has the "ecfService" plugin type.
When I had the above setup, I experienced the error I reported earlier.
When I moved the IHello and Hello classes into bundle
org.inqle.ecf.client (or into a fragment thereof) then it worked.
I hope this helps. Sorry to dump so much detail on you!
Best,
David Donohue