Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » CDO / Net4J socket connector
CDO / Net4J socket connector [message #592283] Wed, 27 September 2006 08:01
Eclipse UserFriend
Originally posted by: yannick.lizzi.silogic.fr

Hi all,

I want to develop a CDO/Net4J client that connects to a CDO/Net4J
server. When the client application starts, it doesn't know the server
host and port.
So comparing to the CDO examples, I have to customize the
ActiveSocketConnector programmatically (not via Spring) by setting host
and port, while the CDO client starts.
How can I do this?

I tried to set host and port before the resourceManager.start() by the
following code:
ActiveSocketConnector conn = (ActiveSocketConnector)
resourceManager.getChannel().getConnector();
conn.setHost(host);
conn.setPort(port);
The problem is that the connector have already started to connect with
the information taken from client.properties.

I also tried to comment the connector bean in client.xml and create it
programmatically with the following code:
ActiveSocketConnectorImpl connector = new ActiveSocketConnectorImpl();
connector.setHost(host);
connector.setPort(port);
connector.setProtocolManager(clientContainer.getBean("protocolManager "));
connector.setSelectorManager(clientContainer.getBean("selectorManager "));
connector.setBufferPool(clientContainer.getBean("bufferPool "));
resourceManager.setConnector(connector);

But in this case, I get a NoControlProtocolException when creating the
resource.

So what's the right way?

Thanks

Yannick Lizzi
Previous Topic:activeness of EODM
Next Topic:[Announce] Web Demo for CDO available
Goto Forum:
  


Current Time: Fri Mar 29 01:42:13 GMT 2024

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

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

Back to the top