Skip to main content

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


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. 

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.

Regards,
Eugen


Am Jul 1, 2010 um 20:46  schrieb Scott Lewis:

Eugene,

At this point, the debug support for remote services is indeed minimal.  The reason it's minimal is not that it's not recognized as important (by me and/or other committers), but rather because the project hasn't had enough resources to develop these pieces...and the associated tooling/user interfaces...alongside the (necessary) work on the remote services runtime, provider impls, and example code and docs that we've done over the past year.

There are, however, a number of runtime hooks that can be used for debugging of remote service registration and lookup...as you are apparently trying to do.  Because of the above resource limitations, as of right now these are admittedly runtime hooks rather than full debug tools.   Further, Markus Kuppe has already done some work on creating a test/debug environment specifically for remote services (think junit testing of remote services).  I would love to see contribution or support for existing committers for the development of full debug tools and a full remote services testing approach...and this is indeed quite doable given the ECF runtime support.  I would encourage people to open enhancement requests in specific areas (e.g. discovery, remote services/distribution, specific providers, rest remote services, etc) that are of particular interest given their use cases and environments.  That way we can address the needs as directly as possible.

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

For the ECF remote services API, however, see these hooks:

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.

These two hooks pretty much parallel what the OSGi service registry does...and this is how (for example) the OSGi console prints out information about the OSGi service registry (e.g. the list of OSGi services).  There can/could be console commands created for displaying these things, but the remote service console commands have not yet been created (although there is, in ECF 3.3, a few new ECF console commands...around the use of the IContainerManager service, and there is a new ConsoleProvider in org.eclipse.ecf.console bundle [new to 3.3]).

Also...for most providers there is access to tracing/debug output (i.e. debug options), that will produce tracing output for various provider-specific activities.  For example, the org.eclipse.ecf.provider.remoteservice bundle (which has the impl of the remote service API for the XMPP as well as the generic provider) can produce a fair amount of tracing output.  If you want to see specifics about the tracing for the various providers, you can easily consult the .options file in the root for each of the associated projects).

Thanks,

Scott

Eugen Reiswich wrote:
Hi folks,
I'm trying now for month to get a simple ECF remote services example run over XMPP. I've read almost every ECF article but it still doesn't work. My problem is that I don't know how to debug my ECF code. The task is very simple. I got two clients userA and userB. What I need two know is did the remote service registration work properly. Example:
1. userA publishes a remote service to userB -> my questions: a) did the publishing stuff for userA work properly with ECF
b) can userB use the service published by userA

In OSGi I can use the console to debug service registrations etc. In ECF I'm hitting the wall over and over and just don't know whether: my code is buggy or ECF is buggy? When I try to retrieve previously registered services the result array is always empty.

Any help will be appreciated.

Regards,
Eugen


_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev
 

_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev


Back to the top