Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-07-19 08:22:04 +0000
committerEike Stepper2012-07-19 08:22:04 +0000
commit1460904fd3c193ffaf809913b2983a400fce9d94 (patch)
tree72f3a17b75fedba3ae1060df1d32c9c7889be954 /plugins/org.eclipse.net4j.jms.server
parent5f360965ae87478e0681899bf310a210cafc2c44 (diff)
downloadcdo-1460904fd3c193ffaf809913b2983a400fce9d94.tar.gz
cdo-1460904fd3c193ffaf809913b2983a400fce9d94.tar.xz
cdo-1460904fd3c193ffaf809913b2983a400fce9d94.zip
Fix line endings in master (dos2unix)
Diffstat (limited to 'plugins/org.eclipse.net4j.jms.server')
-rw-r--r--plugins/org.eclipse.net4j.jms.server/.settings/org.eclipse.core.resources.prefs6
-rw-r--r--plugins/org.eclipse.net4j.jms.server/copyright.txt14
-rw-r--r--plugins/org.eclipse.net4j.jms.server/plugin.properties22
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/Server.java470
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConnection.java230
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConsumer.java296
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerDestination.java254
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerSession.java226
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/bundle/OM.java118
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/messages/Messages.java82
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/messages/messages.properties34
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSAcknowledgeIndication.java98
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSClientMessageIndication.java106
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSCommitIndication.java154
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSLogonIndication.java114
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSOpenSessionIndication.java100
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRecoverIndication.java108
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRegisterConsumerIndication.java106
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRollbackIndication.java110
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerMessageRequest.java90
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocol.java128
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocolFactory.java78
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSSyncIndication.java76
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocol.java90
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocolFactory.java78
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSCreateDestinationIndication.java130
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/AbstractStore.java88
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/AbstractTransaction.java460
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/NOOPStore.java80
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/NOOPTransaction.java170
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/StoreException.java76
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IConnection.java50
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IDestination.java58
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IServer.java50
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IServerConsumer.java68
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/ISession.java42
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IStore.java54
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IStoreTransaction.java136
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/JMSServerUtil.java74
39 files changed, 2362 insertions, 2362 deletions
diff --git a/plugins/org.eclipse.net4j.jms.server/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.net4j.jms.server/.settings/org.eclipse.core.resources.prefs
index f7d9e1f7dc..08d1ab430d 100644
--- a/plugins/org.eclipse.net4j.jms.server/.settings/org.eclipse.core.resources.prefs
+++ b/plugins/org.eclipse.net4j.jms.server/.settings/org.eclipse.core.resources.prefs
@@ -1,3 +1,3 @@
-#Mon Jul 04 12:57:30 CEST 2011
-eclipse.preferences.version=1
-encoding//model/org.eclipse.emf.cdo.defs.ecorediag=UTF-8
+#Mon Jul 04 12:57:30 CEST 2011
+eclipse.preferences.version=1
+encoding//model/org.eclipse.emf.cdo.defs.ecorediag=UTF-8
diff --git a/plugins/org.eclipse.net4j.jms.server/copyright.txt b/plugins/org.eclipse.net4j.jms.server/copyright.txt
index 8f6328980e..0a0f67e6d7 100644
--- a/plugins/org.eclipse.net4j.jms.server/copyright.txt
+++ b/plugins/org.eclipse.net4j.jms.server/copyright.txt
@@ -1,8 +1,8 @@
-Copyright (c) 2004 - 2012 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:
+Copyright (c) 2004 - 2012 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:
Eike Stepper - initial API and implementation \ No newline at end of file
diff --git a/plugins/org.eclipse.net4j.jms.server/plugin.properties b/plugins/org.eclipse.net4j.jms.server/plugin.properties
index 2a106803f4..e5bdacfa85 100644
--- a/plugins/org.eclipse.net4j.jms.server/plugin.properties
+++ b/plugins/org.eclipse.net4j.jms.server/plugin.properties
@@ -1,11 +1,11 @@
-# Copyright (c) 2004 - 2012 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:
-# Eike Stepper - initial API and implementation
-
-pluginName = Net4j JMS Provider Server
-providerName = Eclipse Modeling Project
+# Copyright (c) 2004 - 2012 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:
+# Eike Stepper - initial API and implementation
+
+pluginName = Net4j JMS Provider Server
+providerName = Eclipse Modeling Project
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 7f78f60db0..4e95accebc 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
@@ -1,235 +1,235 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server;
-
-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;
-import org.eclipse.net4j.jms.server.IStoreTransaction;
-import org.eclipse.net4j.util.HexUtil;
-import org.eclipse.net4j.util.concurrent.NonBlockingLongCounter;
-import org.eclipse.net4j.util.concurrent.QueueWorker;
-import org.eclipse.net4j.util.om.OMPlatform;
-
-import javax.jms.Destination;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-
-/**
- * @author Eike Stepper
- */
-public class Server extends QueueWorker<MessageImpl> implements IServer
-{
- public static final Server INSTANCE = new Server();
-
- private static final boolean REBIND_DESTINATIONS = true;
-
- private NonBlockingLongCounter messageIDCounter = new NonBlockingLongCounter();
-
- private NonBlockingLongCounter consumerIDCounter = new NonBlockingLongCounter();
-
- private IStore store = null;
-
- private Context jndiContext;
-
- private ConcurrentMap<String, ServerDestination> destinations = new ConcurrentHashMap<String, ServerDestination>();
-
- private Set<ServerConnection> connections = new HashSet<ServerConnection>();
-
- private ConcurrentMap<Long, ServerConsumer> consumers = new ConcurrentHashMap<Long, ServerConsumer>();
-
- public Server()
- {
- }
-
- public IStore getStore()
- {
- return store;
- }
-
- public void setStore(IStore store)
- {
- this.store = store;
- }
-
- public IDestination createDestination(String name, IDestination.Type type)
- {
- ServerDestination destination = new ServerDestination(name, type);
- ServerDestination existing = destinations.putIfAbsent(name, destination);
- if (existing != null)
- {
- throw new IllegalStateException("Destination " + type + " " + name + " does already exist"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- IStoreTransaction transaction = store.startTransaction();
- transaction.destinationAdded(destination);
- store.commitTransaction(transaction);
-
- try
- {
- destination.bind(jndiContext, REBIND_DESTINATIONS);
- }
- catch (NamingException ex)
- {
- OM.LOG.error(ex);
- destinations.remove(name);
- destination = null;
- }
-
- return destination;
- }
-
- public ServerDestination getDestination(String name)
- {
- return destinations.get(name);
- }
-
- public ServerDestination getServerDestination(Destination jmsDestination)
- {
- String name = ((JMSDestination)jmsDestination).getName();
- ServerDestination destination = destinations.get(name);
- if (destination == null)
- {
- OM.LOG.error(Messages.getString("Server.3") + name); //$NON-NLS-1$
- return null;
- }
-
- return destination;
- }
-
- public ServerConnection logon(String userName, String password)
- {
- ServerConnection connection = new ServerConnection(this, userName);
- synchronized (connections)
- {
- connections.add(connection);
- }
-
- return connection;
- }
-
- public ServerConsumer createConsumer(ServerDestination destination, String messageSelector, boolean noLocal,
- boolean durable)
- {
- long consumerID = consumerIDCounter.increment();
- ServerConsumer consumer = new ServerConsumer(consumerID, destination, messageSelector, noLocal, durable);
- consumers.put(consumer.getID(), consumer);
- return consumer;
- }
-
- public ServerConsumer getConsumer(long consumerID)
- {
- return consumers.get(consumerID);
- }
-
- public String[] handleClientMessages(MessageImpl[] messages)
- {
- IStoreTransaction transaction = store.startTransaction();
- String[] messageIDs = handleClientMessagesInTransaction(transaction, messages);
- store.commitTransaction(transaction);
- return messageIDs;
- }
-
- public String[] handleClientMessagesInTransaction(IStoreTransaction transaction, MessageImpl[] messages)
- {
- String[] messageIDs = new String[messages.length];
- for (int i = 0; i < messages.length; i++)
- {
- MessageImpl message = messages[i];
- if (getServerDestination(message.getJMSDestination()) == null)
- {
- return null;
- }
-
- messageIDs[i] = "ID:NET4J:" + HexUtil.longToHex(messageIDCounter.increment()); //$NON-NLS-1$
- message.setJMSMessageID(messageIDs[i]);
- }
-
- for (MessageImpl message : messages)
- {
- transaction.messageReceived(message);
- addWork(message);
- }
-
- return messageIDs;
- }
-
- @Override
- protected String getThreadName()
- {
- return "jms-server"; //$NON-NLS-1$
- }
-
- @Override
- protected void work(WorkContext context, MessageImpl message)
- {
- ServerDestination destination = getServerDestination(message.getJMSDestination());
- IStoreTransaction transaction = store.startTransaction();
- destination.handleClientMessage(transaction, message);
- store.commitTransaction(transaction);
- }
-
- @Override
- protected void doBeforeActivate() throws Exception
- {
- super.doBeforeActivate();
- if (store == null)
- {
- throw new IllegalStateException("store == null"); //$NON-NLS-1$
- }
- }
-
- @Override
- protected void doActivate() throws Exception
- {
- super.doActivate();
- String name = OMPlatform.INSTANCE.getProperty("net4j.jms.connection.factory.name", "net4j.jms.ConnectionFactory"); //$NON-NLS-1$ //$NON-NLS-2$
- String type = OMPlatform.INSTANCE.getProperty("net4j.jms.connector.type", "tcp"); //$NON-NLS-1$ //$NON-NLS-2$
- String desc = OMPlatform.INSTANCE.getProperty("net4j.jms.connector.description", "localhost"); //$NON-NLS-1$ //$NON-NLS-2$
-
- jndiContext = new InitialContext();
- jndiContext.rebind(name, new ConnectionFactoryImpl(type, desc));
- }
-
- @Override
- protected void doDeactivate() throws Exception
- {
- synchronized (connections)
- {
- for (ServerConnection connection : connections)
- {
- try
- {
- connection.close();
- }
- catch (Exception ex)
- {
- OM.LOG.error(ex);
- }
- }
- }
-
- jndiContext.close();
- jndiContext = null;
- super.doDeactivate();
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server;
+
+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;
+import org.eclipse.net4j.jms.server.IStoreTransaction;
+import org.eclipse.net4j.util.HexUtil;
+import org.eclipse.net4j.util.concurrent.NonBlockingLongCounter;
+import org.eclipse.net4j.util.concurrent.QueueWorker;
+import org.eclipse.net4j.util.om.OMPlatform;
+
+import javax.jms.Destination;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+/**
+ * @author Eike Stepper
+ */
+public class Server extends QueueWorker<MessageImpl> implements IServer
+{
+ public static final Server INSTANCE = new Server();
+
+ private static final boolean REBIND_DESTINATIONS = true;
+
+ private NonBlockingLongCounter messageIDCounter = new NonBlockingLongCounter();
+
+ private NonBlockingLongCounter consumerIDCounter = new NonBlockingLongCounter();
+
+ private IStore store = null;
+
+ private Context jndiContext;
+
+ private ConcurrentMap<String, ServerDestination> destinations = new ConcurrentHashMap<String, ServerDestination>();
+
+ private Set<ServerConnection> connections = new HashSet<ServerConnection>();
+
+ private ConcurrentMap<Long, ServerConsumer> consumers = new ConcurrentHashMap<Long, ServerConsumer>();
+
+ public Server()
+ {
+ }
+
+ public IStore getStore()
+ {
+ return store;
+ }
+
+ public void setStore(IStore store)
+ {
+ this.store = store;
+ }
+
+ public IDestination createDestination(String name, IDestination.Type type)
+ {
+ ServerDestination destination = new ServerDestination(name, type);
+ ServerDestination existing = destinations.putIfAbsent(name, destination);
+ if (existing != null)
+ {
+ throw new IllegalStateException("Destination " + type + " " + name + " does already exist"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ IStoreTransaction transaction = store.startTransaction();
+ transaction.destinationAdded(destination);
+ store.commitTransaction(transaction);
+
+ try
+ {
+ destination.bind(jndiContext, REBIND_DESTINATIONS);
+ }
+ catch (NamingException ex)
+ {
+ OM.LOG.error(ex);
+ destinations.remove(name);
+ destination = null;
+ }
+
+ return destination;
+ }
+
+ public ServerDestination getDestination(String name)
+ {
+ return destinations.get(name);
+ }
+
+ public ServerDestination getServerDestination(Destination jmsDestination)
+ {
+ String name = ((JMSDestination)jmsDestination).getName();
+ ServerDestination destination = destinations.get(name);
+ if (destination == null)
+ {
+ OM.LOG.error(Messages.getString("Server.3") + name); //$NON-NLS-1$
+ return null;
+ }
+
+ return destination;
+ }
+
+ public ServerConnection logon(String userName, String password)
+ {
+ ServerConnection connection = new ServerConnection(this, userName);
+ synchronized (connections)
+ {
+ connections.add(connection);
+ }
+
+ return connection;
+ }
+
+ public ServerConsumer createConsumer(ServerDestination destination, String messageSelector, boolean noLocal,
+ boolean durable)
+ {
+ long consumerID = consumerIDCounter.increment();
+ ServerConsumer consumer = new ServerConsumer(consumerID, destination, messageSelector, noLocal, durable);
+ consumers.put(consumer.getID(), consumer);
+ return consumer;
+ }
+
+ public ServerConsumer getConsumer(long consumerID)
+ {
+ return consumers.get(consumerID);
+ }
+
+ public String[] handleClientMessages(MessageImpl[] messages)
+ {
+ IStoreTransaction transaction = store.startTransaction();
+ String[] messageIDs = handleClientMessagesInTransaction(transaction, messages);
+ store.commitTransaction(transaction);
+ return messageIDs;
+ }
+
+ public String[] handleClientMessagesInTransaction(IStoreTransaction transaction, MessageImpl[] messages)
+ {
+ String[] messageIDs = new String[messages.length];
+ for (int i = 0; i < messages.length; i++)
+ {
+ MessageImpl message = messages[i];
+ if (getServerDestination(message.getJMSDestination()) == null)
+ {
+ return null;
+ }
+
+ messageIDs[i] = "ID:NET4J:" + HexUtil.longToHex(messageIDCounter.increment()); //$NON-NLS-1$
+ message.setJMSMessageID(messageIDs[i]);
+ }
+
+ for (MessageImpl message : messages)
+ {
+ transaction.messageReceived(message);
+ addWork(message);
+ }
+
+ return messageIDs;
+ }
+
+ @Override
+ protected String getThreadName()
+ {
+ return "jms-server"; //$NON-NLS-1$
+ }
+
+ @Override
+ protected void work(WorkContext context, MessageImpl message)
+ {
+ ServerDestination destination = getServerDestination(message.getJMSDestination());
+ IStoreTransaction transaction = store.startTransaction();
+ destination.handleClientMessage(transaction, message);
+ store.commitTransaction(transaction);
+ }
+
+ @Override
+ protected void doBeforeActivate() throws Exception
+ {
+ super.doBeforeActivate();
+ if (store == null)
+ {
+ throw new IllegalStateException("store == null"); //$NON-NLS-1$
+ }
+ }
+
+ @Override
+ protected void doActivate() throws Exception
+ {
+ super.doActivate();
+ String name = OMPlatform.INSTANCE.getProperty("net4j.jms.connection.factory.name", "net4j.jms.ConnectionFactory"); //$NON-NLS-1$ //$NON-NLS-2$
+ String type = OMPlatform.INSTANCE.getProperty("net4j.jms.connector.type", "tcp"); //$NON-NLS-1$ //$NON-NLS-2$
+ String desc = OMPlatform.INSTANCE.getProperty("net4j.jms.connector.description", "localhost"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ jndiContext = new InitialContext();
+ jndiContext.rebind(name, new ConnectionFactoryImpl(type, desc));
+ }
+
+ @Override
+ protected void doDeactivate() throws Exception
+ {
+ synchronized (connections)
+ {
+ for (ServerConnection connection : connections)
+ {
+ try
+ {
+ connection.close();
+ }
+ catch (Exception ex)
+ {
+ OM.LOG.error(ex);
+ }
+ }
+ }
+
+ jndiContext.close();
+ jndiContext = null;
+ super.doDeactivate();
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConnection.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConnection.java
index 87f8eea65d..b073bb1d68 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConnection.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConnection.java
@@ -1,115 +1,115 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server;
-
-import org.eclipse.net4j.jms.internal.server.protocol.JMSServerProtocol;
-import org.eclipse.net4j.jms.server.IConnection;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author Eike Stepper
- */
-public class ServerConnection implements IConnection
-{
- private Server server;
-
- private String userName;
-
- private List<ServerSession> sessions = new ArrayList<ServerSession>(0);
-
- private JMSServerProtocol protocol;
-
- public ServerConnection(Server server, String userName)
- {
- this.server = server;
- this.userName = userName;
- }
-
- public Server getServer()
- {
- return server;
- }
-
- public String getUserName()
- {
- return userName;
- }
-
- public JMSServerProtocol getProtocol()
- {
- return protocol;
- }
-
- public void setProtocol(JMSServerProtocol protocol)
- {
- this.protocol = protocol;
- }
-
- public ServerSession openSession(int sessionID)
- {
- ServerSession session = new ServerSession(this, sessionID);
- synchronized (sessions)
- {
- while (sessionID >= sessions.size())
- {
- sessions.add(null);
- }
-
- sessions.set(sessionID, session);
- }
-
- return session;
- }
-
- public ServerSession getSession(int sessionID)
- {
- return sessions.get(sessionID);
- }
-
- public ServerSession[] getSessions()
- {
- List<ServerSession> result = new ArrayList<ServerSession>(sessions.size());
- synchronized (sessions)
- {
- for (ServerSession session : sessions)
- {
- if (session != null)
- {
- result.add(session);
- }
- }
- }
-
- return result.toArray(new ServerSession[result.size()]);
- }
-
- public void close()
- {
- protocol.getChannel().close();
- }
-
- protected boolean removeSession(ServerSession session)
- {
- synchronized (sessions)
- {
- int sessionID = session.getID();
- if (sessions.get(sessionID) == session)
- {
- sessions.set(sessionID, null);
- return true;
- }
-
- return false;
- }
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server;
+
+import org.eclipse.net4j.jms.internal.server.protocol.JMSServerProtocol;
+import org.eclipse.net4j.jms.server.IConnection;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Eike Stepper
+ */
+public class ServerConnection implements IConnection
+{
+ private Server server;
+
+ private String userName;
+
+ private List<ServerSession> sessions = new ArrayList<ServerSession>(0);
+
+ private JMSServerProtocol protocol;
+
+ public ServerConnection(Server server, String userName)
+ {
+ this.server = server;
+ this.userName = userName;
+ }
+
+ public Server getServer()
+ {
+ return server;
+ }
+
+ public String getUserName()
+ {
+ return userName;
+ }
+
+ public JMSServerProtocol getProtocol()
+ {
+ return protocol;
+ }
+
+ public void setProtocol(JMSServerProtocol protocol)
+ {
+ this.protocol = protocol;
+ }
+
+ public ServerSession openSession(int sessionID)
+ {
+ ServerSession session = new ServerSession(this, sessionID);
+ synchronized (sessions)
+ {
+ while (sessionID >= sessions.size())
+ {
+ sessions.add(null);
+ }
+
+ sessions.set(sessionID, session);
+ }
+
+ return session;
+ }
+
+ public ServerSession getSession(int sessionID)
+ {
+ return sessions.get(sessionID);
+ }
+
+ public ServerSession[] getSessions()
+ {
+ List<ServerSession> result = new ArrayList<ServerSession>(sessions.size());
+ synchronized (sessions)
+ {
+ for (ServerSession session : sessions)
+ {
+ if (session != null)
+ {
+ result.add(session);
+ }
+ }
+ }
+
+ return result.toArray(new ServerSession[result.size()]);
+ }
+
+ public void close()
+ {
+ protocol.getChannel().close();
+ }
+
+ protected boolean removeSession(ServerSession session)
+ {
+ synchronized (sessions)
+ {
+ int sessionID = session.getID();
+ if (sessions.get(sessionID) == session)
+ {
+ sessions.set(sessionID, null);
+ return true;
+ }
+
+ return false;
+ }
+ }
+}
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 83644a7622..fd84f292cd 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
@@ -1,148 +1,148 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server;
-
-import org.eclipse.net4j.internal.jms.MessageImpl;
-import org.eclipse.net4j.jms.internal.server.bundle.OM;
-import org.eclipse.net4j.jms.internal.server.protocol.JMSServerMessageRequest;
-import org.eclipse.net4j.jms.internal.server.protocol.JMSServerProtocol;
-import org.eclipse.net4j.jms.server.IServerConsumer;
-import org.eclipse.net4j.jms.server.IStoreTransaction;
-import org.eclipse.net4j.util.io.IOUtil;
-
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-
-/**
- * @author Eike Stepper
- */
-public class ServerConsumer implements IServerConsumer
-{
- private ServerSession session;
-
- private long id;
-
- private ServerDestination destination;
-
- private String messageSelector;
-
- private boolean noLocal;
-
- private boolean durable;
-
- private ConcurrentMap<String, MessageImpl> messages = new ConcurrentHashMap<String, MessageImpl>();
-
- public ServerConsumer(long id, ServerDestination destination, String messageSelector, boolean noLocal, boolean durable)
- {
- this.id = id;
- this.destination = destination;
- this.messageSelector = messageSelector;
- this.noLocal = noLocal;
- this.durable = durable;
- }
-
- public ServerSession getSession()
- {
- return session;
- }
-
- public void setSession(ServerSession session)
- {
- this.session = session;
- }
-
- public long getID()
- {
- return id;
- }
-
- public ServerDestination getDestination()
- {
- return destination;
- }
-
- public String getMessageSelector()
- {
- return messageSelector;
- }
-
- public boolean isNoLocal()
- {
- return noLocal;
- }
-
- public JMSServerProtocol getProtocol()
- {
- return session.getConnection().getProtocol();
- }
-
- public boolean isDurable()
- {
- return durable;
- }
-
- public boolean handleClientMessage(IStoreTransaction transaction, MessageImpl message)
- {
- try
- {
- String messageID = message.getJMSMessageID();
- synchronized (messages)
- {
- messages.put(messageID, message);
- }
-
- new JMSServerMessageRequest(getProtocol(), session.getID(), id, message).sendAsync();
- transaction.messageSent(message, id);
- return true;
- }
- catch (Exception ex)
- {
- OM.LOG.error(ex);
- return false;
- }
- }
-
- public void handleAcknowledge(IStoreTransaction transaction)
- {
- synchronized (messages)
- {
- if (messages.isEmpty())
- {
- return;
- }
-
- for (MessageImpl message : messages.values())
- {
- transaction.messageAcknowledged(message, id);
- IOUtil.OUT().println("\nMessage acknowledged: " + message.getJMSMessageID() + " (consumer=" + id + ")\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- messages.clear();
- }
- }
-
- public void handleRecover(IStoreTransaction transaction)
- {
- synchronized (messages)
- {
- if (messages.isEmpty())
- {
- return;
- }
-
- for (MessageImpl message : messages.values())
- {
- IOUtil.OUT().println("\nRecovering message: " + message.getJMSMessageID() + " (consumer=" + id + ")\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- session.getConnection().getServer().addWork(message);
- }
- }
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server;
+
+import org.eclipse.net4j.internal.jms.MessageImpl;
+import org.eclipse.net4j.jms.internal.server.bundle.OM;
+import org.eclipse.net4j.jms.internal.server.protocol.JMSServerMessageRequest;
+import org.eclipse.net4j.jms.internal.server.protocol.JMSServerProtocol;
+import org.eclipse.net4j.jms.server.IServerConsumer;
+import org.eclipse.net4j.jms.server.IStoreTransaction;
+import org.eclipse.net4j.util.io.IOUtil;
+
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+/**
+ * @author Eike Stepper
+ */
+public class ServerConsumer implements IServerConsumer
+{
+ private ServerSession session;
+
+ private long id;
+
+ private ServerDestination destination;
+
+ private String messageSelector;
+
+ private boolean noLocal;
+
+ private boolean durable;
+
+ private ConcurrentMap<String, MessageImpl> messages = new ConcurrentHashMap<String, MessageImpl>();
+
+ public ServerConsumer(long id, ServerDestination destination, String messageSelector, boolean noLocal, boolean durable)
+ {
+ this.id = id;
+ this.destination = destination;
+ this.messageSelector = messageSelector;
+ this.noLocal = noLocal;
+ this.durable = durable;
+ }
+
+ public ServerSession getSession()
+ {
+ return session;
+ }
+
+ public void setSession(ServerSession session)
+ {
+ this.session = session;
+ }
+
+ public long getID()
+ {
+ return id;
+ }
+
+ public ServerDestination getDestination()
+ {
+ return destination;
+ }
+
+ public String getMessageSelector()
+ {
+ return messageSelector;
+ }
+
+ public boolean isNoLocal()
+ {
+ return noLocal;
+ }
+
+ public JMSServerProtocol getProtocol()
+ {
+ return session.getConnection().getProtocol();
+ }
+
+ public boolean isDurable()
+ {
+ return durable;
+ }
+
+ public boolean handleClientMessage(IStoreTransaction transaction, MessageImpl message)
+ {
+ try
+ {
+ String messageID = message.getJMSMessageID();
+ synchronized (messages)
+ {
+ messages.put(messageID, message);
+ }
+
+ new JMSServerMessageRequest(getProtocol(), session.getID(), id, message).sendAsync();
+ transaction.messageSent(message, id);
+ return true;
+ }
+ catch (Exception ex)
+ {
+ OM.LOG.error(ex);
+ return false;
+ }
+ }
+
+ public void handleAcknowledge(IStoreTransaction transaction)
+ {
+ synchronized (messages)
+ {
+ if (messages.isEmpty())
+ {
+ return;
+ }
+
+ for (MessageImpl message : messages.values())
+ {
+ transaction.messageAcknowledged(message, id);
+ IOUtil.OUT().println("\nMessage acknowledged: " + message.getJMSMessageID() + " (consumer=" + id + ")\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ messages.clear();
+ }
+ }
+
+ public void handleRecover(IStoreTransaction transaction)
+ {
+ synchronized (messages)
+ {
+ if (messages.isEmpty())
+ {
+ return;
+ }
+
+ for (MessageImpl message : messages.values())
+ {
+ 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/ServerDestination.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerDestination.java
index b661d5ff67..4ea2d66dab 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerDestination.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerDestination.java
@@ -1,127 +1,127 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-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.internal.jms.QueueImpl;
-import org.eclipse.net4j.internal.jms.TopicImpl;
-import org.eclipse.net4j.jms.server.IDestination;
-import org.eclipse.net4j.jms.server.IStore;
-import org.eclipse.net4j.jms.server.IStoreTransaction;
-import org.eclipse.net4j.util.concurrent.RoundRobinList;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-
-import java.util.Iterator;
-
-/**
- * @author Eike Stepper
- */
-public class ServerDestination implements IDestination
-{
- private String name;
-
- private Type type;
-
- private RoundRobinList<ServerConsumer> consumers = new RoundRobinList<ServerConsumer>();
-
- public ServerDestination(String name, Type type)
- {
- this.name = name;
- this.type = type;
- }
-
- public String getName()
- {
- return name;
- }
-
- public Type getType()
- {
- return type;
- }
-
- public DestinationImpl bind(Context context, boolean rebind) throws NamingException
- {
- DestinationImpl destination = type == Type.QUEUE ? new QueueImpl(name) : new TopicImpl(name);
- if (rebind)
- {
- context.rebind(name, destination);
- }
- else
- {
- context.bind(name, destination);
- }
-
- return destination;
- }
-
- public boolean addConsumer(ServerConsumer consumer)
- {
- if (consumer.isDurable())
- {
- IStore store = Server.INSTANCE.getStore();
- IStoreTransaction transaction = store.startTransaction();
- transaction.consumerAdded(consumer);
- store.commitTransaction(transaction);
- }
-
- return consumers.add(consumer);
- }
-
- public boolean removeConsumer(final long consumerID)
- {
- final boolean[] modified = { false };
- consumers.executeWrites(new Runnable()
- {
- public void run()
- {
- for (Iterator<ServerConsumer> it = consumers.iterator(); it.hasNext();)
- {
- ServerConsumer consumer = it.next();
- if (consumer.getID() == consumerID)
- {
- it.remove();
- modified[0] = true;
- return;
- }
- }
- }
- });
-
- return modified[0];
- }
-
- /**
- * Called by worker thread of the server
- */
- public void handleClientMessage(IStoreTransaction transaction, MessageImpl message)
- {
- if (type == Type.QUEUE)
- {
- ServerConsumer consumer = consumers.element();
- if (consumer != null)
- {
- consumer.handleClientMessage(transaction, message);
- }
- }
- else
- {
- ServerConsumer[] consumers = this.consumers.toArray(new ServerConsumer[0]);
- for (ServerConsumer consumer : consumers)
- {
- consumer.handleClientMessage(transaction, message);
- }
- }
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+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.internal.jms.QueueImpl;
+import org.eclipse.net4j.internal.jms.TopicImpl;
+import org.eclipse.net4j.jms.server.IDestination;
+import org.eclipse.net4j.jms.server.IStore;
+import org.eclipse.net4j.jms.server.IStoreTransaction;
+import org.eclipse.net4j.util.concurrent.RoundRobinList;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+
+import java.util.Iterator;
+
+/**
+ * @author Eike Stepper
+ */
+public class ServerDestination implements IDestination
+{
+ private String name;
+
+ private Type type;
+
+ private RoundRobinList<ServerConsumer> consumers = new RoundRobinList<ServerConsumer>();
+
+ public ServerDestination(String name, Type type)
+ {
+ this.name = name;
+ this.type = type;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public Type getType()
+ {
+ return type;
+ }
+
+ public DestinationImpl bind(Context context, boolean rebind) throws NamingException
+ {
+ DestinationImpl destination = type == Type.QUEUE ? new QueueImpl(name) : new TopicImpl(name);
+ if (rebind)
+ {
+ context.rebind(name, destination);
+ }
+ else
+ {
+ context.bind(name, destination);
+ }
+
+ return destination;
+ }
+
+ public boolean addConsumer(ServerConsumer consumer)
+ {
+ if (consumer.isDurable())
+ {
+ IStore store = Server.INSTANCE.getStore();
+ IStoreTransaction transaction = store.startTransaction();
+ transaction.consumerAdded(consumer);
+ store.commitTransaction(transaction);
+ }
+
+ return consumers.add(consumer);
+ }
+
+ public boolean removeConsumer(final long consumerID)
+ {
+ final boolean[] modified = { false };
+ consumers.executeWrites(new Runnable()
+ {
+ public void run()
+ {
+ for (Iterator<ServerConsumer> it = consumers.iterator(); it.hasNext();)
+ {
+ ServerConsumer consumer = it.next();
+ if (consumer.getID() == consumerID)
+ {
+ it.remove();
+ modified[0] = true;
+ return;
+ }
+ }
+ }
+ });
+
+ return modified[0];
+ }
+
+ /**
+ * Called by worker thread of the server
+ */
+ public void handleClientMessage(IStoreTransaction transaction, MessageImpl message)
+ {
+ if (type == Type.QUEUE)
+ {
+ ServerConsumer consumer = consumers.element();
+ if (consumer != null)
+ {
+ consumer.handleClientMessage(transaction, message);
+ }
+ }
+ else
+ {
+ ServerConsumer[] consumers = this.consumers.toArray(new ServerConsumer[0]);
+ for (ServerConsumer consumer : consumers)
+ {
+ consumer.handleClientMessage(transaction, 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 1ae9201223..255c03ff26 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
@@ -1,113 +1,113 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-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;
-
-/**
- * @author Eike Stepper
- */
-public class ServerSession extends Lifecycle implements ISession
-{
- private ServerConnection connection;
-
- private int id;
-
- private ConcurrentMap<Long, ServerConsumer> consumers = new ConcurrentHashMap<Long, ServerConsumer>();
-
- public ServerSession(ServerConnection connection, int id)
- {
- this.connection = connection;
- this.id = id;
- }
-
- public ServerConnection getConnection()
- {
- return connection;
- }
-
- public int getID()
- {
- return id;
- }
-
- public long registerConsumer(DestinationImpl dest, String messageSelector, boolean noLocal, boolean durable)
- {
- Server server = connection.getServer();
- String name = dest.getName();
- ServerDestination destination = server.getDestination(name);
- if (destination == null)
- {
- OM.LOG.error(MessageFormat.format(Messages.getString("ServerSession_0"), name)); //$NON-NLS-1$
- return -1;
- }
-
- ServerConsumer consumer = server.createConsumer(destination, messageSelector, noLocal, durable);
- consumer.setSession(this);
- consumers.put(consumer.getID(), consumer);
- destination.addConsumer(consumer);
- return consumer.getID();
- }
-
- public void handleAcknowledge()
- {
- IStore store = connection.getServer().getStore();
- IStoreTransaction transaction = store.startTransaction();
- handleAcknowledgeInTransaction(transaction);
- store.commitTransaction(transaction);
- }
-
- public void handleAcknowledgeInTransaction(IStoreTransaction transaction)
- {
- for (ServerConsumer consumer : consumers.values())
- {
- consumer.handleAcknowledge(transaction);
- }
- }
-
- public void handleRecover()
- {
- IStore store = connection.getServer().getStore();
- IStoreTransaction transaction = store.startTransaction();
- Collection<ServerConsumer> values = consumers.values();
- for (ServerConsumer consumer : values)
- {
- consumer.handleRecover(transaction);
- }
-
- store.commitTransaction(transaction);
- }
-
- public String[] handleCommit(MessageImpl[] messages)
- {
- Server server = connection.getServer();
- IStore store = server.getStore();
-
- IStoreTransaction transaction = store.startTransaction();
- handleAcknowledgeInTransaction(transaction);
- String[] messageIDs = server.handleClientMessagesInTransaction(transaction, messages);
- store.commitTransaction(transaction);
-
- return messageIDs;
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+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;
+
+/**
+ * @author Eike Stepper
+ */
+public class ServerSession extends Lifecycle implements ISession
+{
+ private ServerConnection connection;
+
+ private int id;
+
+ private ConcurrentMap<Long, ServerConsumer> consumers = new ConcurrentHashMap<Long, ServerConsumer>();
+
+ public ServerSession(ServerConnection connection, int id)
+ {
+ this.connection = connection;
+ this.id = id;
+ }
+
+ public ServerConnection getConnection()
+ {
+ return connection;
+ }
+
+ public int getID()
+ {
+ return id;
+ }
+
+ public long registerConsumer(DestinationImpl dest, String messageSelector, boolean noLocal, boolean durable)
+ {
+ Server server = connection.getServer();
+ String name = dest.getName();
+ ServerDestination destination = server.getDestination(name);
+ if (destination == null)
+ {
+ OM.LOG.error(MessageFormat.format(Messages.getString("ServerSession_0"), name)); //$NON-NLS-1$
+ return -1;
+ }
+
+ ServerConsumer consumer = server.createConsumer(destination, messageSelector, noLocal, durable);
+ consumer.setSession(this);
+ consumers.put(consumer.getID(), consumer);
+ destination.addConsumer(consumer);
+ return consumer.getID();
+ }
+
+ public void handleAcknowledge()
+ {
+ IStore store = connection.getServer().getStore();
+ IStoreTransaction transaction = store.startTransaction();
+ handleAcknowledgeInTransaction(transaction);
+ store.commitTransaction(transaction);
+ }
+
+ public void handleAcknowledgeInTransaction(IStoreTransaction transaction)
+ {
+ for (ServerConsumer consumer : consumers.values())
+ {
+ consumer.handleAcknowledge(transaction);
+ }
+ }
+
+ public void handleRecover()
+ {
+ IStore store = connection.getServer().getStore();
+ IStoreTransaction transaction = store.startTransaction();
+ Collection<ServerConsumer> values = consumers.values();
+ for (ServerConsumer consumer : values)
+ {
+ consumer.handleRecover(transaction);
+ }
+
+ store.commitTransaction(transaction);
+ }
+
+ public String[] handleCommit(MessageImpl[] messages)
+ {
+ Server server = connection.getServer();
+ IStore store = server.getStore();
+
+ IStoreTransaction transaction = store.startTransaction();
+ handleAcknowledgeInTransaction(transaction);
+ String[] messageIDs = server.handleClientMessagesInTransaction(transaction, messages);
+ store.commitTransaction(transaction);
+
+ return messageIDs;
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/bundle/OM.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/bundle/OM.java
index 93749074e2..0dc7a59890 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/bundle/OM.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/bundle/OM.java
@@ -1,59 +1,59 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.bundle;
-
-import org.eclipse.net4j.jms.internal.server.Server;
-import org.eclipse.net4j.util.om.OMBundle;
-import org.eclipse.net4j.util.om.OMPlatform;
-import org.eclipse.net4j.util.om.OSGiActivator;
-import org.eclipse.net4j.util.om.log.OMLogger;
-import org.eclipse.net4j.util.om.trace.OMTracer;
-
-/**
- * The <em>Operations & Maintenance</em> class of this bundle.
- *
- * @author Eike Stepper
- */
-public abstract class OM
-{
- public static final String BUNDLE_ID = "org.eclipse.net4j.jms.server"; //$NON-NLS-1$
-
- public static final OMBundle BUNDLE = OMPlatform.INSTANCE.bundle(BUNDLE_ID, OM.class);
-
- public static final OMTracer DEBUG = BUNDLE.tracer("debug"); //$NON-NLS-1$
-
- public static final OMTracer DEBUG_PROTOCOL = DEBUG.tracer("protocol"); //$NON-NLS-1$
-
- public static final OMTracer DEBUG_STORE = DEBUG.tracer("store"); //$NON-NLS-1$
-
- public static final OMLogger LOG = BUNDLE.logger();
-
- static void start() throws Exception
- {
- Server.INSTANCE.activate();
- }
-
- static void stop() throws Exception
- {
- Server.INSTANCE.deactivate();
- }
-
- /**
- * @author Eike Stepper
- */
- public static final class Activator extends OSGiActivator
- {
- public Activator()
- {
- super(BUNDLE);
- }
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.bundle;
+
+import org.eclipse.net4j.jms.internal.server.Server;
+import org.eclipse.net4j.util.om.OMBundle;
+import org.eclipse.net4j.util.om.OMPlatform;
+import org.eclipse.net4j.util.om.OSGiActivator;
+import org.eclipse.net4j.util.om.log.OMLogger;
+import org.eclipse.net4j.util.om.trace.OMTracer;
+
+/**
+ * The <em>Operations & Maintenance</em> class of this bundle.
+ *
+ * @author Eike Stepper
+ */
+public abstract class OM
+{
+ public static final String BUNDLE_ID = "org.eclipse.net4j.jms.server"; //$NON-NLS-1$
+
+ public static final OMBundle BUNDLE = OMPlatform.INSTANCE.bundle(BUNDLE_ID, OM.class);
+
+ public static final OMTracer DEBUG = BUNDLE.tracer("debug"); //$NON-NLS-1$
+
+ public static final OMTracer DEBUG_PROTOCOL = DEBUG.tracer("protocol"); //$NON-NLS-1$
+
+ public static final OMTracer DEBUG_STORE = DEBUG.tracer("store"); //$NON-NLS-1$
+
+ public static final OMLogger LOG = BUNDLE.logger();
+
+ static void start() throws Exception
+ {
+ Server.INSTANCE.activate();
+ }
+
+ static void stop() throws Exception
+ {
+ Server.INSTANCE.deactivate();
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public static final class Activator extends OSGiActivator
+ {
+ public Activator()
+ {
+ super(BUNDLE);
+ }
+ }
+}
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
index 9e7934646e..9dc5329eb5 100644
--- 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
@@ -1,41 +1,41 @@
-/*
- * Copyright (c) 2004 - 2012 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 + '!';
- }
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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
index 6ced4a8dd4..0755149def 100644
--- 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
@@ -1,17 +1,17 @@
-# Copyright (c) 2004 - 2012 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}
+# Copyright (c) 2004 - 2012 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 a81fb59e59..d79d8ed15c 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
@@ -1,49 +1,49 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-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
- */
-public class JMSAcknowledgeIndication extends Indication
-{
- public JMSAcknowledgeIndication(JMSServerProtocol protocol)
- {
- super(protocol, JMSProtocolConstants.SIGNAL_ACKNOWLEDGE);
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws Exception
- {
- int sessionID = in.readInt();
-
- JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
- ServerConnection connection = protocol.getInfraStructure();
- ServerSession session = connection.getSession(sessionID);
- if (session == null)
- {
- OM.LOG.info(MessageFormat.format(Messages.getString("JMSAcknowledgeIndication_0"), sessionID)); //$NON-NLS-1$
- return;
- }
-
- session.handleAcknowledge();
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+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
+ */
+public class JMSAcknowledgeIndication extends Indication
+{
+ public JMSAcknowledgeIndication(JMSServerProtocol protocol)
+ {
+ super(protocol, JMSProtocolConstants.SIGNAL_ACKNOWLEDGE);
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws Exception
+ {
+ int sessionID = in.readInt();
+
+ JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
+ ServerConnection connection = protocol.getInfraStructure();
+ ServerSession session = connection.getSession(sessionID);
+ if (session == null)
+ {
+ OM.LOG.info(MessageFormat.format(Messages.getString("JMSAcknowledgeIndication_0"), sessionID)); //$NON-NLS-1$
+ return;
+ }
+
+ session.handleAcknowledge();
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSClientMessageIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSClientMessageIndication.java
index 5161f71887..e31cd262d2 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSClientMessageIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSClientMessageIndication.java
@@ -1,53 +1,53 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-import org.eclipse.net4j.internal.jms.MessageImpl;
-import org.eclipse.net4j.internal.jms.util.MessageUtil;
-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.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-/**
- * @author Eike Stepper
- */
-public class JMSClientMessageIndication extends IndicationWithResponse
-{
- private String messageID;
-
- public JMSClientMessageIndication(JMSServerProtocol protocol)
- {
- super(protocol, JMSProtocolConstants.SIGNAL_CLIENT_MESSAGE);
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws Exception
- {
- MessageImpl[] messages = { MessageUtil.read(in) };
- JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
- ServerConnection connection = protocol.getInfraStructure();
- Server server = connection.getServer();
- String[] ids = server.handleClientMessages(messages);
- if (ids != null && ids.length != 0)
- {
- messageID = ids[0];
- }
- }
-
- @Override
- protected void responding(ExtendedDataOutputStream out) throws Exception
- {
- out.writeString(messageID);
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+import org.eclipse.net4j.internal.jms.MessageImpl;
+import org.eclipse.net4j.internal.jms.util.MessageUtil;
+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.signal.IndicationWithResponse;
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+
+/**
+ * @author Eike Stepper
+ */
+public class JMSClientMessageIndication extends IndicationWithResponse
+{
+ private String messageID;
+
+ public JMSClientMessageIndication(JMSServerProtocol protocol)
+ {
+ super(protocol, JMSProtocolConstants.SIGNAL_CLIENT_MESSAGE);
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws Exception
+ {
+ MessageImpl[] messages = { MessageUtil.read(in) };
+ JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
+ ServerConnection connection = protocol.getInfraStructure();
+ Server server = connection.getServer();
+ String[] ids = server.handleClientMessages(messages);
+ if (ids != null && ids.length != 0)
+ {
+ messageID = ids[0];
+ }
+ }
+
+ @Override
+ protected void responding(ExtendedDataOutputStream out) throws Exception
+ {
+ out.writeString(messageID);
+ }
+}
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 da00eb8209..6c11c01189 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
@@ -1,77 +1,77 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-import org.eclipse.net4j.internal.jms.MessageImpl;
-import org.eclipse.net4j.internal.jms.util.MessageUtil;
-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
- */
-public class JMSCommitIndication extends IndicationWithResponse
-{
- private String[] messageIDs;
-
- public JMSCommitIndication(JMSServerProtocol protocol)
- {
- super(protocol, JMSProtocolConstants.SIGNAL_COMMIT);
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws Exception
- {
- int sessionID = in.readInt();
- int size = in.readInt();
- MessageImpl[] messages = new MessageImpl[size];
- for (int i = 0; i < messages.length; i++)
- {
- messages[i] = MessageUtil.read(in);
- }
-
- JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
- ServerConnection connection = protocol.getInfraStructure();
- ServerSession session = connection.getSession(sessionID);
- if (session == null)
- {
- OM.LOG.warn(MessageFormat.format(Messages.getString("JMSCommitIndication_0"), sessionID)); //$NON-NLS-1$
- return;
- }
-
- messageIDs = session.handleCommit(messages);
- }
-
- @Override
- protected void responding(ExtendedDataOutputStream out) throws Exception
- {
- if (messageIDs == null)
- {
- out.writeInt(-1);
- }
- else
- {
- out.writeInt(messageIDs.length);
- for (String messageID : messageIDs)
- {
- out.writeString(messageID);
- }
- }
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+import org.eclipse.net4j.internal.jms.MessageImpl;
+import org.eclipse.net4j.internal.jms.util.MessageUtil;
+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
+ */
+public class JMSCommitIndication extends IndicationWithResponse
+{
+ private String[] messageIDs;
+
+ public JMSCommitIndication(JMSServerProtocol protocol)
+ {
+ super(protocol, JMSProtocolConstants.SIGNAL_COMMIT);
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws Exception
+ {
+ int sessionID = in.readInt();
+ int size = in.readInt();
+ MessageImpl[] messages = new MessageImpl[size];
+ for (int i = 0; i < messages.length; i++)
+ {
+ messages[i] = MessageUtil.read(in);
+ }
+
+ JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
+ ServerConnection connection = protocol.getInfraStructure();
+ ServerSession session = connection.getSession(sessionID);
+ if (session == null)
+ {
+ OM.LOG.warn(MessageFormat.format(Messages.getString("JMSCommitIndication_0"), sessionID)); //$NON-NLS-1$
+ return;
+ }
+
+ messageIDs = session.handleCommit(messages);
+ }
+
+ @Override
+ protected void responding(ExtendedDataOutputStream out) throws Exception
+ {
+ if (messageIDs == null)
+ {
+ out.writeInt(-1);
+ }
+ else
+ {
+ out.writeInt(messageIDs.length);
+ for (String messageID : messageIDs)
+ {
+ out.writeString(messageID);
+ }
+ }
+ }
+}
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 dbd9bbdf03..849b7efa83 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
@@ -1,57 +1,57 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-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;
-
-/**
- * @author Eike Stepper
- */
-public class JMSLogonIndication extends IndicationWithResponse
-{
- private boolean ok;
-
- public JMSLogonIndication(JMSServerProtocol protocol)
- {
- super(protocol, JMSProtocolConstants.SIGNAL_LOGON);
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws Exception
- {
- String userName = in.readString();
- String password = in.readString();
- ServerConnection connection = Server.INSTANCE.logon(userName, password);
- if (connection == null)
- {
- OM.LOG.error(Messages.getString("JMSLogonIndication_0")); //$NON-NLS-1$
- return;
- }
-
- JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
- connection.setProtocol(protocol);
- protocol.setInfraStructure(connection);
- ok = true;
- }
-
- @Override
- protected void responding(ExtendedDataOutputStream out) throws Exception
- {
- out.writeBoolean(ok);
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+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;
+
+/**
+ * @author Eike Stepper
+ */
+public class JMSLogonIndication extends IndicationWithResponse
+{
+ private boolean ok;
+
+ public JMSLogonIndication(JMSServerProtocol protocol)
+ {
+ super(protocol, JMSProtocolConstants.SIGNAL_LOGON);
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws Exception
+ {
+ String userName = in.readString();
+ String password = in.readString();
+ ServerConnection connection = Server.INSTANCE.logon(userName, password);
+ if (connection == null)
+ {
+ OM.LOG.error(Messages.getString("JMSLogonIndication_0")); //$NON-NLS-1$
+ return;
+ }
+
+ JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
+ connection.setProtocol(protocol);
+ protocol.setInfraStructure(connection);
+ ok = true;
+ }
+
+ @Override
+ protected void responding(ExtendedDataOutputStream out) throws Exception
+ {
+ out.writeBoolean(ok);
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSOpenSessionIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSOpenSessionIndication.java
index aa435b1f74..080d003211 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSOpenSessionIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSOpenSessionIndication.java
@@ -1,50 +1,50 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-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.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-/**
- * @author Eike Stepper
- */
-public class JMSOpenSessionIndication extends IndicationWithResponse
-{
- private boolean ok;
-
- public JMSOpenSessionIndication(JMSServerProtocol protocol)
- {
- super(protocol, JMSProtocolConstants.SIGNAL_OPEN_SESSION);
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws Exception
- {
- int sessionID = in.readInt();
- JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
- ServerConnection connection = protocol.getInfraStructure();
- ServerSession session = connection.openSession(sessionID);
- if (session != null)
- {
- ok = true;
- }
- }
-
- @Override
- protected void responding(ExtendedDataOutputStream out) throws Exception
- {
- out.writeBoolean(ok);
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+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.signal.IndicationWithResponse;
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+
+/**
+ * @author Eike Stepper
+ */
+public class JMSOpenSessionIndication extends IndicationWithResponse
+{
+ private boolean ok;
+
+ public JMSOpenSessionIndication(JMSServerProtocol protocol)
+ {
+ super(protocol, JMSProtocolConstants.SIGNAL_OPEN_SESSION);
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws Exception
+ {
+ int sessionID = in.readInt();
+ JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
+ ServerConnection connection = protocol.getInfraStructure();
+ ServerSession session = connection.openSession(sessionID);
+ if (session != null)
+ {
+ ok = true;
+ }
+ }
+
+ @Override
+ protected void responding(ExtendedDataOutputStream out) throws Exception
+ {
+ out.writeBoolean(ok);
+ }
+}
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 c1f0199ad9..8b4ec05341 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
@@ -1,54 +1,54 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-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
- */
-public class JMSRecoverIndication extends IndicationWithResponse
-{
- public JMSRecoverIndication(JMSServerProtocol protocol)
- {
- super(protocol, JMSProtocolConstants.SIGNAL_RECOVER);
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws Exception
- {
- int sessionID = in.readInt();
- JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
- ServerConnection connection = protocol.getInfraStructure();
- ServerSession session = connection.getSession(sessionID);
- if (session == null)
- {
- OM.LOG.warn(MessageFormat.format(Messages.getString("JMSRecoverIndication_0"), sessionID)); //$NON-NLS-1$
- return;
- }
-
- session.handleRecover();
- }
-
- @Override
- protected void responding(ExtendedDataOutputStream out) throws Exception
- {
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+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
+ */
+public class JMSRecoverIndication extends IndicationWithResponse
+{
+ public JMSRecoverIndication(JMSServerProtocol protocol)
+ {
+ super(protocol, JMSProtocolConstants.SIGNAL_RECOVER);
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws Exception
+ {
+ int sessionID = in.readInt();
+ JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
+ ServerConnection connection = protocol.getInfraStructure();
+ ServerSession session = connection.getSession(sessionID);
+ if (session == null)
+ {
+ OM.LOG.warn(MessageFormat.format(Messages.getString("JMSRecoverIndication_0"), sessionID)); //$NON-NLS-1$
+ return;
+ }
+
+ session.handleRecover();
+ }
+
+ @Override
+ protected void responding(ExtendedDataOutputStream out) throws Exception
+ {
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRegisterConsumerIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRegisterConsumerIndication.java
index 7537f9b725..658aaec0f9 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRegisterConsumerIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRegisterConsumerIndication.java
@@ -1,53 +1,53 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-import org.eclipse.net4j.internal.jms.DestinationImpl;
-import org.eclipse.net4j.internal.jms.util.DestinationUtil;
-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.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-/**
- * @author Eike Stepper
- */
-public class JMSRegisterConsumerIndication extends IndicationWithResponse
-{
- private long consumerID;
-
- public JMSRegisterConsumerIndication(JMSServerProtocol protocol)
- {
- super(protocol, JMSProtocolConstants.SIGNAL_REGISTER_CONSUMER);
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws Exception
- {
- int sessionID = in.readInt();
- DestinationImpl destination = DestinationUtil.read(in);
- String messageSelector = in.readString();
- boolean noLocal = in.readBoolean();
- boolean durable = in.readBoolean();
- JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
- ServerConnection connection = protocol.getInfraStructure();
- ServerSession session = connection.getSession(sessionID);
- consumerID = session.registerConsumer(destination, messageSelector, noLocal, durable);
- }
-
- @Override
- protected void responding(ExtendedDataOutputStream out) throws Exception
- {
- out.writeLong(consumerID);
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+import org.eclipse.net4j.internal.jms.DestinationImpl;
+import org.eclipse.net4j.internal.jms.util.DestinationUtil;
+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.signal.IndicationWithResponse;
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+
+/**
+ * @author Eike Stepper
+ */
+public class JMSRegisterConsumerIndication extends IndicationWithResponse
+{
+ private long consumerID;
+
+ public JMSRegisterConsumerIndication(JMSServerProtocol protocol)
+ {
+ super(protocol, JMSProtocolConstants.SIGNAL_REGISTER_CONSUMER);
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws Exception
+ {
+ int sessionID = in.readInt();
+ DestinationImpl destination = DestinationUtil.read(in);
+ String messageSelector = in.readString();
+ boolean noLocal = in.readBoolean();
+ boolean durable = in.readBoolean();
+ JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
+ ServerConnection connection = protocol.getInfraStructure();
+ ServerSession session = connection.getSession(sessionID);
+ consumerID = session.registerConsumer(destination, messageSelector, noLocal, durable);
+ }
+
+ @Override
+ protected void responding(ExtendedDataOutputStream out) throws Exception
+ {
+ out.writeLong(consumerID);
+ }
+}
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 2a3c912762..f801774ac1 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
@@ -1,55 +1,55 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-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
- */
-public class JMSRollbackIndication extends IndicationWithResponse
-{
- public JMSRollbackIndication(JMSServerProtocol protocol)
- {
- super(protocol, JMSProtocolConstants.SIGNAL_ROLLBACK);
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws Exception
- {
- int sessionID = in.readInt();
- JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
- ServerConnection connection = protocol.getInfraStructure();
- ServerSession session = connection.getSession(sessionID);
- if (session == null)
- {
- OM.LOG.warn(MessageFormat.format(Messages.getString("JMSRollbackIndication_0"), sessionID)); //$NON-NLS-1$
- return;
- }
-
- session.handleRecover();
- }
-
- @Override
- protected void responding(ExtendedDataOutputStream out) throws Exception
- {
- out.writeBoolean(true);
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+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
+ */
+public class JMSRollbackIndication extends IndicationWithResponse
+{
+ public JMSRollbackIndication(JMSServerProtocol protocol)
+ {
+ super(protocol, JMSProtocolConstants.SIGNAL_ROLLBACK);
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws Exception
+ {
+ int sessionID = in.readInt();
+ JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
+ ServerConnection connection = protocol.getInfraStructure();
+ ServerSession session = connection.getSession(sessionID);
+ if (session == null)
+ {
+ OM.LOG.warn(MessageFormat.format(Messages.getString("JMSRollbackIndication_0"), sessionID)); //$NON-NLS-1$
+ return;
+ }
+
+ session.handleRecover();
+ }
+
+ @Override
+ protected void responding(ExtendedDataOutputStream out) throws Exception
+ {
+ out.writeBoolean(true);
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerMessageRequest.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerMessageRequest.java
index 2f97928bce..24f50d231b 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerMessageRequest.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerMessageRequest.java
@@ -1,45 +1,45 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-import org.eclipse.net4j.internal.jms.MessageImpl;
-import org.eclipse.net4j.internal.jms.util.MessageUtil;
-import org.eclipse.net4j.jms.JMSProtocolConstants;
-import org.eclipse.net4j.signal.Request;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-/**
- * @author Eike Stepper
- */
-public class JMSServerMessageRequest extends Request
-{
- private int sessionID;
-
- private long consumerID;
-
- private MessageImpl message;
-
- public JMSServerMessageRequest(JMSServerProtocol protocol, int sessionID, long consumerID, MessageImpl message)
- {
- super(protocol, JMSProtocolConstants.SIGNAL_SERVER_MESSAGE);
- this.sessionID = sessionID;
- this.consumerID = consumerID;
- this.message = message;
- }
-
- @Override
- protected void requesting(ExtendedDataOutputStream out) throws Exception
- {
- out.writeInt(sessionID);
- out.writeLong(consumerID);
- MessageUtil.write(out, message);
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+import org.eclipse.net4j.internal.jms.MessageImpl;
+import org.eclipse.net4j.internal.jms.util.MessageUtil;
+import org.eclipse.net4j.jms.JMSProtocolConstants;
+import org.eclipse.net4j.signal.Request;
+import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+
+/**
+ * @author Eike Stepper
+ */
+public class JMSServerMessageRequest extends Request
+{
+ private int sessionID;
+
+ private long consumerID;
+
+ private MessageImpl message;
+
+ public JMSServerMessageRequest(JMSServerProtocol protocol, int sessionID, long consumerID, MessageImpl message)
+ {
+ super(protocol, JMSProtocolConstants.SIGNAL_SERVER_MESSAGE);
+ this.sessionID = sessionID;
+ this.consumerID = consumerID;
+ this.message = message;
+ }
+
+ @Override
+ protected void requesting(ExtendedDataOutputStream out) throws Exception
+ {
+ out.writeInt(sessionID);
+ out.writeLong(consumerID);
+ MessageUtil.write(out, message);
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocol.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocol.java
index 7f92df2a74..2f5f9be1e2 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocol.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocol.java
@@ -1,64 +1,64 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-import org.eclipse.net4j.jms.JMSProtocolConstants;
-import org.eclipse.net4j.jms.internal.server.ServerConnection;
-import org.eclipse.net4j.signal.SignalProtocol;
-import org.eclipse.net4j.signal.SignalReactor;
-
-/**
- * @author Eike Stepper
- */
-public class JMSServerProtocol extends SignalProtocol<ServerConnection>
-{
- public JMSServerProtocol()
- {
- super(JMSProtocolConstants.PROTOCOL_NAME);
- }
-
- @Override
- protected SignalReactor createSignalReactor(short signalID)
- {
- switch (signalID)
- {
- case JMSProtocolConstants.SIGNAL_SYNC:
- return new JMSSyncIndication(this);
-
- case JMSProtocolConstants.SIGNAL_LOGON:
- return new JMSLogonIndication(this);
-
- case JMSProtocolConstants.SIGNAL_OPEN_SESSION:
- return new JMSOpenSessionIndication(this);
-
- case JMSProtocolConstants.SIGNAL_REGISTER_CONSUMER:
- return new JMSRegisterConsumerIndication(this);
-
- case JMSProtocolConstants.SIGNAL_CLIENT_MESSAGE:
- return new JMSClientMessageIndication(this);
-
- case JMSProtocolConstants.SIGNAL_ACKNOWLEDGE:
- return new JMSAcknowledgeIndication(this);
-
- case JMSProtocolConstants.SIGNAL_RECOVER:
- return new JMSRecoverIndication(this);
-
- case JMSProtocolConstants.SIGNAL_COMMIT:
- return new JMSCommitIndication(this);
-
- case JMSProtocolConstants.SIGNAL_ROLLBACK:
- return new JMSRollbackIndication(this);
-
- default:
- return super.createSignalReactor(signalID);
- }
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+import org.eclipse.net4j.jms.JMSProtocolConstants;
+import org.eclipse.net4j.jms.internal.server.ServerConnection;
+import org.eclipse.net4j.signal.SignalProtocol;
+import org.eclipse.net4j.signal.SignalReactor;
+
+/**
+ * @author Eike Stepper
+ */
+public class JMSServerProtocol extends SignalProtocol<ServerConnection>
+{
+ public JMSServerProtocol()
+ {
+ super(JMSProtocolConstants.PROTOCOL_NAME);
+ }
+
+ @Override
+ protected SignalReactor createSignalReactor(short signalID)
+ {
+ switch (signalID)
+ {
+ case JMSProtocolConstants.SIGNAL_SYNC:
+ return new JMSSyncIndication(this);
+
+ case JMSProtocolConstants.SIGNAL_LOGON:
+ return new JMSLogonIndication(this);
+
+ case JMSProtocolConstants.SIGNAL_OPEN_SESSION:
+ return new JMSOpenSessionIndication(this);
+
+ case JMSProtocolConstants.SIGNAL_REGISTER_CONSUMER:
+ return new JMSRegisterConsumerIndication(this);
+
+ case JMSProtocolConstants.SIGNAL_CLIENT_MESSAGE:
+ return new JMSClientMessageIndication(this);
+
+ case JMSProtocolConstants.SIGNAL_ACKNOWLEDGE:
+ return new JMSAcknowledgeIndication(this);
+
+ case JMSProtocolConstants.SIGNAL_RECOVER:
+ return new JMSRecoverIndication(this);
+
+ case JMSProtocolConstants.SIGNAL_COMMIT:
+ return new JMSCommitIndication(this);
+
+ case JMSProtocolConstants.SIGNAL_ROLLBACK:
+ return new JMSRollbackIndication(this);
+
+ default:
+ return super.createSignalReactor(signalID);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocolFactory.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocolFactory.java
index c25ccc9453..068a09211f 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocolFactory.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocolFactory.java
@@ -1,39 +1,39 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-import org.eclipse.net4j.jms.JMSProtocolConstants;
-import org.eclipse.net4j.util.container.IManagedContainer;
-
-import org.eclipse.spi.net4j.ServerProtocolFactory;
-
-/**
- * @author Eike Stepper
- */
-public final class JMSServerProtocolFactory extends ServerProtocolFactory
-{
- public static final String TYPE = JMSProtocolConstants.PROTOCOL_NAME;
-
- public JMSServerProtocolFactory()
- {
- super(TYPE);
- }
-
- public JMSServerProtocol create(String description)
- {
- return new JMSServerProtocol();
- }
-
- public static JMSServerProtocol get(IManagedContainer container, String description)
- {
- return (JMSServerProtocol)container.getElement(PRODUCT_GROUP, TYPE, description);
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+import org.eclipse.net4j.jms.JMSProtocolConstants;
+import org.eclipse.net4j.util.container.IManagedContainer;
+
+import org.eclipse.spi.net4j.ServerProtocolFactory;
+
+/**
+ * @author Eike Stepper
+ */
+public final class JMSServerProtocolFactory extends ServerProtocolFactory
+{
+ public static final String TYPE = JMSProtocolConstants.PROTOCOL_NAME;
+
+ public JMSServerProtocolFactory()
+ {
+ super(TYPE);
+ }
+
+ public JMSServerProtocol create(String description)
+ {
+ return new JMSServerProtocol();
+ }
+
+ public static JMSServerProtocol get(IManagedContainer container, String description)
+ {
+ return (JMSServerProtocol)container.getElement(PRODUCT_GROUP, TYPE, description);
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSSyncIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSSyncIndication.java
index 9e1be7d69e..9260ed6381 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSSyncIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSSyncIndication.java
@@ -1,38 +1,38 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-import org.eclipse.net4j.jms.JMSProtocolConstants;
-import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-/**
- * @author Eike Stepper
- */
-public class JMSSyncIndication extends IndicationWithResponse
-{
- public JMSSyncIndication(JMSServerProtocol protocol)
- {
- super(protocol, JMSProtocolConstants.SIGNAL_SYNC);
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws Exception
- {
- }
-
- @Override
- protected void responding(ExtendedDataOutputStream out) throws Exception
- {
- out.writeLong(System.currentTimeMillis());
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+import org.eclipse.net4j.jms.JMSProtocolConstants;
+import org.eclipse.net4j.signal.IndicationWithResponse;
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+
+/**
+ * @author Eike Stepper
+ */
+public class JMSSyncIndication extends IndicationWithResponse
+{
+ public JMSSyncIndication(JMSServerProtocol protocol)
+ {
+ super(protocol, JMSProtocolConstants.SIGNAL_SYNC);
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws Exception
+ {
+ }
+
+ @Override
+ protected void responding(ExtendedDataOutputStream out) throws Exception
+ {
+ out.writeLong(System.currentTimeMillis());
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocol.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocol.java
index 5da3d2ada4..7fbeccd8dd 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocol.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocol.java
@@ -1,45 +1,45 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol.admin;
-
-import org.eclipse.net4j.jms.JMSAdminProtocolConstants;
-import org.eclipse.net4j.jms.server.IServer;
-import org.eclipse.net4j.signal.SignalProtocol;
-import org.eclipse.net4j.signal.SignalReactor;
-
-/**
- * @author Eike Stepper
- */
-public class JMSAdminServerProtocol extends SignalProtocol<Object>
-{
- public JMSAdminServerProtocol()
- {
- super(JMSAdminProtocolConstants.PROTOCOL_NAME);
- }
-
- @Override
- protected SignalReactor createSignalReactor(short signalID)
- {
- switch (signalID)
- {
- case JMSAdminProtocolConstants.SIGNAL_CREATE_DESTINATION:
- return new JMSCreateDestinationIndication(this);
-
- default:
- return super.createSignalReactor(signalID);
- }
- }
-
- public IServer getServer()
- {
- return IServer.INSTANCE;
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol.admin;
+
+import org.eclipse.net4j.jms.JMSAdminProtocolConstants;
+import org.eclipse.net4j.jms.server.IServer;
+import org.eclipse.net4j.signal.SignalProtocol;
+import org.eclipse.net4j.signal.SignalReactor;
+
+/**
+ * @author Eike Stepper
+ */
+public class JMSAdminServerProtocol extends SignalProtocol<Object>
+{
+ public JMSAdminServerProtocol()
+ {
+ super(JMSAdminProtocolConstants.PROTOCOL_NAME);
+ }
+
+ @Override
+ protected SignalReactor createSignalReactor(short signalID)
+ {
+ switch (signalID)
+ {
+ case JMSAdminProtocolConstants.SIGNAL_CREATE_DESTINATION:
+ return new JMSCreateDestinationIndication(this);
+
+ default:
+ return super.createSignalReactor(signalID);
+ }
+ }
+
+ public IServer getServer()
+ {
+ return IServer.INSTANCE;
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocolFactory.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocolFactory.java
index dae8d3c335..1351ac0793 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocolFactory.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocolFactory.java
@@ -1,39 +1,39 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol.admin;
-
-import org.eclipse.net4j.jms.JMSAdminProtocolConstants;
-import org.eclipse.net4j.util.container.IManagedContainer;
-
-import org.eclipse.spi.net4j.ServerProtocolFactory;
-
-/**
- * @author Eike Stepper
- */
-public final class JMSAdminServerProtocolFactory extends ServerProtocolFactory
-{
- public static final String TYPE = JMSAdminProtocolConstants.PROTOCOL_NAME;
-
- public JMSAdminServerProtocolFactory()
- {
- super(TYPE);
- }
-
- public JMSAdminServerProtocol create(String description)
- {
- return new JMSAdminServerProtocol();
- }
-
- public static JMSAdminServerProtocol get(IManagedContainer container, String description)
- {
- return (JMSAdminServerProtocol)container.getElement(PRODUCT_GROUP, TYPE, description);
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol.admin;
+
+import org.eclipse.net4j.jms.JMSAdminProtocolConstants;
+import org.eclipse.net4j.util.container.IManagedContainer;
+
+import org.eclipse.spi.net4j.ServerProtocolFactory;
+
+/**
+ * @author Eike Stepper
+ */
+public final class JMSAdminServerProtocolFactory extends ServerProtocolFactory
+{
+ public static final String TYPE = JMSAdminProtocolConstants.PROTOCOL_NAME;
+
+ public JMSAdminServerProtocolFactory()
+ {
+ super(TYPE);
+ }
+
+ public JMSAdminServerProtocol create(String description)
+ {
+ return new JMSAdminServerProtocol();
+ }
+
+ public static JMSAdminServerProtocol get(IManagedContainer container, String description)
+ {
+ return (JMSAdminServerProtocol)container.getElement(PRODUCT_GROUP, TYPE, description);
+ }
+}
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 07cedb6f3b..89bbd3539e 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
@@ -1,65 +1,65 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol.admin;
-
-import org.eclipse.net4j.jms.JMSAdminProtocolConstants;
-import org.eclipse.net4j.jms.server.IDestination;
-import org.eclipse.net4j.jms.server.IDestination.Type;
-import org.eclipse.net4j.jms.server.IServer;
-import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-/**
- * @author Eike Stepper
- */
-public class JMSCreateDestinationIndication extends IndicationWithResponse
-{
- private boolean ok;
-
- public JMSCreateDestinationIndication(JMSAdminServerProtocol protocol)
- {
- super(protocol, JMSAdminProtocolConstants.SIGNAL_CREATE_DESTINATION);
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws Exception
- {
- byte type = in.readByte();
- String name = in.readString();
- JMSAdminServerProtocol protocol = (JMSAdminServerProtocol)getProtocol();
- IServer server = protocol.getServer();
- IDestination destination = server.createDestination(name, getDestinationType(type));
- if (destination != null)
- {
- ok = true;
- }
- }
-
- @Override
- protected void responding(ExtendedDataOutputStream out) throws Exception
- {
- out.writeBoolean(ok);
- }
-
- private Type getDestinationType(byte type)
- {
- switch (type)
- {
- case JMSAdminProtocolConstants.DESTINATION_TYPE_QUEUE:
- return IDestination.Type.QUEUE;
- case JMSAdminProtocolConstants.DESTINATION_TYPE_TOPIC:
- return IDestination.Type.TOPIC;
- }
-
- throw new IllegalArgumentException("type: " + type); //$NON-NLS-1$
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol.admin;
+
+import org.eclipse.net4j.jms.JMSAdminProtocolConstants;
+import org.eclipse.net4j.jms.server.IDestination;
+import org.eclipse.net4j.jms.server.IDestination.Type;
+import org.eclipse.net4j.jms.server.IServer;
+import org.eclipse.net4j.signal.IndicationWithResponse;
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+
+/**
+ * @author Eike Stepper
+ */
+public class JMSCreateDestinationIndication extends IndicationWithResponse
+{
+ private boolean ok;
+
+ public JMSCreateDestinationIndication(JMSAdminServerProtocol protocol)
+ {
+ super(protocol, JMSAdminProtocolConstants.SIGNAL_CREATE_DESTINATION);
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws Exception
+ {
+ byte type = in.readByte();
+ String name = in.readString();
+ JMSAdminServerProtocol protocol = (JMSAdminServerProtocol)getProtocol();
+ IServer server = protocol.getServer();
+ IDestination destination = server.createDestination(name, getDestinationType(type));
+ if (destination != null)
+ {
+ ok = true;
+ }
+ }
+
+ @Override
+ protected void responding(ExtendedDataOutputStream out) throws Exception
+ {
+ out.writeBoolean(ok);
+ }
+
+ private Type getDestinationType(byte type)
+ {
+ switch (type)
+ {
+ case JMSAdminProtocolConstants.DESTINATION_TYPE_QUEUE:
+ return IDestination.Type.QUEUE;
+ case JMSAdminProtocolConstants.DESTINATION_TYPE_TOPIC:
+ return IDestination.Type.TOPIC;
+ }
+
+ 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/AbstractStore.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/AbstractStore.java
index f877c3d969..49fc030b0f 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/AbstractStore.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/AbstractStore.java
@@ -1,44 +1,44 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.store;
-
-import org.eclipse.net4j.jms.server.IStore;
-import org.eclipse.net4j.util.lifecycle.Lifecycle;
-
-/**
- * @author Eike Stepper
- */
-public abstract class AbstractStore extends Lifecycle implements IStore
-{
- private String storeType;
-
- private String instanceID;
-
- public AbstractStore(String storeType)
- {
- this.storeType = storeType;
- }
-
- public String getStoreType()
- {
- return storeType;
- }
-
- public String getInstanceID()
- {
- return instanceID;
- }
-
- public void setInstanceID(String instanceID)
- {
- this.instanceID = instanceID;
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.store;
+
+import org.eclipse.net4j.jms.server.IStore;
+import org.eclipse.net4j.util.lifecycle.Lifecycle;
+
+/**
+ * @author Eike Stepper
+ */
+public abstract class AbstractStore extends Lifecycle implements IStore
+{
+ private String storeType;
+
+ private String instanceID;
+
+ public AbstractStore(String storeType)
+ {
+ this.storeType = storeType;
+ }
+
+ public String getStoreType()
+ {
+ return storeType;
+ }
+
+ public String getInstanceID()
+ {
+ return instanceID;
+ }
+
+ public void setInstanceID(String instanceID)
+ {
+ this.instanceID = instanceID;
+ }
+}
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 045b442d96..cf4c883e4e 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
@@ -1,230 +1,230 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.store;
-
-import org.eclipse.net4j.internal.jms.MessageImpl;
-import org.eclipse.net4j.jms.internal.server.ServerConsumer;
-import org.eclipse.net4j.jms.internal.server.ServerDestination;
-import org.eclipse.net4j.jms.internal.server.bundle.OM;
-import org.eclipse.net4j.jms.server.IDestination;
-import org.eclipse.net4j.jms.server.IServerConsumer;
-import org.eclipse.net4j.jms.server.IStoreTransaction;
-import org.eclipse.net4j.util.om.trace.ContextTracer;
-
-import javax.jms.Message;
-
-/**
- * @author Eike Stepper
- */
-public abstract class AbstractTransaction implements IStoreTransaction
-{
- public static final String[] NO_DESTINATION_NAMES = new String[0];
-
- public static final long[] NO_CONSUMER_IDS = new long[0];
-
- private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG_STORE, AbstractTransaction.class);
-
- private AbstractStore store;
-
- public AbstractTransaction(AbstractStore store)
- {
- this.store = store;
- }
-
- public AbstractStore getStore()
- {
- return store;
- }
-
- public String[] getDestinationNames()
- {
- if (TRACER.isEnabled())
- {
- TRACER.trace("Getting destination names"); //$NON-NLS-1$
- }
-
- String[] names = doGetDestinationNames();
- if (TRACER.isEnabled())
- {
- TRACER.trace("Got destination names " + names); //$NON-NLS-1$
- }
-
- return names;
- }
-
- public ServerDestination getDestination(String name)
- {
- if (TRACER.isEnabled())
- {
- TRACER.trace("Getting destination " + name); //$NON-NLS-1$
- }
-
- ServerDestination destination = doGetDestination(name);
- if (TRACER.isEnabled())
- {
- TRACER.trace("Got destination " + destination); //$NON-NLS-1$
- }
-
- return destination;
- }
-
- public long[] getConsumerIDs()
- {
- if (TRACER.isEnabled())
- {
- TRACER.trace("Getting consumer IDs"); //$NON-NLS-1$
- }
-
- long[] ids = doGetConsumerIDs();
- if (TRACER.isEnabled())
- {
- TRACER.trace("Got consumer IDs " + ids); //$NON-NLS-1$
- }
-
- return ids;
- }
-
- public ServerConsumer getConsumer(long id)
- {
- if (TRACER.isEnabled())
- {
- TRACER.trace("Getting consumer " + id); //$NON-NLS-1$
- }
-
- ServerConsumer consumer = doGetConsumer(id);
- if (TRACER.isEnabled())
- {
- TRACER.trace("Got consumer " + consumer); //$NON-NLS-1$
- }
-
- return consumer;
- }
-
- public void destinationAdded(IDestination destination)
- {
- if (TRACER.isEnabled())
- {
- TRACER.trace("Adding destination " + destination); //$NON-NLS-1$
- }
-
- doDestinationAdded((ServerDestination)destination);
- if (TRACER.isEnabled())
- {
- TRACER.trace("Added destination " + destination); //$NON-NLS-1$
- }
- }
-
- public void destinationRemoved(IDestination destination)
- {
- if (TRACER.isEnabled())
- {
- TRACER.trace("Removing destination " + destination); //$NON-NLS-1$
- }
-
- doDestinationRemoved((ServerDestination)destination);
- if (TRACER.isEnabled())
- {
- TRACER.trace("Removed destination " + destination); //$NON-NLS-1$
- }
- }
-
- public void consumerAdded(IServerConsumer consumer)
- {
- if (TRACER.isEnabled())
- {
- TRACER.trace("Adding consumer " + consumer); //$NON-NLS-1$
- }
-
- doConsumerAdded((ServerConsumer)consumer);
- if (TRACER.isEnabled())
- {
- TRACER.trace("Added consumer " + consumer); //$NON-NLS-1$
- }
- }
-
- public void consumerRemoved(IServerConsumer consumer)
- {
- if (TRACER.isEnabled())
- {
- TRACER.trace("Removing consumer " + consumer); //$NON-NLS-1$
- }
-
- doConsumerRemoved((ServerConsumer)consumer);
- if (TRACER.isEnabled())
- {
- TRACER.trace("Removed consumer " + consumer); //$NON-NLS-1$
- }
- }
-
- public void messageReceived(Message message)
- {
- if (TRACER.isEnabled())
- {
- TRACER.trace("Logging received message " + message); //$NON-NLS-1$
- }
-
- doMessageReceived((MessageImpl)message);
- if (TRACER.isEnabled())
- {
- TRACER.trace("Logged received message " + message); //$NON-NLS-1$
- }
- }
-
- public void messageSent(Message message, long consumerID)
- {
- if (TRACER.isEnabled())
- {
- TRACER.trace("Logging sent message " + message); //$NON-NLS-1$
- }
-
- doMessageSent((MessageImpl)message, consumerID);
- if (TRACER.isEnabled())
- {
- TRACER.trace("Logged sent message " + message); //$NON-NLS-1$
- }
- }
-
- public void messageAcknowledged(Message message, long consumerID)
- {
- if (TRACER.isEnabled())
- {
- TRACER.trace("Logging acknowledged message " + message); //$NON-NLS-1$
- }
-
- doMessageAcknowledged((MessageImpl)message, consumerID);
- if (TRACER.isEnabled())
- {
- TRACER.trace("Logged acknowledged message " + message); //$NON-NLS-1$
- }
- }
-
- protected abstract String[] doGetDestinationNames();
-
- protected abstract ServerDestination doGetDestination(String name);
-
- protected abstract long[] doGetConsumerIDs();
-
- protected abstract ServerConsumer doGetConsumer(long id);
-
- protected abstract void doDestinationAdded(ServerDestination destination);
-
- protected abstract void doDestinationRemoved(ServerDestination destination);
-
- protected abstract void doConsumerAdded(ServerConsumer consumer);
-
- protected abstract void doConsumerRemoved(ServerConsumer consumer);
-
- protected abstract void doMessageReceived(MessageImpl message);
-
- protected abstract void doMessageSent(MessageImpl message, long consumerID);
-
- protected abstract void doMessageAcknowledged(MessageImpl message, long consumerID);
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.store;
+
+import org.eclipse.net4j.internal.jms.MessageImpl;
+import org.eclipse.net4j.jms.internal.server.ServerConsumer;
+import org.eclipse.net4j.jms.internal.server.ServerDestination;
+import org.eclipse.net4j.jms.internal.server.bundle.OM;
+import org.eclipse.net4j.jms.server.IDestination;
+import org.eclipse.net4j.jms.server.IServerConsumer;
+import org.eclipse.net4j.jms.server.IStoreTransaction;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
+
+import javax.jms.Message;
+
+/**
+ * @author Eike Stepper
+ */
+public abstract class AbstractTransaction implements IStoreTransaction
+{
+ public static final String[] NO_DESTINATION_NAMES = new String[0];
+
+ public static final long[] NO_CONSUMER_IDS = new long[0];
+
+ private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG_STORE, AbstractTransaction.class);
+
+ private AbstractStore store;
+
+ public AbstractTransaction(AbstractStore store)
+ {
+ this.store = store;
+ }
+
+ public AbstractStore getStore()
+ {
+ return store;
+ }
+
+ public String[] getDestinationNames()
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Getting destination names"); //$NON-NLS-1$
+ }
+
+ String[] names = doGetDestinationNames();
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Got destination names " + names); //$NON-NLS-1$
+ }
+
+ return names;
+ }
+
+ public ServerDestination getDestination(String name)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Getting destination " + name); //$NON-NLS-1$
+ }
+
+ ServerDestination destination = doGetDestination(name);
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Got destination " + destination); //$NON-NLS-1$
+ }
+
+ return destination;
+ }
+
+ public long[] getConsumerIDs()
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Getting consumer IDs"); //$NON-NLS-1$
+ }
+
+ long[] ids = doGetConsumerIDs();
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Got consumer IDs " + ids); //$NON-NLS-1$
+ }
+
+ return ids;
+ }
+
+ public ServerConsumer getConsumer(long id)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Getting consumer " + id); //$NON-NLS-1$
+ }
+
+ ServerConsumer consumer = doGetConsumer(id);
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Got consumer " + consumer); //$NON-NLS-1$
+ }
+
+ return consumer;
+ }
+
+ public void destinationAdded(IDestination destination)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Adding destination " + destination); //$NON-NLS-1$
+ }
+
+ doDestinationAdded((ServerDestination)destination);
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Added destination " + destination); //$NON-NLS-1$
+ }
+ }
+
+ public void destinationRemoved(IDestination destination)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Removing destination " + destination); //$NON-NLS-1$
+ }
+
+ doDestinationRemoved((ServerDestination)destination);
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Removed destination " + destination); //$NON-NLS-1$
+ }
+ }
+
+ public void consumerAdded(IServerConsumer consumer)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Adding consumer " + consumer); //$NON-NLS-1$
+ }
+
+ doConsumerAdded((ServerConsumer)consumer);
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Added consumer " + consumer); //$NON-NLS-1$
+ }
+ }
+
+ public void consumerRemoved(IServerConsumer consumer)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Removing consumer " + consumer); //$NON-NLS-1$
+ }
+
+ doConsumerRemoved((ServerConsumer)consumer);
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Removed consumer " + consumer); //$NON-NLS-1$
+ }
+ }
+
+ public void messageReceived(Message message)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Logging received message " + message); //$NON-NLS-1$
+ }
+
+ doMessageReceived((MessageImpl)message);
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Logged received message " + message); //$NON-NLS-1$
+ }
+ }
+
+ public void messageSent(Message message, long consumerID)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Logging sent message " + message); //$NON-NLS-1$
+ }
+
+ doMessageSent((MessageImpl)message, consumerID);
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Logged sent message " + message); //$NON-NLS-1$
+ }
+ }
+
+ public void messageAcknowledged(Message message, long consumerID)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Logging acknowledged message " + message); //$NON-NLS-1$
+ }
+
+ doMessageAcknowledged((MessageImpl)message, consumerID);
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Logged acknowledged message " + message); //$NON-NLS-1$
+ }
+ }
+
+ protected abstract String[] doGetDestinationNames();
+
+ protected abstract ServerDestination doGetDestination(String name);
+
+ protected abstract long[] doGetConsumerIDs();
+
+ protected abstract ServerConsumer doGetConsumer(long id);
+
+ protected abstract void doDestinationAdded(ServerDestination destination);
+
+ protected abstract void doDestinationRemoved(ServerDestination destination);
+
+ protected abstract void doConsumerAdded(ServerConsumer consumer);
+
+ protected abstract void doConsumerRemoved(ServerConsumer consumer);
+
+ protected abstract void doMessageReceived(MessageImpl message);
+
+ protected abstract void doMessageSent(MessageImpl message, long consumerID);
+
+ protected abstract void doMessageAcknowledged(MessageImpl message, long consumerID);
+}
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 9f6ed285c5..f149857ce3 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
@@ -1,40 +1,40 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.store;
-
-import org.eclipse.net4j.jms.server.IStoreTransaction;
-
-/**
- * @author Eike Stepper
- */
-public class NOOPStore extends AbstractStore
-{
- private static final String STORE_TYPE = "NOOP"; //$NON-NLS-1$
-
- public NOOPStore()
- {
- super(STORE_TYPE);
- setInstanceID(STORE_TYPE);
- }
-
- public IStoreTransaction startTransaction()
- {
- return new NOOPTransaction(this);
- }
-
- public void commitTransaction(IStoreTransaction transaction)
- {
- }
-
- public void rollbackTransaction(IStoreTransaction transaction)
- {
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.store;
+
+import org.eclipse.net4j.jms.server.IStoreTransaction;
+
+/**
+ * @author Eike Stepper
+ */
+public class NOOPStore extends AbstractStore
+{
+ private static final String STORE_TYPE = "NOOP"; //$NON-NLS-1$
+
+ public NOOPStore()
+ {
+ super(STORE_TYPE);
+ setInstanceID(STORE_TYPE);
+ }
+
+ public IStoreTransaction startTransaction()
+ {
+ return new NOOPTransaction(this);
+ }
+
+ public void commitTransaction(IStoreTransaction transaction)
+ {
+ }
+
+ public void rollbackTransaction(IStoreTransaction transaction)
+ {
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/NOOPTransaction.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/NOOPTransaction.java
index 4e7bd0d6cc..1e99f31740 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/NOOPTransaction.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/NOOPTransaction.java
@@ -1,85 +1,85 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.store;
-
-import org.eclipse.net4j.internal.jms.MessageImpl;
-import org.eclipse.net4j.jms.internal.server.ServerConsumer;
-import org.eclipse.net4j.jms.internal.server.ServerDestination;
-
-/**
- * @author Eike Stepper
- */
-public class NOOPTransaction extends AbstractTransaction
-{
- public NOOPTransaction(AbstractStore store)
- {
- super(store);
- }
-
- @Override
- protected String[] doGetDestinationNames()
- {
- return NO_DESTINATION_NAMES;
- }
-
- @Override
- protected ServerDestination doGetDestination(String name)
- {
- return null;
- }
-
- @Override
- protected long[] doGetConsumerIDs()
- {
- return NO_CONSUMER_IDS;
- }
-
- @Override
- protected ServerConsumer doGetConsumer(long id)
- {
- return null;
- }
-
- @Override
- protected void doDestinationAdded(ServerDestination destination)
- {
- }
-
- @Override
- protected void doDestinationRemoved(ServerDestination destination)
- {
- }
-
- @Override
- protected void doConsumerAdded(ServerConsumer consumer)
- {
- }
-
- @Override
- protected void doConsumerRemoved(ServerConsumer consumer)
- {
- }
-
- @Override
- protected void doMessageReceived(MessageImpl message)
- {
- }
-
- @Override
- protected void doMessageSent(MessageImpl message, long consumerID)
- {
- }
-
- @Override
- protected void doMessageAcknowledged(MessageImpl message, long consumerID)
- {
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.store;
+
+import org.eclipse.net4j.internal.jms.MessageImpl;
+import org.eclipse.net4j.jms.internal.server.ServerConsumer;
+import org.eclipse.net4j.jms.internal.server.ServerDestination;
+
+/**
+ * @author Eike Stepper
+ */
+public class NOOPTransaction extends AbstractTransaction
+{
+ public NOOPTransaction(AbstractStore store)
+ {
+ super(store);
+ }
+
+ @Override
+ protected String[] doGetDestinationNames()
+ {
+ return NO_DESTINATION_NAMES;
+ }
+
+ @Override
+ protected ServerDestination doGetDestination(String name)
+ {
+ return null;
+ }
+
+ @Override
+ protected long[] doGetConsumerIDs()
+ {
+ return NO_CONSUMER_IDS;
+ }
+
+ @Override
+ protected ServerConsumer doGetConsumer(long id)
+ {
+ return null;
+ }
+
+ @Override
+ protected void doDestinationAdded(ServerDestination destination)
+ {
+ }
+
+ @Override
+ protected void doDestinationRemoved(ServerDestination destination)
+ {
+ }
+
+ @Override
+ protected void doConsumerAdded(ServerConsumer consumer)
+ {
+ }
+
+ @Override
+ protected void doConsumerRemoved(ServerConsumer consumer)
+ {
+ }
+
+ @Override
+ protected void doMessageReceived(MessageImpl message)
+ {
+ }
+
+ @Override
+ protected void doMessageSent(MessageImpl message, long consumerID)
+ {
+ }
+
+ @Override
+ protected void doMessageAcknowledged(MessageImpl message, long consumerID)
+ {
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/StoreException.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/StoreException.java
index a4a5b80a18..a26ac8d570 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/StoreException.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/StoreException.java
@@ -1,38 +1,38 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.store;
-
-/**
- * @author Eike Stepper
- */
-public class StoreException extends RuntimeException
-{
- private static final long serialVersionUID = 1L;
-
- public StoreException()
- {
- }
-
- public StoreException(String message)
- {
- super(message);
- }
-
- public StoreException(Throwable cause)
- {
- super(cause);
- }
-
- public StoreException(String message, Throwable cause)
- {
- super(message, cause);
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.store;
+
+/**
+ * @author Eike Stepper
+ */
+public class StoreException extends RuntimeException
+{
+ private static final long serialVersionUID = 1L;
+
+ public StoreException()
+ {
+ }
+
+ public StoreException(String message)
+ {
+ super(message);
+ }
+
+ public StoreException(Throwable cause)
+ {
+ super(cause);
+ }
+
+ public StoreException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IConnection.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IConnection.java
index 6ee6b78bcd..92e6cb9abf 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IConnection.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IConnection.java
@@ -1,25 +1,25 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.server;
-
-/**
- * @author Eike Stepper
- */
-public interface IConnection
-{
- public IServer getServer();
-
- public String getUserName();
-
- public ISession openSession(int sessionID);
-
- public ISession getSession(int sessionID);
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.server;
+
+/**
+ * @author Eike Stepper
+ */
+public interface IConnection
+{
+ public IServer getServer();
+
+ public String getUserName();
+
+ public ISession openSession(int sessionID);
+
+ public ISession getSession(int sessionID);
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IDestination.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IDestination.java
index 450922cf03..860dbe1699 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IDestination.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IDestination.java
@@ -1,29 +1,29 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.server;
-
-/**
- * @author Eike Stepper
- */
-public interface IDestination
-{
- public String getName();
-
- public Type getType();
-
- /**
- * @author Eike Stepper
- */
- public enum Type
- {
- QUEUE, TOPIC;
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.server;
+
+/**
+ * @author Eike Stepper
+ */
+public interface IDestination
+{
+ public String getName();
+
+ public Type getType();
+
+ /**
+ * @author Eike Stepper
+ */
+ public enum Type
+ {
+ QUEUE, TOPIC;
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IServer.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IServer.java
index b55ffc4e72..1123120044 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IServer.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IServer.java
@@ -1,25 +1,25 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.server;
-
-import org.eclipse.net4j.jms.internal.server.Server;
-
-/**
- * @author Eike Stepper
- */
-public interface IServer
-{
- public static final IServer INSTANCE = Server.INSTANCE;
-
- public IDestination createDestination(String name, IDestination.Type type);
-
- public IConnection logon(String userName, String password);
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.server;
+
+import org.eclipse.net4j.jms.internal.server.Server;
+
+/**
+ * @author Eike Stepper
+ */
+public interface IServer
+{
+ public static final IServer INSTANCE = Server.INSTANCE;
+
+ public IDestination createDestination(String name, IDestination.Type type);
+
+ public IConnection logon(String userName, String password);
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IServerConsumer.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IServerConsumer.java
index e882972e2f..401941ddc2 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IServerConsumer.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IServerConsumer.java
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.server;
-
-import org.eclipse.net4j.protocol.IProtocol;
-
-/**
- * @author Eike Stepper
- * @since 2.0
- */
-public interface IServerConsumer
-{
- public long getID();
-
- public IDestination getDestination();
-
- public String getMessageSelector();
-
- public ISession getSession();
-
- public IProtocol<?> getProtocol();
-
- public boolean isNoLocal();
-
- public boolean isDurable();
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.server;
+
+import org.eclipse.net4j.protocol.IProtocol;
+
+/**
+ * @author Eike Stepper
+ * @since 2.0
+ */
+public interface IServerConsumer
+{
+ public long getID();
+
+ public IDestination getDestination();
+
+ public String getMessageSelector();
+
+ public ISession getSession();
+
+ public IProtocol<?> getProtocol();
+
+ public boolean isNoLocal();
+
+ public boolean isDurable();
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/ISession.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/ISession.java
index 6a17ab5acd..d90a2eb53e 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/ISession.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/ISession.java
@@ -1,21 +1,21 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.server;
-
-/**
- * @author Eike Stepper
- */
-public interface ISession
-{
- public IConnection getConnection();
-
- public int getID();
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.server;
+
+/**
+ * @author Eike Stepper
+ */
+public interface ISession
+{
+ public IConnection getConnection();
+
+ public int getID();
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IStore.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IStore.java
index 4805633157..8320f3a822 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IStore.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IStore.java
@@ -1,27 +1,27 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.server;
-
-/**
- * @author Eike Stepper
- */
-public interface IStore
-{
- public String getStoreType();
-
- public String getInstanceID();
-
- public IStoreTransaction startTransaction();
-
- public void commitTransaction(IStoreTransaction transaction);
-
- public void rollbackTransaction(IStoreTransaction transaction);
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.server;
+
+/**
+ * @author Eike Stepper
+ */
+public interface IStore
+{
+ public String getStoreType();
+
+ public String getInstanceID();
+
+ public IStoreTransaction startTransaction();
+
+ public void commitTransaction(IStoreTransaction transaction);
+
+ public void rollbackTransaction(IStoreTransaction transaction);
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IStoreTransaction.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IStoreTransaction.java
index cd4e5df896..0c541b4e1b 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IStoreTransaction.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IStoreTransaction.java
@@ -1,68 +1,68 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.server;
-
-import javax.jms.Message;
-
-/**
- * @author Eike Stepper
- */
-public interface IStoreTransaction
-{
- public String[] getDestinationNames();
-
- /**
- * @since 2.0
- */
- public IDestination getDestination(String name);
-
- public long[] getConsumerIDs();
-
- /**
- * @since 2.0
- */
- public IServerConsumer getConsumer(long id);
-
- /**
- * @since 2.0
- */
- public void destinationAdded(IDestination destination);
-
- /**
- * @since 2.0
- */
- public void destinationRemoved(IDestination destination);
-
- /**
- * @since 2.0
- */
- public void consumerAdded(IServerConsumer consumer);
-
- /**
- * @since 2.0
- */
- public void consumerRemoved(IServerConsumer consumer);
-
- /**
- * @since 2.0
- */
- public void messageReceived(Message message);
-
- /**
- * @since 2.0
- */
- public void messageSent(Message message, long consumerID);
-
- /**
- * @since 2.0
- */
- public void messageAcknowledged(Message message, long consumerID);
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.server;
+
+import javax.jms.Message;
+
+/**
+ * @author Eike Stepper
+ */
+public interface IStoreTransaction
+{
+ public String[] getDestinationNames();
+
+ /**
+ * @since 2.0
+ */
+ public IDestination getDestination(String name);
+
+ public long[] getConsumerIDs();
+
+ /**
+ * @since 2.0
+ */
+ public IServerConsumer getConsumer(long id);
+
+ /**
+ * @since 2.0
+ */
+ public void destinationAdded(IDestination destination);
+
+ /**
+ * @since 2.0
+ */
+ public void destinationRemoved(IDestination destination);
+
+ /**
+ * @since 2.0
+ */
+ public void consumerAdded(IServerConsumer consumer);
+
+ /**
+ * @since 2.0
+ */
+ public void consumerRemoved(IServerConsumer consumer);
+
+ /**
+ * @since 2.0
+ */
+ public void messageReceived(Message message);
+
+ /**
+ * @since 2.0
+ */
+ public void messageSent(Message message, long consumerID);
+
+ /**
+ * @since 2.0
+ */
+ public void messageAcknowledged(Message message, long consumerID);
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/JMSServerUtil.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/JMSServerUtil.java
index 39c1a95e69..70d000e798 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/JMSServerUtil.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/JMSServerUtil.java
@@ -1,37 +1,37 @@
-/*
- * Copyright (c) 2004 - 2012 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.server;
-
-import org.eclipse.net4j.jms.internal.server.protocol.JMSServerProtocolFactory;
-import org.eclipse.net4j.jms.internal.server.protocol.admin.JMSAdminServerProtocolFactory;
-import org.eclipse.net4j.jms.internal.server.store.NOOPStore;
-import org.eclipse.net4j.util.container.IManagedContainer;
-
-/**
- * @author Eike Stepper
- */
-public final class JMSServerUtil
-{
- private JMSServerUtil()
- {
- }
-
- public static void prepareContainer(IManagedContainer container)
- {
- container.registerFactory(new JMSServerProtocolFactory());
- container.registerFactory(new JMSAdminServerProtocolFactory());
- }
-
- public static IStore createNOOPStore()
- {
- return new NOOPStore();
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.server;
+
+import org.eclipse.net4j.jms.internal.server.protocol.JMSServerProtocolFactory;
+import org.eclipse.net4j.jms.internal.server.protocol.admin.JMSAdminServerProtocolFactory;
+import org.eclipse.net4j.jms.internal.server.store.NOOPStore;
+import org.eclipse.net4j.util.container.IManagedContainer;
+
+/**
+ * @author Eike Stepper
+ */
+public final class JMSServerUtil
+{
+ private JMSServerUtil()
+ {
+ }
+
+ public static void prepareContainer(IManagedContainer container)
+ {
+ container.registerFactory(new JMSServerProtocolFactory());
+ container.registerFactory(new JMSAdminServerProtocolFactory());
+ }
+
+ public static IStore createNOOPStore()
+ {
+ return new NOOPStore();
+ }
+}

Back to the top