diff options
author | Eike Stepper | 2013-03-07 11:08:10 +0000 |
---|---|---|
committer | Eike Stepper | 2013-03-07 12:47:01 +0000 |
commit | c897a0868cb5ce842f4948c117fc85ea389cf0db (patch) | |
tree | 3c1b3c066d1dd95a4fd2a8f50dcc2cf7ab846a8a | |
parent | ad00ab2e0b8c4b31997402f01c67ec1740d931e6 (diff) | |
download | cdo-c897a0868cb5ce842f4948c117fc85ea389cf0db.tar.gz cdo-c897a0868cb5ce842f4948c117fc85ea389cf0db.tar.xz cdo-c897a0868cb5ce842f4948c117fc85ea389cf0db.zip |
[402636] Net4jConnectorInjector is missing fromdrops/I20130308-0410
CDONet4jUtil.prepareContainer()
https://bugs.eclipse.org/bugs/show_bug.cgi?id=402636
3 files changed, 5 insertions, 15 deletions
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/Net4jConnectorInjector.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/Net4jConnectorInjector.java index 1c63a9e0a0..fda97ab3e9 100644 --- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/Net4jConnectorInjector.java +++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/Net4jConnectorInjector.java @@ -10,23 +10,17 @@ */ package org.eclipse.emf.cdo.internal.net4j; -import org.eclipse.emf.cdo.internal.net4j.messages.Messages; - import org.eclipse.net4j.Net4jUtil; import org.eclipse.net4j.connector.IConnector; import org.eclipse.net4j.util.StringUtil; import org.eclipse.net4j.util.container.IElementProcessor; import org.eclipse.net4j.util.container.IManagedContainer; -import java.text.MessageFormat; - /** * @author Eike Stepper */ public class Net4jConnectorInjector implements IElementProcessor { - private static final String INVALID_URI_MESSAGE = Messages.getString("InvalidURIException.0"); //$NON-NLS-1$ - private static final String SCHEME_SEPARATOR = "://"; //$NON-NLS-1$ public Net4jConnectorInjector() @@ -54,22 +48,19 @@ public class Net4jConnectorInjector implements IElementProcessor int pos = description.indexOf(SCHEME_SEPARATOR); if (pos == -1) { - throw new IllegalArgumentException(MessageFormat.format(INVALID_URI_MESSAGE, description, - Messages.getString("FailOverStrategyInjector.0"))); //$NON-NLS-1$ + throw new IllegalArgumentException("Malformed URI, could not find scheme separator :// in " + description); } String factoryType = description.substring(0, pos); if (StringUtil.isEmpty(factoryType)) { - throw new IllegalArgumentException(MessageFormat.format(INVALID_URI_MESSAGE, description, - Messages.getString("FailOverStrategyInjector.1"))); //$NON-NLS-1$ + throw new IllegalArgumentException("Factory type not defined in " + description); } String connectorDescription = description.substring(pos + SCHEME_SEPARATOR.length()); if (StringUtil.isEmpty(connectorDescription)) { - throw new IllegalArgumentException(MessageFormat.format(INVALID_URI_MESSAGE, description, - Messages.getString("FailOverStrategyInjector.2"))); //$NON-NLS-1$ + throw new IllegalArgumentException("Connector description not defined in " + description); } pos = connectorDescription.indexOf('?'); diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/messages/messages.properties b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/messages/messages.properties index 809a93b31c..ccfcb57659 100644 --- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/messages/messages.properties +++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/messages/messages.properties @@ -7,9 +7,6 @@ # Contributors: # Eike Stepper - initial API and implementation -FailOverStrategyInjector.0=Malformed URI, could not find scheme separator :// -FailOverStrategyInjector.1=factoryType not defined -FailOverStrategyInjector.2=connectorDescription not defined CommitTransactionPhase2Request.1=Missing informations. {0} is not involved in the commit CommitTransactionPhase2Request.2=Missing informations. {0} is not mapped in the commit OpenSessionRequest.0=Repository {0} not found diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jUtil.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jUtil.java index c286e7aa26..ddc04c86dc 100644 --- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jUtil.java +++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/net4j/CDONet4jUtil.java @@ -15,6 +15,7 @@ package org.eclipse.emf.cdo.net4j; import org.eclipse.emf.cdo.eresource.CDOResourceFactory; import org.eclipse.emf.cdo.internal.net4j.CDONet4jSessionConfigurationImpl; import org.eclipse.emf.cdo.internal.net4j.FailoverCDOSessionConfigurationImpl; +import org.eclipse.emf.cdo.internal.net4j.Net4jConnectorInjector; import org.eclipse.emf.cdo.internal.net4j.Net4jSessionFactory; import org.eclipse.emf.cdo.internal.net4j.ReconnectingCDOSessionConfigurationImpl; import org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocolFactory; @@ -152,6 +153,7 @@ public final class CDONet4jUtil { container.registerFactory(new CDOClientProtocolFactory()); container.registerFactory(new Net4jSessionFactory()); + container.addPostProcessor(new Net4jConnectorInjector()); } /** |