Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Communications Framework (ECF) » (Re-) connect bug in org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteServiceContainer#connect ?
(Re-) connect bug in org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteServiceContainer#connect ? [message #624067] Wed, 24 September 2008 10:33 Go to next message
Florian Georg is currently offline Florian GeorgFriend
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
Re: (Re-) connect bug in org.eclipse.ecf.internal.provider.r_osgi.R_OSGiRemoteServiceContainer#conne [message #624068 is a reply to message #624067] Wed, 24 September 2008 23:45 Go to previous message
Scott Lewis is currently offline Scott LewisFriend
Messages: 1038
Registered: July 2009
Senior Member
Hi Florian,

Florian Georg wrote:
<stuff deleted>

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


Yes, I think you are right. If you would please open a bug report for
this at bugs.eclipse.org with the above information we will fix it
straight away.

Thanks!

Scott
Previous Topic:ECF service threads
Next Topic:Remote Services over ECF XMPP
Goto Forum:
  


Current Time: Sat Apr 27 03:35:45 GMT 2024

Powered by FUDForum. Page generated in 0.03050 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top