Skip to main content

[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

An update.  My change (to put the service interface into a bundle
fragment) fixed the problem that the service interface was invisible
when creating the container.  However, this approach has the problem
inherent in bundle fragments: that the interface is visible only to
the fragment host.  So I cannot use this fragment approach.  So I am
again stuck.

Unless I am doing something wrong, I seem to have no option but
include the service interface in my service client bundle, which would
eliminate the usefulness of an "ecfService" extension point.

On Mon, Dec 28, 2009 at 6:58 AM, David Donohue <dd@xxxxxxxxxxxxxxxx> wrote:
> 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:// as a container.
> <extension
>         point="org.inqle.ecf.servers">
>                <ecfServer
>                        uri="ecftcp://"
>                        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="">
>                <ecfService
>                        serviceInterfaceName=""
>                        serviceClassName=""
>                        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");
>"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' 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) 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
> So when things were not working:
> Bundle 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
> 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

Back to the top