Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Modeling (top-level project) » CDO Repository Server Reconnect Failure(When connecting to a CDO Repository that is down it fails even if you start it out)
CDO Repository Server Reconnect Failure [message #654310] Tue, 15 February 2011 04:33 Go to next message
Nuno Santos is currently offline Nuno SantosFriend
Messages: 1
Registered: February 2011
Junior Member
If found a possible bug when testing an app.
I Started the app and try to connect to a repository server that was down. It fails the connection with the timeout exception, but after i started the server and try to reconnect it still fails!
After a while i found the reason: it kept the connector in the repository plugin instance elements. It was necessary to manualy remove it from the instance elements to have it to work.

Something like this:
try{
   connector=TCPUtil.getConnector(IPluginContainer.INSTANCE, host+":"+port);
   configuration =  CDONet4jUtil.createSessionConfiguration();
   configuration.setRepositoryName(id);
   configuration.setConnector(connector);
   return configuration.openSession();
}catch(Throwable t){
      PluginContainer.INSTANCE.removeElement(TCPConnectorFactory.PRODUCT_GROUP, TCPConnectorFactory.TYPE, host+":"+port);
     throw t;
}

[Updated on: Tue, 15 February 2011 04:34]

Report message to a moderator

Re: CDO Repository Server Reconnect Failure [message #654311 is a reply to message #654310] Tue, 15 February 2011 04:44 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Nuno,

Please ask CDO questions in the EMF newsgroup, which I've cc'ed.

I think this issue is fixed in 4.0, where inactive elements are removed from a container by default. Can you try that?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper



Am 15.02.2011 05:33, schrieb Nuno Santos:
> If found a possible bug when testing an app.
> I Started the app and try to connect to a repository server that was down. It fails the connection with the timeout exception, but after i started the server and try to reconnect it still fails! After a while i found the reason: it kept the connector in the repository plugin instance elements. It was necessary to manualy remove it from the instance elements to have it to work.
> Something like this:
> [code]
> try{
> connector=TCPUtil.getConnector(IPluginContainer.INSTANCE, host+":"+port);
> configuration = CDONet4jUtil.createSessionConfiguration();
> configuration.setRepositoryName(id);
> configuration.setConnector(connector);
> return configuration.openSession();
> }catch(Throwable t){
> PluginContainer.INSTANCE.removeElement(TCPConnectorFactory.P RODUCT_GROUP, TCPConnectorFactory.TYPE, host+":"+port);
> throw t;
> }


Previous Topic:what is the difference between EMF, UML ,Protege and MetaEdit+
Next Topic:Different output model directories for interfaces, impls, etc?
Goto Forum:
  


Current Time: Sat Apr 20 00:32:43 GMT 2024

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

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

Back to the top