Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2009-05-12 09:51:12 +0000
committerEike Stepper2009-05-12 09:51:12 +0000
commit69113f6784e07a95c5613f8e119b0ff8524a6180 (patch)
tree923241c467cc5420857a46356fc9c7f842f2f0c1
parentac2e656ba1204437981e6921baa5cc0470f5582b (diff)
downloadcdo-69113f6784e07a95c5613f8e119b0ff8524a6180.tar.gz
cdo-69113f6784e07a95c5613f8e119b0ff8524a6180.tar.xz
cdo-69113f6784e07a95c5613f8e119b0ff8524a6180.zip
[273577] Add lifecycle check in the negotiator setter of a Connector.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=273577
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/TransportConfigurator.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/TransportConfigurator.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/TransportConfigurator.java
index 4e5a387ff5..a5774b8dfa 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/TransportConfigurator.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/TransportConfigurator.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Eike Stepper - initial API and implementation
*/
@@ -87,7 +87,7 @@ public class TransportConfigurator
String listenAddr = acceptorConfig.getAttribute("listenAddr");
String port = acceptorConfig.getAttribute("port");
String description = (listenAddr == null ? "" : listenAddr) + (port == null ? "" : ":" + port);
- Acceptor acceptor = (Acceptor)container.getElement(AcceptorFactory.PRODUCT_GROUP, type, description);
+ Acceptor acceptor = (Acceptor)container.getElement(AcceptorFactory.PRODUCT_GROUP, type, description, false);
NodeList negotiatorConfigs = acceptorConfig.getElementsByTagName("negotiator");
if (negotiatorConfigs.getLength() > 1)
@@ -102,6 +102,7 @@ public class TransportConfigurator
acceptor.getConfig().setNegotiator(negotiator);
}
+ acceptor.activate();
return acceptor;
}
@@ -109,8 +110,7 @@ public class TransportConfigurator
{
String type = negotiatorConfig.getAttribute("type");
String description = negotiatorConfig.getAttribute("description");
- INegotiator negotiator = (INegotiator)container.getElement(NegotiatorFactory.PRODUCT_GROUP, type, description);
- return negotiator;
+ return (INegotiator)container.getElement(NegotiatorFactory.PRODUCT_GROUP, type, description);
}
protected Document getDocument(File configFile) throws ParserConfigurationException, SAXException, IOException

Back to the top