Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] ISharedObjectObjectContainer problem client side - SharedObjects not found


Yes, I will definitely tell the world about ECF. In fact my target
platform is Felix, so I guess you may be hearing from me on the issue
of dependencies, and I would like to return some documentation to the
project in this area in due course.

Ultimately I am trying to use DistributedEventAdmin in the form I
guess it was ultimately designed for. I would like calls to
EventAdmin.postEvent() on the server to be received by EventHandlers
registered in the OSGI frameworks of a number of clients.

What I guess I can't work out from the examples is the correct way to
get the proxy to end up  registered on the client side, ready to drive
messages to the EventHandlers. I thought that I should create an
ecf.generic.client container on the client, then connect it to the URI
of the server. I was thinking of casting to an ISharedObjectContainer,
getting the ISharedObjectManager, then getting the EventAdmin proxy,
and registering that in the client BundleContext.

How does that sound?


On Mon, Nov 1, 2010 at 4:21 PM, Scott Lewis <slewis@xxxxxxxxxxxxx> wrote:
> Hi Robert,
> On 11/1/2010 1:48 AM, Robert Onslow wrote:
>> <stuff deleted>
>> I have also successfully advertised the info representing the server
>> sharedobjectcontainer using the IDiscoveryAdvertiser
>> On the client side, I have successfully found the info using
>> IDiscoveryLocator, created a client ecf container and connected it to
>> the server
>> I have received an IContainerConnectedEvent in
>> IContainerListener.handleEvent
>> However, when I query the IDs of the services within the shared object
>> container, I find an empty array:
>> //this is fine
>> ISharedObjectContainer soc = (ISharedObjectContainer) ((IAdaptable)
>> container).getAdapter(ISharedObjectContainer.class);
>> //yup, picks up the manager OK
>> ISharedObjectManager manager = soc.getSharedObjectManager();
>> //oh dear, I find ids is an empty array
>> ID[] ids = manager.getSharedObjectIDs();
>> Am I missing a step here?
> Not necessarily.  A couple of questions:
> 1) Where/when do you create/add the shared object within the client
> container?  Do you do so within your own code?
> 2) If not, is it your intention/desire that the shared object would be added
> at connect time?...i.e. by the server replicating the shared object to the
> client?
> 2 is quite possible...and I can describe how to do it easily enough...but I
> first want to understand what you are intending to have happen on the
> client...are you expecting to have the shared object replicated into the
> client (when connected to the server), or are you expecting to explicitly
> create and add the shared object on the client (as well as on the server)?
>  Both are quite possible/doable...the current eventadmin example creates and
> adds the shared object on the client (as well as the server), explicitly in
> application-level code (partially just to be more explicit).
> So please let us know what your intention/desire is for the client replica
> of the shared object, and we'll figure it out.
>> Robert
>> ps thanks for a fantastic framework.
> Thank you for the pleasant words.  It is appreciated.  If you feel
> comfortable doing so, blogging about your usage of ECF would be most helpful
> also.
> ECF does not have any marketing resources of it's own, and IMHO EF marketing
> is worse than useless when it comes to doing anything for volunteer-based
> projects like crowd sourcing is the best way to get the word out
> for us...
> Anyway...thanks.
> Scott
> _______________________________________________
> ecf-dev mailing list
> ecf-dev@xxxxxxxxxxx

Robert Onslow
XLegal Limited

Back to the top