Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Roldan Betancort2009-05-20 18:52:31 +0000
committerVictor Roldan Betancort2009-05-20 18:52:31 +0000
commita4a7bc418b553e0d1092caffd574787b592d4f90 (patch)
tree5a63fe81f96177d6f008836383a16b2f346ffc88
parente87578beb3393762ec4175a6ec8eb1a1aab9ee17 (diff)
downloadcdo-a4a7bc418b553e0d1092caffd574787b592d4f90.tar.gz
cdo-a4a7bc418b553e0d1092caffd574787b592d4f90.tar.xz
cdo-a4a7bc418b553e0d1092caffd574787b592d4f90.zip
[272193] [UI] Externalize Strings (Net4j)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=272193
-rw-r--r--plugins/org.eclipse.net4j.jms.server.jdbc/src/org/eclipse/net4j/jms/server/internal/jdbc/JDBCStore.java6
-rw-r--r--plugins/org.eclipse.net4j.jms.server.jdbc/src/org/eclipse/net4j/jms/server/internal/jdbc/JMSSchema.java22
-rw-r--r--plugins/org.eclipse.net4j.jms.server.jdbc/src/org/eclipse/net4j/jms/server/jdbc/JDBCUtil.java6
-rw-r--r--plugins/org.eclipse.net4j.jms.server/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/Server.java17
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConsumer.java4
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerSession.java4
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/messages/Messages.java41
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/messages/messages.properties17
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSAcknowledgeIndication.java5
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSCommitIndication.java5
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSLogonIndication.java3
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRecoverIndication.java5
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRollbackIndication.java5
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSCreateDestinationIndication.java2
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/AbstractTransaction.java44
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/NOOPStore.java2
-rw-r--r--plugins/org.eclipse.net4j.jms.tests/src/org/eclipse/net4j/jms/tests/JMSSeparatedTest.java24
-rw-r--r--plugins/org.eclipse.net4j.jms.tests/src/org/eclipse/net4j/jms/tests/JMSTest.java24
-rw-r--r--plugins/org.eclipse.net4j.jms/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/ConnectionImpl.java13
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/ConnectionMetaDataImpl.java8
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/MessageConsumerImpl.java5
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/MessageImpl.java19
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/MessageProducerImpl.java3
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/SessionImpl.java16
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/TemporaryQueueImpl.java2
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/TemporaryTopicImpl.java2
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/messages/Messages.java41
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/messages/messages.properties22
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/util/DestinationUtil.java10
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/util/MessageUtil.java20
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/util/TypeUtil.java26
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/jms/JMSAdminProtocolConstants.java2
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/jms/JMSProtocolConstants.java2
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/jms/JMSUtil.java2
36 files changed, 289 insertions, 142 deletions
diff --git a/plugins/org.eclipse.net4j.jms.server.jdbc/src/org/eclipse/net4j/jms/server/internal/jdbc/JDBCStore.java b/plugins/org.eclipse.net4j.jms.server.jdbc/src/org/eclipse/net4j/jms/server/internal/jdbc/JDBCStore.java
index 37c15fdecb..04fc87bf08 100644
--- a/plugins/org.eclipse.net4j.jms.server.jdbc/src/org/eclipse/net4j/jms/server/internal/jdbc/JDBCStore.java
+++ b/plugins/org.eclipse.net4j.jms.server.jdbc/src/org/eclipse/net4j/jms/server/internal/jdbc/JDBCStore.java
@@ -25,7 +25,7 @@ import java.sql.SQLException;
*/
public class JDBCStore extends AbstractStore
{
- private static final String STORE_TYPE = "JDBC";
+ private static final String STORE_TYPE = "JDBC"; //$NON-NLS-1$
private IDBAdapter dbAdapter;
@@ -36,12 +36,12 @@ public class JDBCStore extends AbstractStore
super(STORE_TYPE);
if (dbAdapter == null)
{
- throw new IllegalArgumentException("dbAdapter == null");
+ throw new IllegalArgumentException("dbAdapter == null"); //$NON-NLS-1$
}
if (dataSource == null)
{
- throw new IllegalArgumentException("dataSource == null");
+ throw new IllegalArgumentException("dataSource == null"); //$NON-NLS-1$
}
this.dbAdapter = dbAdapter;
diff --git a/plugins/org.eclipse.net4j.jms.server.jdbc/src/org/eclipse/net4j/jms/server/internal/jdbc/JMSSchema.java b/plugins/org.eclipse.net4j.jms.server.jdbc/src/org/eclipse/net4j/jms/server/internal/jdbc/JMSSchema.java
index 4c8b89602c..4ab6194887 100644
--- a/plugins/org.eclipse.net4j.jms.server.jdbc/src/org/eclipse/net4j/jms/server/internal/jdbc/JMSSchema.java
+++ b/plugins/org.eclipse.net4j.jms.server.jdbc/src/org/eclipse/net4j/jms/server/internal/jdbc/JMSSchema.java
@@ -26,13 +26,13 @@ public class JMSSchema extends DBSchema
/**
* DBTable Destinations
*/
- public static final IDBTable DESTINATIONS = INSTANCE.addTable("destinations");
+ public static final IDBTable DESTINATIONS = INSTANCE.addTable("destinations"); //$NON-NLS-1$
public static final IDBField DESTINATIONS_NAME = //
- DESTINATIONS.addField("name", DBType.VARCHAR, 255);
+ DESTINATIONS.addField("name", DBType.VARCHAR, 255); //$NON-NLS-1$
public static final IDBField DESTINATIONS_TYPE = //
- DESTINATIONS.addField("type", DBType.INTEGER);
+ DESTINATIONS.addField("type", DBType.INTEGER); //$NON-NLS-1$
public static final IDBIndex INDEX_DESTINATIONS_PK = //
DESTINATIONS.addIndex(IDBIndex.Type.PRIMARY_KEY, DESTINATIONS_NAME);
@@ -40,16 +40,16 @@ public class JMSSchema extends DBSchema
/**
* DBTable Messages
*/
- public static final IDBTable MESSAGES = INSTANCE.addTable("messages");
+ public static final IDBTable MESSAGES = INSTANCE.addTable("messages"); //$NON-NLS-1$
public static final IDBField MESSAGES_ID = //
- MESSAGES.addField("id", DBType.VARCHAR);
+ MESSAGES.addField("id", DBType.VARCHAR); //$NON-NLS-1$
public static final IDBField MESSAGES_DESTINATION = //
- MESSAGES.addField("destination", DBType.VARCHAR);
+ MESSAGES.addField("destination", DBType.VARCHAR); //$NON-NLS-1$
public static final IDBField MESSAGES_PRIORITY = //
- MESSAGES.addField("priority", DBType.INTEGER);
+ MESSAGES.addField("priority", DBType.INTEGER); //$NON-NLS-1$
public static final IDBIndex INDEX_MESSAGES_PK = //
MESSAGES.addIndex(IDBIndex.Type.PRIMARY_KEY, MESSAGES_ID);
@@ -57,13 +57,13 @@ public class JMSSchema extends DBSchema
/**
* Queries
*/
- public static final String QUERY = "SELECT " + DESTINATIONS_TYPE + ", " + MESSAGES_ID + ", " + MESSAGES_PRIORITY
- + " FROM " + DESTINATIONS + ", " + MESSAGES + " WHERE " + DESTINATIONS_NAME + "=" + MESSAGES_DESTINATION
- + " AND " + DESTINATIONS_NAME + "=?";
+ public static final String QUERY = "SELECT " + DESTINATIONS_TYPE + ", " + MESSAGES_ID + ", " + MESSAGES_PRIORITY //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ + " FROM " + DESTINATIONS + ", " + MESSAGES + " WHERE " + DESTINATIONS_NAME + "=" + MESSAGES_DESTINATION //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ + " AND " + DESTINATIONS_NAME + "=?"; //$NON-NLS-1$ //$NON-NLS-2$
private JMSSchema()
{
- super("JMS");
+ super("JMS"); //$NON-NLS-1$
}
static
diff --git a/plugins/org.eclipse.net4j.jms.server.jdbc/src/org/eclipse/net4j/jms/server/jdbc/JDBCUtil.java b/plugins/org.eclipse.net4j.jms.server.jdbc/src/org/eclipse/net4j/jms/server/jdbc/JDBCUtil.java
index a4d3493ab7..eb6f9c5b2a 100644
--- a/plugins/org.eclipse.net4j.jms.server.jdbc/src/org/eclipse/net4j/jms/server/jdbc/JDBCUtil.java
+++ b/plugins/org.eclipse.net4j.jms.server.jdbc/src/org/eclipse/net4j/jms/server/jdbc/JDBCUtil.java
@@ -39,10 +39,10 @@ public final class JDBCUtil
public static IStore getStore()
{
Properties properties = OM.BUNDLE.getConfigProperties();
- String adapterName = properties.getProperty("store.adapterName", "derby-embedded");
+ String adapterName = properties.getProperty("store.adapterName", "derby-embedded"); //$NON-NLS-1$ //$NON-NLS-2$
IDBAdapter dbAdapter = DBUtil.getDBAdapter(adapterName);
- DataSource dataSource = DBUtil.createDataSource(properties, "datasource");
- String instanceID = properties.getProperty("store.instanceID", "00000000");
+ DataSource dataSource = DBUtil.createDataSource(properties, "datasource"); //$NON-NLS-1$
+ String instanceID = properties.getProperty("store.instanceID", "00000000"); //$NON-NLS-1$ //$NON-NLS-2$
return getStore(dbAdapter, dataSource, instanceID);
}
}
diff --git a/plugins/org.eclipse.net4j.jms.server/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.jms.server/META-INF/MANIFEST.MF
index 678ebf4c85..09a9e3be1c 100644
--- a/plugins/org.eclipse.net4j.jms.server/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.jms.server/META-INF/MANIFEST.MF
@@ -14,6 +14,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
Import-Package: javax.jms;version="1.1.0"
Export-Package: org.eclipse.net4j.jms.internal.server;version="2.0.0";x-friends:="org.eclipse.net4j.jms.server.jdbc,org.eclipse.net4j.jms.tests",
org.eclipse.net4j.jms.internal.server.bundle;version="2.0.0";x-internal:=true,
+ org.eclipse.net4j.jms.internal.server.messages;x-internal:=true,
org.eclipse.net4j.jms.internal.server.protocol;version="2.0.0";x-friends:="org.eclipse.net4j.jms.server.jdbc,org.eclipse.net4j.jms.tests",
org.eclipse.net4j.jms.internal.server.protocol.admin;version="2.0.0";x-friends:="org.eclipse.net4j.jms.server.jdbc,org.eclipse.net4j.jms.tests",
org.eclipse.net4j.jms.internal.server.store;version="2.0.0";x-friends:="org.eclipse.net4j.jms.server.jdbc,org.eclipse.net4j.jms.tests",
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/Server.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/Server.java
index 5818b566ce..e190359051 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/Server.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/Server.java
@@ -14,6 +14,7 @@ import org.eclipse.net4j.internal.jms.ConnectionFactoryImpl;
import org.eclipse.net4j.internal.jms.JMSDestination;
import org.eclipse.net4j.internal.jms.MessageImpl;
import org.eclipse.net4j.jms.internal.server.bundle.OM;
+import org.eclipse.net4j.jms.internal.server.messages.Messages;
import org.eclipse.net4j.jms.server.IDestination;
import org.eclipse.net4j.jms.server.IServer;
import org.eclipse.net4j.jms.server.IStore;
@@ -75,7 +76,7 @@ public class Server extends QueueWorker<MessageImpl> implements IServer
ServerDestination existing = destinations.putIfAbsent(name, destination);
if (existing != null)
{
- throw new IllegalStateException("Destination " + type + " " + name + " does already exist");
+ throw new IllegalStateException("Destination " + type + " " + name + " does already exist"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
IStoreTransaction transaction = store.startTransaction();
@@ -107,7 +108,7 @@ public class Server extends QueueWorker<MessageImpl> implements IServer
ServerDestination destination = destinations.get(name);
if (destination == null)
{
- OM.LOG.error("Invalid destination: " + name);
+ OM.LOG.error(Messages.getString("Server.3") + name); //$NON-NLS-1$
return null;
}
@@ -158,7 +159,7 @@ public class Server extends QueueWorker<MessageImpl> implements IServer
return null;
}
- messageIDs[i] = "ID:NET4J:" + HexUtil.longToHex(messageIDCounter.increment());
+ messageIDs[i] = "ID:NET4J:" + HexUtil.longToHex(messageIDCounter.increment()); //$NON-NLS-1$
message.setJMSMessageID(messageIDs[i]);
}
@@ -174,7 +175,7 @@ public class Server extends QueueWorker<MessageImpl> implements IServer
@Override
protected String getThreadName()
{
- return "jms-server";
+ return "jms-server"; //$NON-NLS-1$
}
@Override
@@ -192,7 +193,7 @@ public class Server extends QueueWorker<MessageImpl> implements IServer
super.doBeforeActivate();
if (store == null)
{
- throw new IllegalStateException("store == null");
+ throw new IllegalStateException("store == null"); //$NON-NLS-1$
}
}
@@ -200,9 +201,9 @@ public class Server extends QueueWorker<MessageImpl> implements IServer
protected void doActivate() throws Exception
{
super.doActivate();
- String name = System.getProperty("net4j.jms.connection.factory.name", "net4j.jms.ConnectionFactory");
- String type = System.getProperty("net4j.jms.connector.type", "tcp");
- String desc = System.getProperty("net4j.jms.connector.description", "localhost");
+ String name = System.getProperty("net4j.jms.connection.factory.name", "net4j.jms.ConnectionFactory"); //$NON-NLS-1$ //$NON-NLS-2$
+ String type = System.getProperty("net4j.jms.connector.type", "tcp"); //$NON-NLS-1$ //$NON-NLS-2$
+ String desc = System.getProperty("net4j.jms.connector.description", "localhost"); //$NON-NLS-1$ //$NON-NLS-2$
jndiContext = new InitialContext();
jndiContext.rebind(name, new ConnectionFactoryImpl(type, desc));
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConsumer.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConsumer.java
index 8d5129201c..b3f454ca21 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConsumer.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConsumer.java
@@ -122,7 +122,7 @@ public class ServerConsumer implements IServerConsumer
for (MessageImpl message : messages.values())
{
transaction.messageAcknowledged(message, id);
- IOUtil.OUT().println("\nMessage acknowledged: " + message.getJMSMessageID() + " (consumer=" + id + ")\n");
+ IOUtil.OUT().println("\nMessage acknowledged: " + message.getJMSMessageID() + " (consumer=" + id + ")\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
messages.clear();
@@ -140,7 +140,7 @@ public class ServerConsumer implements IServerConsumer
for (MessageImpl message : messages.values())
{
- IOUtil.OUT().println("\nRecovering message: " + message.getJMSMessageID() + " (consumer=" + id + ")\n");
+ IOUtil.OUT().println("\nRecovering message: " + message.getJMSMessageID() + " (consumer=" + id + ")\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
session.getConnection().getServer().addWork(message);
}
}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerSession.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerSession.java
index acaabd42c3..e99d284097 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerSession.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerSession.java
@@ -13,11 +13,13 @@ package org.eclipse.net4j.jms.internal.server;
import org.eclipse.net4j.internal.jms.DestinationImpl;
import org.eclipse.net4j.internal.jms.MessageImpl;
import org.eclipse.net4j.jms.internal.server.bundle.OM;
+import org.eclipse.net4j.jms.internal.server.messages.Messages;
import org.eclipse.net4j.jms.server.ISession;
import org.eclipse.net4j.jms.server.IStore;
import org.eclipse.net4j.jms.server.IStoreTransaction;
import org.eclipse.net4j.util.lifecycle.Lifecycle;
+import java.text.MessageFormat;
import java.util.Collection;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
@@ -56,7 +58,7 @@ public class ServerSession extends Lifecycle implements ISession
ServerDestination destination = server.getDestination(name);
if (destination == null)
{
- OM.LOG.error("Destination not found: " + name);
+ OM.LOG.error(MessageFormat.format(Messages.getString("ServerSession_0"), name)); //$NON-NLS-1$
return -1;
}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/messages/Messages.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/messages/Messages.java
new file mode 100644
index 0000000000..e3bf8d40e2
--- /dev/null
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/messages/Messages.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * 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:
+ * Victor Roldan Betancort - initial API and implementation
+ * Eike Stepper - maintenance
+ */
+package org.eclipse.net4j.jms.internal.server.messages;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * @author Victor Roldan Betancort
+ */
+public class Messages
+{
+ private static final String BUNDLE_NAME = "org.eclipse.net4j.jms.internal.server.messages.messages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+ private Messages()
+ {
+ }
+
+ public static String getString(String key)
+ {
+ try
+ {
+ return RESOURCE_BUNDLE.getString(key);
+ }
+ catch (MissingResourceException e)
+ {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/messages/messages.properties b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/messages/messages.properties
new file mode 100644
index 0000000000..0a197e736f
--- /dev/null
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/messages/messages.properties
@@ -0,0 +1,17 @@
+# Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others.
+# All rights reserved. This program and the accompanying materials
+# 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:
+# Victor Roldan Betancort - initial API and implementation
+# Eike Stepper - maintenance
+
+JMSAcknowledgeIndication_0=Session {0} not found. Acknowledgement discarded.
+JMSCommitIndication_0=Session {0} not found
+JMSLogonIndication_0=Access to JMS server denied
+JMSRecoverIndication_0=Session {0} not found
+JMSRollbackIndication_0=Session {0} not found
+Server.3=Invalid destination:
+ServerSession_0=Destination not found: {0}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSAcknowledgeIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSAcknowledgeIndication.java
index 8a919ac00b..0365d3a4d0 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSAcknowledgeIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSAcknowledgeIndication.java
@@ -14,9 +14,12 @@ import org.eclipse.net4j.jms.JMSProtocolConstants;
import org.eclipse.net4j.jms.internal.server.ServerConnection;
import org.eclipse.net4j.jms.internal.server.ServerSession;
import org.eclipse.net4j.jms.internal.server.bundle.OM;
+import org.eclipse.net4j.jms.internal.server.messages.Messages;
import org.eclipse.net4j.signal.Indication;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+import java.text.MessageFormat;
+
/**
* @author Eike Stepper
*/
@@ -37,7 +40,7 @@ public class JMSAcknowledgeIndication extends Indication
ServerSession session = connection.getSession(sessionID);
if (session == null)
{
- OM.LOG.info("Session " + sessionID + " not found. Acknowledgement discarded.");
+ OM.LOG.info(MessageFormat.format(Messages.getString("JMSAcknowledgeIndication_0"), sessionID)); //$NON-NLS-1$
return;
}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSCommitIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSCommitIndication.java
index f7133a7d4d..c1fbde0101 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSCommitIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSCommitIndication.java
@@ -16,10 +16,13 @@ import org.eclipse.net4j.jms.JMSProtocolConstants;
import org.eclipse.net4j.jms.internal.server.ServerConnection;
import org.eclipse.net4j.jms.internal.server.ServerSession;
import org.eclipse.net4j.jms.internal.server.bundle.OM;
+import org.eclipse.net4j.jms.internal.server.messages.Messages;
import org.eclipse.net4j.signal.IndicationWithResponse;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+import java.text.MessageFormat;
+
/**
* @author Eike Stepper
*/
@@ -48,7 +51,7 @@ public class JMSCommitIndication extends IndicationWithResponse
ServerSession session = connection.getSession(sessionID);
if (session == null)
{
- OM.LOG.warn("Session " + sessionID + " not found");
+ OM.LOG.warn(MessageFormat.format(Messages.getString("JMSCommitIndication_0"), sessionID)); //$NON-NLS-1$
return;
}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSLogonIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSLogonIndication.java
index b9e4fcdaad..a98d43805e 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSLogonIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSLogonIndication.java
@@ -14,6 +14,7 @@ import org.eclipse.net4j.jms.JMSProtocolConstants;
import org.eclipse.net4j.jms.internal.server.Server;
import org.eclipse.net4j.jms.internal.server.ServerConnection;
import org.eclipse.net4j.jms.internal.server.bundle.OM;
+import org.eclipse.net4j.jms.internal.server.messages.Messages;
import org.eclipse.net4j.signal.IndicationWithResponse;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
@@ -38,7 +39,7 @@ public class JMSLogonIndication extends IndicationWithResponse
ServerConnection connection = Server.INSTANCE.logon(userName, password);
if (connection == null)
{
- OM.LOG.error("Access to JMS server denied");
+ OM.LOG.error(Messages.getString("JMSLogonIndication_0")); //$NON-NLS-1$
return;
}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRecoverIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRecoverIndication.java
index 19ab251771..598ac37a65 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRecoverIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRecoverIndication.java
@@ -14,10 +14,13 @@ import org.eclipse.net4j.jms.JMSProtocolConstants;
import org.eclipse.net4j.jms.internal.server.ServerConnection;
import org.eclipse.net4j.jms.internal.server.ServerSession;
import org.eclipse.net4j.jms.internal.server.bundle.OM;
+import org.eclipse.net4j.jms.internal.server.messages.Messages;
import org.eclipse.net4j.signal.IndicationWithResponse;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+import java.text.MessageFormat;
+
/**
* @author Eike Stepper
*/
@@ -37,7 +40,7 @@ public class JMSRecoverIndication extends IndicationWithResponse
ServerSession session = connection.getSession(sessionID);
if (session == null)
{
- OM.LOG.warn("Session " + sessionID + " not found");
+ OM.LOG.warn(MessageFormat.format(Messages.getString("JMSRecoverIndication_0"), sessionID)); //$NON-NLS-1$
return;
}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRollbackIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRollbackIndication.java
index 019698727e..63492b63e0 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRollbackIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRollbackIndication.java
@@ -14,10 +14,13 @@ import org.eclipse.net4j.jms.JMSProtocolConstants;
import org.eclipse.net4j.jms.internal.server.ServerConnection;
import org.eclipse.net4j.jms.internal.server.ServerSession;
import org.eclipse.net4j.jms.internal.server.bundle.OM;
+import org.eclipse.net4j.jms.internal.server.messages.Messages;
import org.eclipse.net4j.signal.IndicationWithResponse;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+import java.text.MessageFormat;
+
/**
* @author Eike Stepper
*/
@@ -37,7 +40,7 @@ public class JMSRollbackIndication extends IndicationWithResponse
ServerSession session = connection.getSession(sessionID);
if (session == null)
{
- OM.LOG.warn("Session " + sessionID + " not found");
+ OM.LOG.warn(MessageFormat.format(Messages.getString("JMSRollbackIndication_0"), sessionID)); //$NON-NLS-1$
return;
}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSCreateDestinationIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSCreateDestinationIndication.java
index 18a5aa11be..75fb005d6b 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSCreateDestinationIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSCreateDestinationIndication.java
@@ -60,6 +60,6 @@ public class JMSCreateDestinationIndication extends IndicationWithResponse
return IDestination.Type.TOPIC;
}
- throw new IllegalArgumentException("type: " + type);
+ throw new IllegalArgumentException("type: " + type); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/AbstractTransaction.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/AbstractTransaction.java
index 77e821272f..09b2e8e014 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/AbstractTransaction.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/AbstractTransaction.java
@@ -48,13 +48,13 @@ public abstract class AbstractTransaction implements IStoreTransaction
{
if (TRACER.isEnabled())
{
- TRACER.trace("Getting destination names");
+ TRACER.trace("Getting destination names"); //$NON-NLS-1$
}
String[] names = doGetDestinationNames();
if (TRACER.isEnabled())
{
- TRACER.trace("Got destination names " + names);
+ TRACER.trace("Got destination names " + names); //$NON-NLS-1$
}
return names;
@@ -64,13 +64,13 @@ public abstract class AbstractTransaction implements IStoreTransaction
{
if (TRACER.isEnabled())
{
- TRACER.trace("Getting destination " + name);
+ TRACER.trace("Getting destination " + name); //$NON-NLS-1$
}
ServerDestination destination = doGetDestination(name);
if (TRACER.isEnabled())
{
- TRACER.trace("Got destination " + destination);
+ TRACER.trace("Got destination " + destination); //$NON-NLS-1$
}
return destination;
@@ -80,13 +80,13 @@ public abstract class AbstractTransaction implements IStoreTransaction
{
if (TRACER.isEnabled())
{
- TRACER.trace("Getting consumer IDs");
+ TRACER.trace("Getting consumer IDs"); //$NON-NLS-1$
}
long[] ids = doGetConsumerIDs();
if (TRACER.isEnabled())
{
- TRACER.trace("Got consumer IDs " + ids);
+ TRACER.trace("Got consumer IDs " + ids); //$NON-NLS-1$
}
return ids;
@@ -96,13 +96,13 @@ public abstract class AbstractTransaction implements IStoreTransaction
{
if (TRACER.isEnabled())
{
- TRACER.trace("Getting consumer " + id);
+ TRACER.trace("Getting consumer " + id); //$NON-NLS-1$
}
ServerConsumer consumer = doGetConsumer(id);
if (TRACER.isEnabled())
{
- TRACER.trace("Got consumer " + consumer);
+ TRACER.trace("Got consumer " + consumer); //$NON-NLS-1$
}
return consumer;
@@ -112,13 +112,13 @@ public abstract class AbstractTransaction implements IStoreTransaction
{
if (TRACER.isEnabled())
{
- TRACER.trace("Adding destination " + destination);
+ TRACER.trace("Adding destination " + destination); //$NON-NLS-1$
}
doDestinationAdded((ServerDestination)destination);
if (TRACER.isEnabled())
{
- TRACER.trace("Added destination " + destination);
+ TRACER.trace("Added destination " + destination); //$NON-NLS-1$
}
}
@@ -126,13 +126,13 @@ public abstract class AbstractTransaction implements IStoreTransaction
{
if (TRACER.isEnabled())
{
- TRACER.trace("Removing destination " + destination);
+ TRACER.trace("Removing destination " + destination); //$NON-NLS-1$
}
doDestinationRemoved((ServerDestination)destination);
if (TRACER.isEnabled())
{
- TRACER.trace("Removed destination " + destination);
+ TRACER.trace("Removed destination " + destination); //$NON-NLS-1$
}
}
@@ -140,13 +140,13 @@ public abstract class AbstractTransaction implements IStoreTransaction
{
if (TRACER.isEnabled())
{
- TRACER.trace("Adding consumer " + consumer);
+ TRACER.trace("Adding consumer " + consumer); //$NON-NLS-1$
}
doConsumerAdded((ServerConsumer)consumer);
if (TRACER.isEnabled())
{
- TRACER.trace("Added consumer " + consumer);
+ TRACER.trace("Added consumer " + consumer); //$NON-NLS-1$
}
}
@@ -154,13 +154,13 @@ public abstract class AbstractTransaction implements IStoreTransaction
{
if (TRACER.isEnabled())
{
- TRACER.trace("Removing consumer " + consumer);
+ TRACER.trace("Removing consumer " + consumer); //$NON-NLS-1$
}
doConsumerRemoved((ServerConsumer)consumer);
if (TRACER.isEnabled())
{
- TRACER.trace("Removed consumer " + consumer);
+ TRACER.trace("Removed consumer " + consumer); //$NON-NLS-1$
}
}
@@ -168,13 +168,13 @@ public abstract class AbstractTransaction implements IStoreTransaction
{
if (TRACER.isEnabled())
{
- TRACER.trace("Logging received message " + message);
+ TRACER.trace("Logging received message " + message); //$NON-NLS-1$
}
doMessageReceived((MessageImpl)message);
if (TRACER.isEnabled())
{
- TRACER.trace("Logged received message " + message);
+ TRACER.trace("Logged received message " + message); //$NON-NLS-1$
}
}
@@ -182,13 +182,13 @@ public abstract class AbstractTransaction implements IStoreTransaction
{
if (TRACER.isEnabled())
{
- TRACER.trace("Logging sent message " + message);
+ TRACER.trace("Logging sent message " + message); //$NON-NLS-1$
}
doMessageSent((MessageImpl)message, consumerID);
if (TRACER.isEnabled())
{
- TRACER.trace("Logged sent message " + message);
+ TRACER.trace("Logged sent message " + message); //$NON-NLS-1$
}
}
@@ -196,13 +196,13 @@ public abstract class AbstractTransaction implements IStoreTransaction
{
if (TRACER.isEnabled())
{
- TRACER.trace("Logging acknowledged message " + message);
+ TRACER.trace("Logging acknowledged message " + message); //$NON-NLS-1$
}
doMessageAcknowledged((MessageImpl)message, consumerID);
if (TRACER.isEnabled())
{
- TRACER.trace("Logged acknowledged message " + message);
+ TRACER.trace("Logged acknowledged message " + message); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/NOOPStore.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/NOOPStore.java
index fc149c064e..083d917127 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/NOOPStore.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/NOOPStore.java
@@ -17,7 +17,7 @@ import org.eclipse.net4j.jms.server.IStoreTransaction;
*/
public class NOOPStore extends AbstractStore
{
- private static final String STORE_TYPE = "NOOP";
+ private static final String STORE_TYPE = "NOOP"; //$NON-NLS-1$
public NOOPStore()
{
diff --git a/plugins/org.eclipse.net4j.jms.tests/src/org/eclipse/net4j/jms/tests/JMSSeparatedTest.java b/plugins/org.eclipse.net4j.jms.tests/src/org/eclipse/net4j/jms/tests/JMSSeparatedTest.java
index db72e24196..08100d24ca 100644
--- a/plugins/org.eclipse.net4j.jms.tests/src/org/eclipse/net4j/jms/tests/JMSSeparatedTest.java
+++ b/plugins/org.eclipse.net4j.jms.tests/src/org/eclipse/net4j/jms/tests/JMSSeparatedTest.java
@@ -50,8 +50,8 @@ public class JMSSeparatedTest
try
{
Context context = init();
- ConnectionFactory connectionFactory = (ConnectionFactory)context.lookup("net4j.jms.ConnectionFactory");
- Destination destination = (Destination)context.lookup("StockTopic");
+ ConnectionFactory connectionFactory = (ConnectionFactory)context.lookup("net4j.jms.ConnectionFactory"); //$NON-NLS-1$
+ Destination destination = (Destination)context.lookup("StockTopic"); //$NON-NLS-1$
Connection connection = connectionFactory.createConnection();
Session session = connection.createSession(true, 0);
@@ -59,15 +59,15 @@ public class JMSSeparatedTest
MessageProducer publisher = session.createProducer(destination);
MessageConsumer subscriber1 = session.createConsumer(destination);
MessageConsumer subscriber2 = session.createConsumer(destination);
- subscriber1.setMessageListener(new MessageLogger("subscriber1"));
- subscriber2.setMessageListener(new MessageLogger("subscriber2"));
+ subscriber1.setMessageListener(new MessageLogger("subscriber1")); //$NON-NLS-1$
+ subscriber2.setMessageListener(new MessageLogger("subscriber2")); //$NON-NLS-1$
connection.start();
- publisher.send(session.createObjectMessage("Message 1"));
- publisher.send(session.createObjectMessage("Message 2"));
- publisher.send(session.createObjectMessage("Message 3"));
- publisher.send(session.createObjectMessage("Message 4"));
+ publisher.send(session.createObjectMessage("Message 1")); //$NON-NLS-1$
+ publisher.send(session.createObjectMessage("Message 2")); //$NON-NLS-1$
+ publisher.send(session.createObjectMessage("Message 3")); //$NON-NLS-1$
+ publisher.send(session.createObjectMessage("Message 4")); //$NON-NLS-1$
session.commit();
}
@@ -109,11 +109,11 @@ public class JMSSeparatedTest
Net4jUtil.prepareContainer(clientContainer);
TCPUtil.prepareContainer(clientContainer);
- IConnector connector = TCPUtil.getConnector(clientContainer, "localhost");
+ IConnector connector = TCPUtil.getConnector(clientContainer, "localhost"); //$NON-NLS-1$
IJMSAdmin admin = JMSAdminUtil.createAdmin(connector);
- admin.createQueue("StockQueue");
- admin.createTopic("StockTopic");
+ admin.createQueue("StockQueue"); //$NON-NLS-1$
+ admin.createTopic("StockTopic"); //$NON-NLS-1$
return new JMSInitialContext(clientContainer);
}
@@ -135,7 +135,7 @@ public class JMSSeparatedTest
try
{
Object object = ((ObjectMessage)message).getObject();
- IOUtil.OUT().println("\n------> MESSAGE for " + name + ": " + object + "\n");
+ IOUtil.OUT().println("\n------> MESSAGE for " + name + ": " + object + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
message.acknowledge();
}
catch (JMSException ex)
diff --git a/plugins/org.eclipse.net4j.jms.tests/src/org/eclipse/net4j/jms/tests/JMSTest.java b/plugins/org.eclipse.net4j.jms.tests/src/org/eclipse/net4j/jms/tests/JMSTest.java
index f39c2bed94..af49184b3c 100644
--- a/plugins/org.eclipse.net4j.jms.tests/src/org/eclipse/net4j/jms/tests/JMSTest.java
+++ b/plugins/org.eclipse.net4j.jms.tests/src/org/eclipse/net4j/jms/tests/JMSTest.java
@@ -49,8 +49,8 @@ public class JMSTest
try
{
Context context = init();
- ConnectionFactory connectionFactory = (ConnectionFactory)context.lookup("net4j.jms.ConnectionFactory");
- Destination destination = (Destination)context.lookup("StockTopic");
+ ConnectionFactory connectionFactory = (ConnectionFactory)context.lookup("net4j.jms.ConnectionFactory"); //$NON-NLS-1$
+ Destination destination = (Destination)context.lookup("StockTopic"); //$NON-NLS-1$
Connection connection = connectionFactory.createConnection();
Session session = connection.createSession(true, 0);
@@ -58,15 +58,15 @@ public class JMSTest
MessageProducer publisher = session.createProducer(destination);
MessageConsumer subscriber1 = session.createConsumer(destination);
MessageConsumer subscriber2 = session.createConsumer(destination);
- subscriber1.setMessageListener(new MessageLogger("subscriber1"));
- subscriber2.setMessageListener(new MessageLogger("subscriber2"));
+ subscriber1.setMessageListener(new MessageLogger("subscriber1")); //$NON-NLS-1$
+ subscriber2.setMessageListener(new MessageLogger("subscriber2")); //$NON-NLS-1$
connection.start();
- publisher.send(session.createObjectMessage("Message 1"));
- publisher.send(session.createObjectMessage("Message 2"));
- publisher.send(session.createObjectMessage("Message 3"));
- publisher.send(session.createObjectMessage("Message 4"));
+ publisher.send(session.createObjectMessage("Message 1")); //$NON-NLS-1$
+ publisher.send(session.createObjectMessage("Message 2")); //$NON-NLS-1$
+ publisher.send(session.createObjectMessage("Message 3")); //$NON-NLS-1$
+ publisher.send(session.createObjectMessage("Message 4")); //$NON-NLS-1$
session.commit();
}
@@ -94,11 +94,11 @@ public class JMSTest
JMSServerUtil.prepareContainer(container);
TCPUtil.getAcceptor(container, null);
- IConnector connector = TCPUtil.getConnector(container, "localhost");
+ IConnector connector = TCPUtil.getConnector(container, "localhost"); //$NON-NLS-1$
IJMSAdmin admin = JMSAdminUtil.createAdmin(connector);
- admin.createQueue("StockQueue");
- admin.createTopic("StockTopic");
+ admin.createQueue("StockQueue"); //$NON-NLS-1$
+ admin.createTopic("StockTopic"); //$NON-NLS-1$
return new JMSInitialContext(container);
}
@@ -120,7 +120,7 @@ public class JMSTest
try
{
Object object = ((ObjectMessage)message).getObject();
- IOUtil.OUT().println("\n------> MESSAGE for " + name + ": " + object + "\n");
+ IOUtil.OUT().println("\n------> MESSAGE for " + name + ": " + object + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
message.acknowledge();
}
catch (JMSException ex)
diff --git a/plugins/org.eclipse.net4j.jms/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.jms/META-INF/MANIFEST.MF
index 74c5844412..8845840b58 100644
--- a/plugins/org.eclipse.net4j.jms/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.jms/META-INF/MANIFEST.MF
@@ -14,6 +14,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
Import-Package: javax.jms;version="1.1.0"
Export-Package: org.eclipse.net4j.internal.jms;version="2.0.0",
org.eclipse.net4j.internal.jms.bundle;version="2.0.0";x-internal:=true,
+ org.eclipse.net4j.internal.jms.messages;x-internal:=true,
org.eclipse.net4j.internal.jms.protocol;version="2.0.0",
org.eclipse.net4j.internal.jms.util;version="2.0.0",
org.eclipse.net4j.jms;version="2.0.0"
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/ConnectionImpl.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/ConnectionImpl.java
index 12d49bcaf2..45e0f2c3da 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/ConnectionImpl.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/ConnectionImpl.java
@@ -14,6 +14,7 @@ import org.eclipse.net4j.Net4jUtil;
import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.connector.IConnector;
import org.eclipse.net4j.internal.jms.bundle.OM;
+import org.eclipse.net4j.internal.jms.messages.Messages;
import org.eclipse.net4j.internal.jms.protocol.JMSClientProtocol;
import org.eclipse.net4j.internal.jms.protocol.JMSLogonRequest;
import org.eclipse.net4j.internal.jms.protocol.JMSOpenSessionRequest;
@@ -100,7 +101,7 @@ public class ConnectionImpl extends Container<Session> implements Connection
this.transportContainer = transportContainer == null ? JMSUtil.getTransportContainer() : transportContainer;
if (transportContainer == null)
{
- throw new JMSException("No transport container available");
+ throw new JMSException(Messages.getString("ConnectionImpl_0")); //$NON-NLS-1$
}
this.connectorType = connectorType;
@@ -117,7 +118,7 @@ public class ConnectionImpl extends Container<Session> implements Connection
{
if (!new JMSLogonRequest(protocol, userName, password).send())
{
- throw new JMSException("Server rejected logon request");
+ throw new JMSException(Messages.getString("ConnectionImpl_1")); //$NON-NLS-1$
}
}
catch (JMSException ex)
@@ -154,7 +155,7 @@ public class ConnectionImpl extends Container<Session> implements Connection
{
if (!new JMSOpenSessionRequest(protocol, sessionID).send())
{
- throw new JMSException("Server rejected open session request");
+ throw new JMSException(Messages.getString("ConnectionImpl_2")); //$NON-NLS-1$
}
}
catch (JMSException ex)
@@ -213,12 +214,12 @@ public class ConnectionImpl extends Container<Session> implements Connection
ensureOpen();
if (clientID != null)
{
- throw new IllegalStateException("clientID != null");
+ throw new IllegalStateException("clientID != null"); //$NON-NLS-1$
}
if (modified)
{
- throw new IllegalStateException("modified == true");
+ throw new IllegalStateException("modified == true"); //$NON-NLS-1$
}
this.clientID = clientID;
@@ -400,7 +401,7 @@ public class ConnectionImpl extends Container<Session> implements Connection
{
if (protocol == null)
{
- throw new IllegalStateException("protocol == null");
+ throw new IllegalStateException("protocol == null"); //$NON-NLS-1$
}
}
}
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/ConnectionMetaDataImpl.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/ConnectionMetaDataImpl.java
index 503b4ff172..9829213437 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/ConnectionMetaDataImpl.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/ConnectionMetaDataImpl.java
@@ -41,12 +41,12 @@ public class ConnectionMetaDataImpl implements ConnectionMetaData
public String getJMSVersion()
{
- return "1.1";
+ return "1.1"; //$NON-NLS-1$
}
public String getJMSProviderName()
{
- return "Net4j JMS";
+ return "Net4j JMS"; //$NON-NLS-1$
}
public int getProviderMajorVersion()
@@ -61,11 +61,11 @@ public class ConnectionMetaDataImpl implements ConnectionMetaData
public String getProviderVersion()
{
- return "0.8.0";
+ return "0.8.0"; //$NON-NLS-1$
}
public Enumeration<?> getJMSXPropertyNames()
{
- return new StringTokenizer("");
+ return new StringTokenizer(""); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/MessageConsumerImpl.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/MessageConsumerImpl.java
index 5b445ec7c4..81642cc924 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/MessageConsumerImpl.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/MessageConsumerImpl.java
@@ -11,6 +11,7 @@
package org.eclipse.net4j.internal.jms;
import org.eclipse.net4j.internal.jms.bundle.OM;
+import org.eclipse.net4j.internal.jms.messages.Messages;
import org.eclipse.net4j.util.lifecycle.Lifecycle;
import javax.jms.JMSException;
@@ -93,7 +94,7 @@ public class MessageConsumerImpl extends Lifecycle implements MessageConsumer
{
if (messageListener != null)
{
- throw new JMSException("Consumer is configured for asynchronous delivery");
+ throw new JMSException(Messages.getString("MessageConsumerImpl.0")); //$NON-NLS-1$
}
if (timeout == DO_NOT_WAIT)
@@ -138,7 +139,7 @@ public class MessageConsumerImpl extends Lifecycle implements MessageConsumer
MessageImpl message = messages.poll();
if (message == null)
{
- OM.LOG.warn("No message to dispatch");
+ OM.LOG.warn(Messages.getString("MessageConsumerImpl.1")); //$NON-NLS-1$
return;
}
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/MessageImpl.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/MessageImpl.java
index 5eee6bddab..00d3ce4cb5 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/MessageImpl.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/MessageImpl.java
@@ -10,6 +10,7 @@
*/
package org.eclipse.net4j.internal.jms;
+import org.eclipse.net4j.internal.jms.messages.Messages;
import org.eclipse.net4j.internal.jms.util.DestinationUtil;
import org.eclipse.net4j.internal.jms.util.TypeUtil;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
@@ -22,6 +23,7 @@ import javax.jms.MessageFormatException;
import javax.jms.Session;
import java.io.IOException;
+import java.text.MessageFormat;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
@@ -30,8 +32,8 @@ import java.util.Map.Entry;
public class MessageImpl implements Message, Comparable<MessageImpl>
{
- private static final String[] KEYWORDS = { "and", "between", "escape", "in", "is", "like", "false", "null", "or",
- "not", "true" };
+ private static final String[] KEYWORDS = { "and", "between", "escape", "in", "is", "like", "false", "null", "or", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "not", "true" }; //$NON-NLS-1$ //$NON-NLS-2$
private Map<String, Object> properties = new HashMap<String, Object>();
@@ -308,7 +310,8 @@ public class MessageImpl implements Message, Comparable<MessageImpl>
}
else
{
- throw new MessageFormatException("Values of type" + value.getClass().getName() + " are not supported");
+ throw new MessageFormatException(MessageFormat.format(
+ Messages.getString("MessageImpl_11"), value.getClass().getName())); //$NON-NLS-1$
}
}
@@ -316,25 +319,25 @@ public class MessageImpl implements Message, Comparable<MessageImpl>
{
if (name == null)
{
- throw new JMSException("Invalid property name: " + name);
+ throw new JMSException(MessageFormat.format(Messages.getString("MessageImpl_13"), name)); //$NON-NLS-1$
}
char[] chars = name.toCharArray();
if (chars.length == 0)
{
- throw new JMSException("Invalid property name: " + name);
+ throw new JMSException(MessageFormat.format(Messages.getString("MessageImpl_13"), name)); //$NON-NLS-1$
}
if (!Character.isJavaIdentifierStart(chars[0]))
{
- throw new JMSException("Invalid property name: " + name);
+ throw new JMSException(MessageFormat.format(Messages.getString("MessageImpl_13"), name)); //$NON-NLS-1$
}
for (int i = 1; i < chars.length; ++i)
{
if (!Character.isJavaIdentifierPart(chars[i]))
{
- throw new JMSException("Invalid property name: " + name);
+ throw new JMSException(MessageFormat.format(Messages.getString("MessageImpl_13"), name)); //$NON-NLS-1$
}
}
@@ -342,7 +345,7 @@ public class MessageImpl implements Message, Comparable<MessageImpl>
{
if (name.equalsIgnoreCase(KEYWORDS[i]))
{
- throw new JMSException("Invalid property name: " + name);
+ throw new JMSException(MessageFormat.format(Messages.getString("MessageImpl_13"), name)); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/MessageProducerImpl.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/MessageProducerImpl.java
index 914baab840..54655075fe 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/MessageProducerImpl.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/MessageProducerImpl.java
@@ -10,6 +10,7 @@
*/
package org.eclipse.net4j.internal.jms;
+import org.eclipse.net4j.internal.jms.messages.Messages;
import org.eclipse.net4j.util.lifecycle.Lifecycle;
import javax.jms.DeliveryMode;
@@ -123,7 +124,7 @@ public class MessageProducerImpl extends Lifecycle implements MessageProducer
{
if (message == null)
{
- throw new MessageFormatException("Null message");
+ throw new MessageFormatException(Messages.getString("MessageProducerImpl_0")); //$NON-NLS-1$
}
// message.setJMSMessageID(MessageId.create());
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/SessionImpl.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/SessionImpl.java
index 64b025c449..73760b08a9 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/SessionImpl.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/SessionImpl.java
@@ -11,6 +11,7 @@
package org.eclipse.net4j.internal.jms;
import org.eclipse.net4j.internal.jms.bundle.OM;
+import org.eclipse.net4j.internal.jms.messages.Messages;
import org.eclipse.net4j.internal.jms.protocol.JMSAcknowledgeRequest;
import org.eclipse.net4j.internal.jms.protocol.JMSClientMessageRequest;
import org.eclipse.net4j.internal.jms.protocol.JMSCommitRequest;
@@ -43,6 +44,7 @@ import javax.jms.TopicSubscriber;
import javax.transaction.TransactionRolledbackException;
import java.io.Serializable;
+import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
@@ -260,7 +262,7 @@ public class SessionImpl extends QueueWorker<MessageConsumerImpl> implements Ses
String[] messageIDs = new JMSCommitRequest(connection.getProtocol(), id, messages).send();
if (messageIDs == null)
{
- throw new TransactionRolledbackException("Transaction rolled back by JMS server");
+ throw new TransactionRolledbackException(Messages.getString("SessionImpl_0")); //$NON-NLS-1$
}
for (int i = 0; i < messageIDs.length; i++)
@@ -294,7 +296,7 @@ public class SessionImpl extends QueueWorker<MessageConsumerImpl> implements Ses
{
if (!new JMSRollbackRequest(connection.getProtocol(), id).send())
{
- throw new JMSException("JMS server failed to rolled back transaction");
+ throw new JMSException(Messages.getString("SessionImpl_1")); //$NON-NLS-1$
}
messages.clear();
@@ -363,7 +365,7 @@ public class SessionImpl extends QueueWorker<MessageConsumerImpl> implements Ses
String messageID = request.send(connection.getSendTimeout());
if (messageID == null)
{
- throw new JMSException("Message not accepted by JMS server");
+ throw new JMSException(Messages.getString("SessionImpl_2")); //$NON-NLS-1$
}
message.setJMSMessageID(messageID);
@@ -403,7 +405,7 @@ public class SessionImpl extends QueueWorker<MessageConsumerImpl> implements Ses
MessageConsumerImpl consumer = consumers.get(consumerID);
if (consumer == null)
{
- OM.LOG.warn("Consumer " + consumerID + " not found. Discarding message.");
+ OM.LOG.warn(MessageFormat.format(Messages.getString("SessionImpl_3"), consumerID)); //$NON-NLS-1$
return;
}
@@ -413,7 +415,7 @@ public class SessionImpl extends QueueWorker<MessageConsumerImpl> implements Ses
@Override
protected String getThreadName()
{
- return "jms-session";
+ return "jms-session"; //$NON-NLS-1$
}
/**
@@ -429,7 +431,7 @@ public class SessionImpl extends QueueWorker<MessageConsumerImpl> implements Ses
{
if (!transacted)
{
- throw new IllegalStateException("Session " + id + " not transacted");
+ throw new IllegalStateException("Session " + id + " not transacted"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -437,7 +439,7 @@ public class SessionImpl extends QueueWorker<MessageConsumerImpl> implements Ses
{
if (transacted)
{
- throw new IllegalStateException("Session " + id + " transacted");
+ throw new IllegalStateException("Session " + id + " transacted"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/TemporaryQueueImpl.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/TemporaryQueueImpl.java
index 17dc6b1c66..cabdc70696 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/TemporaryQueueImpl.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/TemporaryQueueImpl.java
@@ -20,7 +20,7 @@ public class TemporaryQueueImpl extends QueueImpl implements TemporaryQueue
public TemporaryQueueImpl()
{
- super("TempQueue" + ++counter);
+ super("TempQueue" + ++counter); //$NON-NLS-1$
}
public void delete()
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/TemporaryTopicImpl.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/TemporaryTopicImpl.java
index 3a73921789..dbf8a4bff4 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/TemporaryTopicImpl.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/TemporaryTopicImpl.java
@@ -20,7 +20,7 @@ public class TemporaryTopicImpl extends TopicImpl implements TemporaryTopic
public TemporaryTopicImpl()
{
- super("TempTopic" + ++counter);
+ super("TempTopic" + ++counter); //$NON-NLS-1$
}
public void delete()
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/messages/Messages.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/messages/Messages.java
new file mode 100644
index 0000000000..795cbc369b
--- /dev/null
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/messages/Messages.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * 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:
+ * Victor Roldan Betancort - initial API and implementation
+ * Eike Stepper - maintenance
+ */
+package org.eclipse.net4j.internal.jms.messages;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * @author Victor Roldan Betancort
+ */
+public class Messages
+{
+ private static final String BUNDLE_NAME = "org.eclipse.net4j.internal.jms.messages.messages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+ private Messages()
+ {
+ }
+
+ public static String getString(String key)
+ {
+ try
+ {
+ return RESOURCE_BUNDLE.getString(key);
+ }
+ catch (MissingResourceException e)
+ {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/messages/messages.properties b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/messages/messages.properties
new file mode 100644
index 0000000000..87c850cef3
--- /dev/null
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/messages/messages.properties
@@ -0,0 +1,22 @@
+# Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others.
+# All rights reserved. This program and the accompanying materials
+# 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:
+# Victor Roldan Betancort - initial API and implementation
+# Eike Stepper - maintenance
+
+ConnectionImpl_0=No transport container available
+ConnectionImpl_1=Server rejected logon request
+ConnectionImpl_2=Server rejected open session request
+MessageConsumerImpl.0=Consumer is configured for asynchronous delivery
+MessageConsumerImpl.1=No message to dispatch
+MessageImpl_11=Values of type {0} are not supported
+MessageImpl_13=Invalid property name {0}
+MessageProducerImpl_0=Null message
+SessionImpl_0=Transaction rolled back by JMS server
+SessionImpl_1=JMS server failed to rolled back transaction
+SessionImpl_2=Message not accepted by JMS server
+SessionImpl_3=Consumer {0} not found. Discarding message.
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/util/DestinationUtil.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/util/DestinationUtil.java
index cf40e3e858..2574caf497 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/util/DestinationUtil.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/util/DestinationUtil.java
@@ -47,7 +47,7 @@ public final class DestinationUtil
return JMSProtocolConstants.DESTINATION_TYPE_NULL;
}
- throw new IllegalArgumentException("destination: " + destination);
+ throw new IllegalArgumentException("destination: " + destination); //$NON-NLS-1$
}
public static String getTypeName(byte type)
@@ -55,16 +55,16 @@ public final class DestinationUtil
switch (type)
{
case JMSProtocolConstants.DESTINATION_TYPE_NULL:
- return "NULL_DESTINATION";
+ return "NULL_DESTINATION"; //$NON-NLS-1$
case JMSProtocolConstants.DESTINATION_TYPE_QUEUE:
- return "QUEUE_DESTINATION";
+ return "QUEUE_DESTINATION"; //$NON-NLS-1$
case JMSProtocolConstants.DESTINATION_TYPE_TOPIC:
- return "TOPIC_DESTINATION";
+ return "TOPIC_DESTINATION"; //$NON-NLS-1$
}
- throw new IllegalArgumentException("type: " + type);
+ throw new IllegalArgumentException("type: " + type); //$NON-NLS-1$
}
public static String getName(Destination destination) throws JMSException
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/util/MessageUtil.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/util/MessageUtil.java
index b41b6e60b4..475cf39ee8 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/util/MessageUtil.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/util/MessageUtil.java
@@ -67,7 +67,7 @@ public final class MessageUtil
return JMSProtocolConstants.MESSAGE_TYPE_TEXT;
}
- throw new IllegalArgumentException("message: " + message);
+ throw new IllegalArgumentException("message: " + message); //$NON-NLS-1$
}
public static String getTypeName(byte type)
@@ -75,22 +75,22 @@ public final class MessageUtil
switch (type)
{
case JMSProtocolConstants.MESSAGE_TYPE_BYTES:
- return "BYTES_MESSAGE";
+ return "BYTES_MESSAGE"; //$NON-NLS-1$
case JMSProtocolConstants.MESSAGE_TYPE_MAP:
- return "MAP_MESSAGE";
+ return "MAP_MESSAGE"; //$NON-NLS-1$
case JMSProtocolConstants.MESSAGE_TYPE_OBJECT:
- return "OBJECT_MESSAGE";
+ return "OBJECT_MESSAGE"; //$NON-NLS-1$
case JMSProtocolConstants.MESSAGE_TYPE_STREAM:
- return "STREAM_MESSAGE";
+ return "STREAM_MESSAGE"; //$NON-NLS-1$
case JMSProtocolConstants.MESSAGE_TYPE_TEXT:
- return "TEXT_MESSAGE";
+ return "TEXT_MESSAGE"; //$NON-NLS-1$
}
- throw new IllegalArgumentException("type: " + type);
+ throw new IllegalArgumentException("type: " + type); //$NON-NLS-1$
}
public static MessageImpl create(byte type)
@@ -113,7 +113,7 @@ public final class MessageUtil
return new TextMessageImpl();
}
- throw new IllegalArgumentException("type: " + type);
+ throw new IllegalArgumentException("type: " + type); //$NON-NLS-1$
}
public static MessageImpl copy(Message source) throws JMSException
@@ -139,7 +139,7 @@ public final class MessageUtil
byte type = getType(message);
if (TRACER.isEnabled())
{
- TRACER.format("Writing {0}", getTypeName(type));
+ TRACER.format("Writing {0}", getTypeName(type)); //$NON-NLS-1$
}
out.writeByte(type);
@@ -151,7 +151,7 @@ public final class MessageUtil
byte type = in.readByte();
if (TRACER.isEnabled())
{
- TRACER.format("Reading {0}", getTypeName(type));
+ TRACER.format("Reading {0}", getTypeName(type)); //$NON-NLS-1$
}
MessageImpl message = create(type);
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/util/TypeUtil.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/util/TypeUtil.java
index 7c8d21e1c6..60fcf17c83 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/util/TypeUtil.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/util/TypeUtil.java
@@ -36,7 +36,7 @@ public final class TypeUtil
}
else if (value == null)
{
- throw new IllegalArgumentException("value == null");
+ throw new IllegalArgumentException("value == null"); //$NON-NLS-1$
}
throw new MessageFormatException(conversionProblem(boolean.class, value));
@@ -54,7 +54,7 @@ public final class TypeUtil
}
else if (value == null)
{
- throw new IllegalArgumentException("value == null");
+ throw new IllegalArgumentException("value == null"); //$NON-NLS-1$
}
throw new MessageFormatException(conversionProblem(byte.class, value));
@@ -76,7 +76,7 @@ public final class TypeUtil
}
else if (value == null)
{
- throw new IllegalArgumentException("value == null");
+ throw new IllegalArgumentException("value == null"); //$NON-NLS-1$
}
throw new MessageFormatException(conversionProblem(short.class, value));
@@ -90,7 +90,7 @@ public final class TypeUtil
}
else if (value == null)
{
- throw new IllegalArgumentException("value == null");
+ throw new IllegalArgumentException("value == null"); //$NON-NLS-1$
}
throw new MessageFormatException(conversionProblem(char.class, value));
@@ -116,7 +116,7 @@ public final class TypeUtil
}
else if (value == null)
{
- throw new IllegalArgumentException("value == null");
+ throw new IllegalArgumentException("value == null"); //$NON-NLS-1$
}
throw new MessageFormatException(conversionProblem(int.class, value));
@@ -146,7 +146,7 @@ public final class TypeUtil
}
else if (value == null)
{
- throw new IllegalArgumentException("value == null");
+ throw new IllegalArgumentException("value == null"); //$NON-NLS-1$
}
throw new MessageFormatException(conversionProblem(long.class, value));
@@ -164,7 +164,7 @@ public final class TypeUtil
}
else if (value == null)
{
- throw new IllegalArgumentException("value == null");
+ throw new IllegalArgumentException("value == null"); //$NON-NLS-1$
}
throw new MessageFormatException(conversionProblem(float.class, value));
@@ -186,7 +186,7 @@ public final class TypeUtil
}
else if (value == null)
{
- throw new IllegalArgumentException("value == null");
+ throw new IllegalArgumentException("value == null"); //$NON-NLS-1$
}
throw new MessageFormatException(conversionProblem(double.class, value));
@@ -200,7 +200,7 @@ public final class TypeUtil
}
else if (value == null)
{
- throw new IllegalArgumentException("value == null");
+ throw new IllegalArgumentException("value == null"); //$NON-NLS-1$
}
return String.valueOf(value);
@@ -216,7 +216,7 @@ public final class TypeUtil
}
else if (value == null)
{
- throw new IllegalArgumentException("value == null");
+ throw new IllegalArgumentException("value == null"); //$NON-NLS-1$
}
throw new MessageFormatException(conversionProblem(byte[].class, value));
@@ -265,7 +265,7 @@ public final class TypeUtil
out.writeString((String)value);
}
- throw new IllegalArgumentException("value: " + value);
+ throw new IllegalArgumentException("value: " + value); //$NON-NLS-1$
}
public static Object read(ExtendedDataInputStream in) throws IOException
@@ -291,11 +291,11 @@ public final class TypeUtil
return in.readString();
}
- throw new IOException("Invalid type: " + type);
+ throw new IOException("Invalid type: " + type); //$NON-NLS-1$
}
private static String conversionProblem(Class<?> type, Object value)
{
- return "Cannot convert values of type " + value.getClass().getName() + " to " + type.getName();
+ return "Cannot convert values of type " + value.getClass().getName() + " to " + type.getName(); //$NON-NLS-1$ //$NON-NLS-2$
}
}
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/jms/JMSAdminProtocolConstants.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/jms/JMSAdminProtocolConstants.java
index f93d45936b..40361c65e0 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/jms/JMSAdminProtocolConstants.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/jms/JMSAdminProtocolConstants.java
@@ -15,7 +15,7 @@ package org.eclipse.net4j.jms;
*/
public interface JMSAdminProtocolConstants
{
- public static final String PROTOCOL_NAME = "jmsadmin";
+ public static final String PROTOCOL_NAME = "jmsadmin"; //$NON-NLS-1$
public static final short SIGNAL_CREATE_DESTINATION = 1;
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/jms/JMSProtocolConstants.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/jms/JMSProtocolConstants.java
index 64eaa37b67..85cd08421b 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/jms/JMSProtocolConstants.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/jms/JMSProtocolConstants.java
@@ -15,7 +15,7 @@ package org.eclipse.net4j.jms;
*/
public interface JMSProtocolConstants
{
- public static final String PROTOCOL_NAME = "jms";
+ public static final String PROTOCOL_NAME = "jms"; //$NON-NLS-1$
// Signals
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/jms/JMSUtil.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/jms/JMSUtil.java
index c76b9215b6..4c0559c318 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/jms/JMSUtil.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/jms/JMSUtil.java
@@ -30,7 +30,7 @@ public final class JMSUtil
{
if (transportContainer == null)
{
- throw new IllegalStateException("transportContainer == null");
+ throw new IllegalStateException("transportContainer == null"); //$NON-NLS-1$
}
return new JMSInitialContext(transportContainer);

Back to the top