[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] Debug ECF remote services

Hi Eugen,

Eugen Reiswich wrote:
Hi Scott,

Below are some of the runtime hooks for the ECF remote services API specifically . There are also runtime hooks for the discovery API, as well as for the OSGi Remote Services implementation (for both discovery and distribution). I won't list those hooks here, but some of them are listed on this wiki page: http://wiki.eclipse.org/Discovery_and_Distribution_Listeners
I tried this hook but even though my listeners are registered properly the listeners are very quite - they don't do anything.


That's probably because your service registration is not properly formed (for the XMPP provider?).




IRemoteServiceContainerAdapter.addRemoteServiceListener: It's possible to add listeners to remote service events...e.g. registration, unregistration, etc.


IRemoteServiceContaienrAdapter.getAllRemoteServiceReferences: It's possible to get parts/all of the local remote service registry.

I already use the first hook (addRemoteServiceListener) but the second one does not work as I always get an empty result list. In addition to that getAllRemoteServiceReferences requires as a parameter a specific service. In my case I would like to know whether any remote service is available.


containerAdapter.getAllRemoteServiceReferences(null,null);

but the bug below prevents this from working at the moment


What I always get is the following exception: java.lang.NullPointerException
at org.eclipse.ecf.provider.remoteservice.generic.RegistrySharedObject.getAllRemoteServiceReferences(RegistrySharedObject.java:163)
at org.remotercp.ecf.consumer.test.ServiceConsumer._getService(ServiceConsumer.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:155)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:156)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.runConsole(FrameworkConsole.java:141)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:105)
at java.lang.Thread.run(Thread.java:637)


I tried to debug this exception but all I found out is that within the ECF-RegistrySharedObject the map "remoteRegistries" is empty. But I don't know why.

It's empty because the clients never receive the service registration (probably because the registration is not properly formed).


I've created this entry for the above bug, however...which has to do with the case when remoteRegistries is completely empty (which it is in your case). https://bugs.eclipse.org/bugs/show_bug.cgi?id=318756

Scott