(Re-) connect bug in org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteServiceContainer#connect ? [message #624067] |
Wed, 24 September 2008 10:33 |
Florian Georg Messages: 34 Registered: July 2009 |
Member |
|
|
I adopted the Remote services example and wrote my own
RemoteServiceAccessHandler for connecting/invoking R-OSGI remote services.
However, if I connect to the Remote container, then disconnect and
re-connect, I get the following exception:
org.eclipse.ecf.core.ContainerConnectException: Container is already
connected to r-osgi://127.0.0.1:2557
at
org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteService Container.connect(R_OSGiRemoteServiceContainer.java:334)
at
org.knime.seek.server.ui.accesshandler.SEEKServiceAccessHand ler$ConnectContainerAction.run(SEEKServiceAccessHandler.java :68)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:583)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:500)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3422)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.knime.seek.product.SEEKApplication.start(SEEKApplication .java:24)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:382)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
From my understanding, this is the server container that should be
re-used once created - disconnect only disconnects the client ID, right ?
So, I looked into the connect method of R_OSGiRemoteServiceContainer,
and there's the cause (lines 329 ff):
public void connect(final ID targetID, final IConnectContext
connectContext) throws ContainerConnectException {
Assert.isNotNull(targetID);
//Assert.isNotNull(connectContext);
if (containerID != null) {
throw new ContainerConnectException("Container is already connected
to " + containerID); //$NON-NLS-1$
}
from my limited understanding of ECF and R-OSGi the check should be on
this.connectedID, not on this.containerID ... am I right?
What can I do other than throwing away the complete server container in
order to enable a re-connect ?
kind reagards
Florian
|
|
|
|
Powered by
FUDForum. Page generated in 0.04213 seconds