Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ecf-dev] Time-out Exception and remote services, what is the best practice.

Hi,

I am working with remote services. If the service is dynamic and can
come and go at any time then there is an issue:

Suppose I have discovered a remote service and I make a call to it.
If, during the call, the remote framework decides to stop the service
then you will get the attached exception.

I really want to make this as transparent as possible and not wrap the
remote service in all kinds of try blocks.  Of course, many people
have warned about the caveats of remote services but what is the best
way ECF can help ppl to work with them? If we work with async calls
then we are working with the concept of remote services in our code.
If we work synchronized then we can have the problem described here.
Is there a way for the host to know that the service is in use so it
can wait a little bit. Out of the box: It would be ideal if the remote
service would prevent giving out a new instance to requesters but
would allow the consumer to finish a request.

Regards,

Wim

Caused by: org.osgi.framework.ServiceException: Service exception on
remote service proxy
rsid=org.eclipse.ecf.remoteservice.RemoteServiceID[containerID=StringID[ecftcp://yazafatutu.com:3282/server];containerRelativeID=4134]
	at org.eclipse.ecf.remoteservice.AbstractRemoteService.invoke(AbstractRemoteService.java:186)
	at $Proxy0.getServiceDescription(Unknown Source)
	at org.eclipse.ecf.examples.remoteservices.quotes.consumer.CopyOfActivator$1$1$1$1.run(CopyOfActivator.java:89)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	... 7 more
Caused by: org.eclipse.ecf.core.util.ECFException: Request timed out
after 30000 ms
	at org.eclipse.ecf.provider.remoteservice.generic.RegistrySharedObject.callSynch(RegistrySharedObject.java:563)
	at org.eclipse.ecf.provider.remoteservice.generic.RemoteServiceImpl.callSync(RemoteServiceImpl.java:55)
	at org.eclipse.ecf.remoteservice.AbstractRemoteService.invokeSync(AbstractRemoteService.java:149)
	at org.eclipse.ecf.remoteservice.AbstractRemoteService.invoke(AbstractRemoteService.java:181)
	... 11 more
Caused by: org.eclipse.equinox.concurrent.future.TimeoutException
	... 15 more
Exception in thread "pool-4-thread-1" org.eclipse.swt.SWTException:
Failed to execute runnable (org.osgi.framework.ServiceException:
Service exception on remote service proxy
rsid=org.eclipse.ecf.remoteservice.RemoteServiceID[containerID=StringID[ecftcp://yazafatutu.com:3282/server];containerRelativeID=4134])
	at org.eclipse.swt.SWT.error(SWT.java:4083)
	at org.eclipse.swt.SWT.error(SWT.java:3998)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:195)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4584)
	at org.eclipse.ecf.examples.remoteservices.quotes.consumer.CopyOfActivator$1$1$1.run(CopyOfActivator.java:82)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: org.osgi.framework.ServiceException: Service exception on
remote service proxy
rsid=org.eclipse.ecf.remoteservice.RemoteServiceID[containerID=StringID[ecftcp://yazafatutu.com:3282/server];containerRelativeID=4134]
	at org.eclipse.ecf.remoteservice.AbstractRemoteService.invoke(AbstractRemoteService.java:186)
	at $Proxy0.getServiceDescription(Unknown Source)
	at org.eclipse.ecf.examples.remoteservices.quotes.consumer.CopyOfActivator$1$1$1$1.run(CopyOfActivator.java:89)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
	at org.eclipse.ecf.examples.remoteservices.quotes.consumer.ConsumerUI.main(ConsumerUI.java:45)
	at org.eclipse.ecf.examples.remoteservices.quotes.consumer.CopyOfActivator$1.run(CopyOfActivator.java:42)
	... 3 more
Caused by: org.eclipse.ecf.core.util.ECFException: Request timed out
after 30000 ms
	at org.eclipse.ecf.provider.remoteservice.generic.RegistrySharedObject.callSynch(RegistrySharedObject.java:563)
	at org.eclipse.ecf.provider.remoteservice.generic.RemoteServiceImpl.callSync(RemoteServiceImpl.java:55)
	at org.eclipse.ecf.remoteservice.AbstractRemoteService.invokeSync(AbstractRemoteService.java:149)
	at org.eclipse.ecf.remoteservice.AbstractRemoteService.invoke(AbstractRemoteService.java:181)
	... 11 more
Caused by: org.eclipse.equinox.concurrent.future.TimeoutException
	... 15 more


Back to the top