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

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?).

The listeners are simple interfaces registered as OSGi services. The tutorial doesn't mention any specific provider. But how would I do that?

>> 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).


This is exactly my problem. But my question is how can I find out why the client never receives service registrations? My host tells me that everything is fine, all services are registered correct. (I've checked out your recent changes and the NPE is gone. But that did of course not solve the source of the problem.)

> containerAdapter.getAllRemoteServiceReferences(null,null);


I also tried this out but I just get an empty result array. 

The interesting thing is that I wrote a simple plug-in test for my code and it works when I run it as a plug-in test. But when I try to experiment with my code starting two different runtime environments (one for host and one for client) it's not working anymore. 

Regards,
Eugen


Am Jul 2, 2010 um 18:57  schrieb Scott Lewis:

> 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
> 
> 
> 
> _______________________________________________
> ecf-dev mailing list
> ecf-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ecf-dev