You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2014/12/05 16:38:25 UTC
[01/13] activemq-6 git commit: ACTIVEMQ6-14 Replace JNDI server with
client impl
Repository: activemq-6
Updated Branches:
refs/heads/master e419feb88 -> 46182e415
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ConnectionFactoryTest.java
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ConnectionFactoryTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ConnectionFactoryTest.java
index 5c2650c..cafe37f 100644
--- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ConnectionFactoryTest.java
+++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ConnectionFactoryTest.java
@@ -39,6 +39,7 @@ import javax.jms.XAQueueConnectionFactory;
import javax.jms.XATopicConnection;
import javax.jms.XATopicConnectionFactory;
+import org.apache.activemq.api.jms.JMSFactoryType;
import org.apache.activemq.jms.client.ActiveMQConnectionFactory;
import org.apache.activemq.jms.tests.util.ProxyAssertSupport;
import org.junit.Assert;
@@ -69,9 +70,11 @@ public class ConnectionFactoryTest extends JMSTestCase
@Test
public void testQueueConnectionFactory() throws Exception
{
+ deployConnectionFactory(0, JMSFactoryType.QUEUE_CF, "CF_QUEUE_XA_FALSE", "/CF_QUEUE_XA_FALSE");
QueueConnectionFactory qcf = (QueueConnectionFactory)ic.lookup("/CF_QUEUE_XA_FALSE");
QueueConnection qc = qcf.createQueueConnection();
qc.close();
+ undeployConnectionFactory("CF_QUEUE_XA_FALSE");
}
/**
@@ -81,9 +84,11 @@ public class ConnectionFactoryTest extends JMSTestCase
@Test
public void testTopicConnectionFactory() throws Exception
{
+ deployConnectionFactory(0, JMSFactoryType.TOPIC_CF, "CF_TOPIC_XA_FALSE", "/CF_TOPIC_XA_FALSE");
TopicConnectionFactory qcf = (TopicConnectionFactory)ic.lookup("/CF_TOPIC_XA_FALSE");
TopicConnection tc = qcf.createTopicConnection();
tc.close();
+ undeployConnectionFactory("CF_TOPIC_XA_FALSE");
}
@Test
@@ -117,12 +122,14 @@ public class ConnectionFactoryTest extends JMSTestCase
// the ConnectionFactories that ship with ActiveMQ do not have their clientID
// administratively configured.
+ deployConnectionFactory(0, JMSFactoryType.TOPIC_CF, "CF_XA_FALSE", "/CF_XA_FALSE");
ConnectionFactory cf = (ConnectionFactory)ic.lookup("/CF_XA_FALSE");
Connection c = cf.createConnection();
ProxyAssertSupport.assertNull(c.getClientID());
c.close();
+ undeployConnectionFactory("CF_XA_FALSE");
}
@Test
@@ -131,6 +138,7 @@ public class ConnectionFactoryTest extends JMSTestCase
// the ConnectionFactories that ship with ActiveMQ do not have their clientID
// administratively configured.
+ deployConnectionFactory(0, JMSFactoryType.TOPIC_CF, "CF_XA_FALSE", "/CF_XA_FALSE");
ConnectionFactory cf = (ConnectionFactory)ic.lookup("/CF_XA_FALSE");
Connection c = cf.createConnection();
@@ -140,6 +148,7 @@ public class ConnectionFactoryTest extends JMSTestCase
ProxyAssertSupport.assertEquals(testClientId, c.getClientID());
c.close();
+ undeployConnectionFactory("CF_XA_FALSE");
}
// Added for http://jira.jboss.org/jira/browse/JBMESSAGING-939
@@ -337,6 +346,19 @@ public class ConnectionFactoryTest extends JMSTestCase
@Test
public void testFactoryTypes() throws Exception
{
+ deployConnectionFactory(0, JMSFactoryType.CF, "ConnectionFactory", "/ConnectionFactory");
+ deployConnectionFactory(0, JMSFactoryType.QUEUE_XA_CF, "CF_QUEUE_XA_TRUE", "/CF_QUEUE_XA_TRUE");
+ deployConnectionFactory(0, JMSFactoryType.QUEUE_CF, "CF_QUEUE_XA_FALSE", "/CF_QUEUE_XA_FALSE");
+ deployConnectionFactory(0, JMSFactoryType.XA_CF, "CF_XA_TRUE", "/CF_XA_TRUE");
+ deployConnectionFactory(0, JMSFactoryType.CF, "CF_XA_FALSE", "/CF_XA_FALSE");
+ deployConnectionFactory(0, JMSFactoryType.QUEUE_CF, "CF_QUEUE", "/CF_QUEUE");
+ deployConnectionFactory(0, JMSFactoryType.TOPIC_CF, "CF_TOPIC", "/CF_TOPIC");
+ deployConnectionFactory(0, JMSFactoryType.TOPIC_XA_CF, "CF_TOPIC_XA_TRUE", "/CF_TOPIC_XA_TRUE");
+ deployConnectionFactory(0, JMSFactoryType.CF, "CF_GENERIC", "/CF_GENERIC");
+ deployConnectionFactory(0, JMSFactoryType.XA_CF, "CF_GENERIC_XA_TRUE", "/CF_GENERIC_XA_TRUE");
+ deployConnectionFactory(0, JMSFactoryType.CF, "CF_GENERIC_XA_FALSE", "/CF_GENERIC_XA_FALSE");
+ deployConnectionFactory(0, JMSFactoryType.TOPIC_CF, "CF_TOPIC_XA_FALSE", "/CF_TOPIC_XA_FALSE");
+
ActiveMQConnectionFactory factory = null;
factory = (ActiveMQConnectionFactory)ic.lookup("/ConnectionFactory");
@@ -398,11 +420,31 @@ public class ConnectionFactoryTest extends JMSTestCase
Assert.assertTrue(factory instanceof TopicConnectionFactory);
assertNTypes(factory, 3);
+
+ undeployConnectionFactory("ConnectionFactory");
+ undeployConnectionFactory("CF_QUEUE_XA_TRUE");
+ undeployConnectionFactory("CF_QUEUE_XA_FALSE");
+ undeployConnectionFactory("CF_XA_TRUE");
+ undeployConnectionFactory("CF_XA_FALSE");
+ undeployConnectionFactory("CF_QUEUE");
+ undeployConnectionFactory("CF_TOPIC");
+ undeployConnectionFactory("CF_TOPIC_XA_TRUE");
+ undeployConnectionFactory("CF_GENERIC");
+ undeployConnectionFactory("CF_GENERIC_XA_TRUE");
+ undeployConnectionFactory("CF_GENERIC_XA_FALSE");
+ undeployConnectionFactory("CF_TOPIC_XA_FALSE");
}
@Test
public void testConnectionTypes() throws Exception
{
+ deployConnectionFactory(0, JMSFactoryType.CF, "ConnectionFactory", "/ConnectionFactory");
+ deployConnectionFactory(0, JMSFactoryType.QUEUE_XA_CF, "CF_QUEUE_XA_TRUE", "/CF_QUEUE_XA_TRUE");
+ deployConnectionFactory(0, JMSFactoryType.XA_CF, "CF_XA_TRUE", "/CF_XA_TRUE");
+ deployConnectionFactory(0, JMSFactoryType.QUEUE_CF, "CF_QUEUE", "/CF_QUEUE");
+ deployConnectionFactory(0, JMSFactoryType.TOPIC_CF, "CF_TOPIC", "/CF_TOPIC");
+ deployConnectionFactory(0, JMSFactoryType.TOPIC_XA_CF, "CF_TOPIC_XA_TRUE", "/CF_TOPIC_XA_TRUE");
+
Connection genericConnection = null;
XAConnection xaConnection = null;
QueueConnection queueConnection = null;
@@ -440,6 +482,13 @@ public class ConnectionFactoryTest extends JMSTestCase
topicConnection.close();
xaQueueConnection.close();
xaTopicConnection.close();
+
+ undeployConnectionFactory("ConnectionFactory");
+ undeployConnectionFactory("CF_QUEUE_XA_TRUE");
+ undeployConnectionFactory("CF_XA_TRUE");
+ undeployConnectionFactory("CF_QUEUE");
+ undeployConnectionFactory("CF_TOPIC");
+ undeployConnectionFactory("CF_TOPIC_XA_TRUE");
}
private void assertConnectionType(Connection conn, String type)
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/SessionTest.java
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/SessionTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/SessionTest.java
index bf48bca..c062fe8 100644
--- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/SessionTest.java
+++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/SessionTest.java
@@ -33,6 +33,7 @@ import javax.jms.TopicSession;
import javax.jms.XAConnection;
import javax.jms.XASession;
+import org.apache.activemq.api.jms.JMSFactoryType;
import org.apache.activemq.jms.tests.util.ProxyAssertSupport;
import org.junit.Test;
@@ -97,6 +98,7 @@ public class SessionTest extends ActiveMQServerTestCase
@Test
public void testGetSession2() throws Exception
{
+ deployConnectionFactory(0, JMSFactoryType.CF, "ConnectionFactory", "/ConnectionFactory");
XAConnection conn = getXAConnectionFactory().createXAConnection();
XASession sess = conn.createXASession();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/SimpleJMSStreamMessage.java
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/SimpleJMSStreamMessage.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/SimpleJMSStreamMessage.java
index bd8b142..09274e6 100644
--- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/SimpleJMSStreamMessage.java
+++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/message/SimpleJMSStreamMessage.java
@@ -26,8 +26,6 @@ import javax.jms.MessageNotReadableException;
import javax.jms.MessageNotWriteableException;
import javax.jms.StreamMessage;
-import org.jboss.util.Primitives;
-
/**
* @author <a href="mailto:ovidiu@feodorov.com">Ovidiu Feodorov</a>
* @version $Revision$
@@ -555,7 +553,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe
{
throw new MessageNotWriteableException("The message body is readonly");
}
- content.add(Primitives.valueOf(value));
+ content.add(new Boolean(value));
}
public void writeByte(final byte value) throws JMSException
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/WrappedJNDIServer.java
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/WrappedJNDIServer.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/WrappedJNDIServer.java
deleted file mode 100644
index b1d55db..0000000
--- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/WrappedJNDIServer.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.jms.tests.tools;
-
-import java.net.UnknownHostException;
-
-import org.jnp.server.Main;
-import org.jnp.server.NamingBean;
-
-/**
- * A WrappedJNDIServer
- *
- * We wrap the JBoss AS JNDI server, since we want to introduce a pause of 500 milliseconds on stop()
- *
- * This is because there is a bug in the JBoss AS class whereby the socket can remaining open some time after
- * stop() is called.
- *
- * So if you call stop() then start() quickly after, you can hit an exception:
- *
- * java.rmi.server.ExportException: Port already in use: 1098; nested exception is:
- * java.net.BindException: Address already in use
- *
- * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
- *
- *
- */
-public class WrappedJNDIServer
-{
- private final Main main;
-
- public WrappedJNDIServer()
- {
- main = new Main();
- }
-
- public void start() throws Exception
- {
- main.start();
- }
-
- public void stop()
- {
- main.stop();
-
- try
- {
- Thread.sleep(500);
- }
- catch (Exception e)
- {
- }
- }
-
- public void setNamingInfo(final NamingBean naming)
- {
- main.setNamingInfo(naming);
- }
-
- public void setPort(final int port)
- {
- main.setPort(port);
- }
-
- public void setBindAddress(final String bindAddress) throws UnknownHostException
- {
- main.setBindAddress(bindAddress);
- }
-
- public void setRmiPort(final int port)
- {
- main.setRmiPort(port);
- }
-
- public void setRmiBindAddress(final String address) throws UnknownHostException
- {
- main.setRmiBindAddress(address);
- }
-}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/InVMContext.java
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/InVMContext.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/InVMContext.java
index bcf1236..4acc367 100644
--- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/InVMContext.java
+++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/InVMContext.java
@@ -276,7 +276,6 @@ public class InVMContext implements Context, Serializable
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put("java.naming.factory.initial", InVMInitialContextFactory.class.getCanonicalName());
- env.put("java.naming.provider.url", "org.jboss.naming:org.jnp.interface");
return env;
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/InVMInitialContextFactory.java
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/InVMInitialContextFactory.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/InVMInitialContextFactory.java
index 6d6c2a4..2924514 100644
--- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/InVMInitialContextFactory.java
+++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/InVMInitialContextFactory.java
@@ -56,8 +56,6 @@ public class InVMInitialContextFactory implements InitialContextFactory
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put("java.naming.factory.initial", "org.apache.activemq.jms.tests.tools.container.InVMInitialContextFactory");
- env.put("java.naming.provider.url", "org.jboss.naming:org.jnp.interface");
- // env.put("java.naming.factory.url.pkgs", "");
env.put(Constants.SERVER_INDEX_PROPERTY_NAME, Integer.toString(serverIndex));
return env;
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/LocalTestServer.java
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/LocalTestServer.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/LocalTestServer.java
index 25bede3..920ac21 100644
--- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/LocalTestServer.java
+++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/LocalTestServer.java
@@ -45,8 +45,6 @@ import org.apache.activemq.jms.server.JMSServerManager;
import org.apache.activemq.jms.server.impl.JMSServerManagerImpl;
import org.apache.activemq.jms.tests.JmsTestLogger;
import org.apache.activemq.spi.core.security.ActiveMQSecurityManagerImpl;
-import org.jnp.server.Main;
-import org.jnp.server.NamingBeanImpl;
/**
* @author <a href="mailto:ovidiu@feodorov.com">Ovidiu Feodorov</a>
@@ -62,7 +60,6 @@ public class LocalTestServer implements Server, Runnable
private boolean started = false;
private final HashMap<String, List<String>> allBindings = new HashMap<String, List<String>>();
- private Main jndiServer;
private JMSServerManagerImpl jmsServerManager;
// Static ---------------------------------------------------------------------------------------
@@ -116,14 +113,6 @@ public class LocalTestServer implements Server, Runnable
JmsTestLogger.LOGGER.info("Deleted dir: " + dir.getAbsolutePath() + " deleted: " + deleted);
}
- org.jnp.server.NamingBeanImpl namingBean = new NamingBeanImpl();
- jndiServer = new Main();
- jndiServer.setNamingInfo(namingBean);
- jndiServer.setPort(1099);
- jndiServer.setBindAddress("localhost");
- jndiServer.setRmiPort(1098);
- jndiServer.setRmiBindAddress("localhost");
-
javax.management.MBeanServer beanServer = java.lang.management.ManagementFactory.getPlatformMBeanServer();
FileConfiguration fileConfiguration = new FileConfiguration();
ActiveMQSecurityManagerImpl securityManager = new ActiveMQSecurityManagerImpl();
@@ -131,8 +120,6 @@ public class LocalTestServer implements Server, Runnable
jmsServerManager = new JMSServerManagerImpl(activeMQServer);
System.setProperty(Constants.SERVER_INDEX_PROPERTY_NAME, "" + getServerID());
- namingBean.start();
- jndiServer.start();
fileConfiguration.start();
jmsServerManager.start();
started = true;
@@ -160,11 +147,9 @@ public class LocalTestServer implements Server, Runnable
public synchronized boolean stop() throws Exception
{
jmsServerManager.stop();
- jndiServer.stop();
started = false;
unbindAll();
jmsServerManager = null;
- jndiServer.stop();
return true;
}
@@ -242,19 +227,24 @@ public class LocalTestServer implements Server, Runnable
public void deployConnectionFactory(final String clientId, final String objectName, final String ... jndiBindings) throws Exception
{
- deployConnectionFactory(clientId, objectName, -1, -1, -1, -1, false, false, -1, false, jndiBindings);
+ deployConnectionFactory(clientId, JMSFactoryType.CF, objectName, -1, -1, -1, -1, false, false, -1, false, jndiBindings);
}
public void deployConnectionFactory(final String objectName,
final int consumerWindowSize,
final String ... jndiBindings) throws Exception
{
- deployConnectionFactory(null, objectName, consumerWindowSize, -1, -1, -1, false, false, -1, false, jndiBindings);
+ deployConnectionFactory(null, JMSFactoryType.CF, objectName, consumerWindowSize, -1, -1, -1, false, false, -1, false, jndiBindings);
}
public void deployConnectionFactory(final String objectName, final String ... jndiBindings) throws Exception
{
- deployConnectionFactory(null, objectName, -1, -1, -1, -1, false, false, -1, false, jndiBindings);
+ deployConnectionFactory(null, JMSFactoryType.CF, objectName, -1, -1, -1, -1, false, false, -1, false, jndiBindings);
+ }
+
+ public void deployConnectionFactory(final String objectName, JMSFactoryType type, final String ... jndiBindings) throws Exception
+ {
+ deployConnectionFactory(null, type, objectName, -1, -1, -1, -1, false, false, -1, false, jndiBindings);
}
public void deployConnectionFactory(final String objectName,
@@ -265,6 +255,7 @@ public class LocalTestServer implements Server, Runnable
final String ... jndiBindings) throws Exception
{
this.deployConnectionFactory(null,
+ JMSFactoryType.CF,
objectName,
prefetchSize,
defaultTempQueueFullSize,
@@ -283,6 +274,7 @@ public class LocalTestServer implements Server, Runnable
final String ... jndiBindings) throws Exception
{
this.deployConnectionFactory(null,
+ JMSFactoryType.CF,
objectName,
-1,
-1,
@@ -296,6 +288,7 @@ public class LocalTestServer implements Server, Runnable
}
public void deployConnectionFactory(final String clientId,
+ final JMSFactoryType type,
final String objectName,
final int prefetchSize,
final int defaultTempQueueFullSize,
@@ -315,7 +308,7 @@ public class LocalTestServer implements Server, Runnable
getJMSServerManager().createConnectionFactory(objectName,
false,
- JMSFactoryType.CF,
+ type,
connectors,
clientId,
ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
@@ -392,7 +385,6 @@ public class LocalTestServer implements Server, Runnable
props.setProperty("java.naming.factory.initial",
"org.apache.activemq.jms.tests.tools.container.InVMInitialContextFactory");
props.setProperty(Constants.SERVER_INDEX_PROPERTY_NAME, "" + getServerID());
- // props.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
return new InitialContext(props);
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/NonSerializableFactory.java
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/NonSerializableFactory.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/NonSerializableFactory.java
index deec225..dcf7c9a 100644
--- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/NonSerializableFactory.java
+++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/NonSerializableFactory.java
@@ -26,11 +26,8 @@ import javax.naming.Name;
import javax.naming.NamingException;
import javax.naming.RefAddr;
import javax.naming.Reference;
-import javax.naming.StringRefAddr;
import javax.naming.spi.ObjectFactory;
-import org.jboss.util.naming.Util;
-
/**
* used by the default context when running in embedded local configuration
* @author <a href="ataylor@redhat.com">Andy Taylor</a>
@@ -42,47 +39,47 @@ public final class NonSerializableFactory implements ObjectFactory
{
}
- public static void unbind(final Context ctx, final String strName) throws NamingException
- {
- Name name = ctx.getNameParser("").parse(strName);
- int size = name.size();
- String atom = name.get(size - 1);
- Context parentCtx = Util.createSubcontext(ctx, name.getPrefix(size - 1));
- String key = new StringBuilder().append(parentCtx.getNameInNamespace()).append("/").append(atom).toString();
- NonSerializableFactory.getWrapperMap().remove(key);
- Util.unbind(ctx, strName);
- }
-
- public static void rebind(final Context ctx, final String strName, final Object value) throws NamingException
- {
- Name name = ctx.getNameParser("").parse(strName);
- int size = name.size();
- String atom = name.get(size - 1);
- Context parentCtx = Util.createSubcontext(ctx, name.getPrefix(size - 1));
- String key = new StringBuilder().append(parentCtx.getNameInNamespace()).append("/").append(atom).toString();
- NonSerializableFactory.getWrapperMap().put(key, value);
- String className = value.getClass().getName();
- String factory = NonSerializableFactory.class.getName();
- StringRefAddr addr = new StringRefAddr("nns", key);
- Reference memoryRef = new Reference(className, addr, factory, null);
- parentCtx.rebind(atom, memoryRef);
- }
-
- public static void bind(final Context ctx, final String strName, final Object value) throws NamingException
- {
- Name name = ctx.getNameParser("").parse(strName);
- int size = name.size();
- String atom = name.get(size - 1);
- Context parentCtx = Util.createSubcontext(ctx, name.getPrefix(size - 1));
- String key = new StringBuilder().append(parentCtx.getNameInNamespace()).append("/").append(atom).toString();
- NonSerializableFactory.getWrapperMap().put(key, value);
- String className = value.getClass().getName();
- String factory = NonSerializableFactory.class.getName();
- StringRefAddr addr = new StringRefAddr("nns", key);
- Reference memoryRef = new Reference(className, addr, factory, null);
-
- parentCtx.bind(atom, memoryRef);
- }
+// public static void unbind(final Context ctx, final String strName) throws NamingException
+// {
+// Name name = ctx.getNameParser("").parse(strName);
+// int size = name.size();
+// String atom = name.get(size - 1);
+// Context parentCtx = Util.createSubcontext(ctx, name.getPrefix(size - 1));
+// String key = new StringBuilder().append(parentCtx.getNameInNamespace()).append("/").append(atom).toString();
+// NonSerializableFactory.getWrapperMap().remove(key);
+// Util.unbind(ctx, strName);
+// }
+//
+// public static void rebind(final Context ctx, final String strName, final Object value) throws NamingException
+// {
+// Name name = ctx.getNameParser("").parse(strName);
+// int size = name.size();
+// String atom = name.get(size - 1);
+// Context parentCtx = Util.createSubcontext(ctx, name.getPrefix(size - 1));
+// String key = new StringBuilder().append(parentCtx.getNameInNamespace()).append("/").append(atom).toString();
+// NonSerializableFactory.getWrapperMap().put(key, value);
+// String className = value.getClass().getName();
+// String factory = NonSerializableFactory.class.getName();
+// StringRefAddr addr = new StringRefAddr("nns", key);
+// Reference memoryRef = new Reference(className, addr, factory, null);
+// parentCtx.rebind(atom, memoryRef);
+// }
+//
+// public static void bind(final Context ctx, final String strName, final Object value) throws NamingException
+// {
+// Name name = ctx.getNameParser("").parse(strName);
+// int size = name.size();
+// String atom = name.get(size - 1);
+// Context parentCtx = Util.createSubcontext(ctx, name.getPrefix(size - 1));
+// String key = new StringBuilder().append(parentCtx.getNameInNamespace()).append("/").append(atom).toString();
+// NonSerializableFactory.getWrapperMap().put(key, value);
+// String className = value.getClass().getName();
+// String factory = NonSerializableFactory.class.getName();
+// StringRefAddr addr = new StringRefAddr("nns", key);
+// Reference memoryRef = new Reference(className, addr, factory, null);
+//
+// parentCtx.bind(atom, memoryRef);
+// }
public static Object lookup(final String name) throws NamingException
{
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/Server.java
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/Server.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/Server.java
index 1015473..efa597f 100644
--- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/Server.java
+++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/tools/container/Server.java
@@ -22,6 +22,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Set;
+import org.apache.activemq.api.jms.JMSFactoryType;
import org.apache.activemq.core.security.Role;
import org.apache.activemq.core.server.ActiveMQServer;
import org.apache.activemq.jms.server.JMSServerManager;
@@ -136,6 +137,7 @@ public interface Server extends Remote
*/
// boolean undeployDestinationProgrammatically(boolean isQueue, String name) throws Exception;
void deployConnectionFactory(String clientId,
+ JMSFactoryType type,
String objectName,
int prefetchSize,
int defaultTempQueueFullSize,
@@ -168,6 +170,10 @@ public interface Server extends Remote
void deployConnectionFactory(String objectName,
final String... jndiBindings) throws Exception;
+ void deployConnectionFactory(String objectName,
+ JMSFactoryType type,
+ final String... jndiBindings) throws Exception;
+
void undeployConnectionFactory(String objectName) throws Exception;
void configureSecurityForDestination(String destName, boolean isQueue, Set<Role> roles) throws Exception;
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/jms-tests/src/test/resources/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/resources/activemq-jms.xml b/tests/jms-tests/src/test/resources/activemq-jms.xml
index 8d32412..36b800a 100644
--- a/tests/jms-tests/src/test/resources/activemq-jms.xml
+++ b/tests/jms-tests/src/test/resources/activemq-jms.xml
@@ -2,125 +2,5 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- <entry name="/ConnectionFactory"/>
- <entry name="/XAConnectionFactory"/>
- <entry name="java:/ConnectionFactory"/>
- <entry name="java:/XAConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <connection-factory name="JMSConnectionFactory1">
- <xa>true</xa>
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="/CF_XA_TRUE"/>
- </entries>
- </connection-factory>
-
- <connection-factory name="JMSConnectionFactory2">
- <xa>false</xa>
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="/CF_XA_FALSE"/>
- </entries>
- </connection-factory>
-
- <connection-factory name="JMSConnectionFactory3" signature="generic">
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="/CF_GENERIC"/>
- </entries>
- </connection-factory>
-
- <connection-factory name="JMSConnectionFactory4" signature="generic">
- <xa>true</xa>
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="/CF_GENERIC_XA_TRUE"/>
- </entries>
- </connection-factory>
-
- <connection-factory name="JMSConnectionFactory5" signature="generic">
- <xa>false</xa>
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="/CF_GENERIC_XA_FALSE"/>
- </entries>
- </connection-factory>
-
- <connection-factory name="JMSConnectionFactory6" signature="queue">
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="/CF_QUEUE"/>
- </entries>
- </connection-factory>
-
- <connection-factory name="JMSConnectionFactory7" signature="queue">
- <xa>true</xa>
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="/CF_QUEUE_XA_TRUE"/>
- </entries>
- </connection-factory>
-
- <connection-factory name="JMSConnectionFactory8" signature="queue">
- <xa>false</xa>
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="/CF_QUEUE_XA_FALSE"/>
- </entries>
- </connection-factory>
-
- <connection-factory name="JMSConnectionFactory9" signature="topic">
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="/CF_TOPIC"/>
- </entries>
- </connection-factory>
-
- <connection-factory name="JMSConnectionFactory10" signature="topic">
- <xa>true</xa>
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="/CF_TOPIC_XA_TRUE"/>
- </entries>
- </connection-factory>
-
- <connection-factory name="JMSConnectionFactory11" signature="topic">
- <xa>false</xa>
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="/CF_TOPIC_XA_FALSE"/>
- </entries>
- </connection-factory>
-
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/jms-tests/src/test/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/resources/jndi.properties b/tests/jms-tests/src/test/resources/jndi.properties
index e2a9832..ca08725 100644
--- a/tests/jms-tests/src/test/resources/jndi.properties
+++ b/tests/jms-tests/src/test/resources/jndi.properties
@@ -1,2 +1 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
\ No newline at end of file
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/joram-tests/pom.xml
----------------------------------------------------------------------
diff --git a/tests/joram-tests/pom.xml b/tests/joram-tests/pom.xml
index 5e59d20..b157500 100644
--- a/tests/joram-tests/pom.xml
+++ b/tests/joram-tests/pom.xml
@@ -67,10 +67,6 @@
<artifactId>junit</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- </dependency>
- <dependency>
<groupId>apache-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/joram-tests/src/test/java/org/apache/activemq/jms/AbstractAdmin.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/apache/activemq/jms/AbstractAdmin.java b/tests/joram-tests/src/test/java/org/apache/activemq/jms/AbstractAdmin.java
index 65b8639..d123e6d 100644
--- a/tests/joram-tests/src/test/java/org/apache/activemq/jms/AbstractAdmin.java
+++ b/tests/joram-tests/src/test/java/org/apache/activemq/jms/AbstractAdmin.java
@@ -19,7 +19,6 @@ package org.apache.activemq.jms;
import javax.naming.InitialContext;
import javax.naming.NamingException;
-import org.jboss.util.NotImplementedException;
import org.objectweb.jtests.jms.admin.Admin;
/**
@@ -51,22 +50,22 @@ public class AbstractAdmin implements Admin
public void createConnectionFactory(final String name)
{
- throw new NotImplementedException("FIXME NYI createConnectionFactory");
+ throw new RuntimeException("FIXME NYI createConnectionFactory");
}
public void deleteConnectionFactory(final String name)
{
- throw new NotImplementedException("FIXME NYI deleteConnectionFactory");
+ throw new RuntimeException("FIXME NYI deleteConnectionFactory");
}
public void createQueue(final String name)
{
- throw new NotImplementedException("FIXME NYI createQueue");
+ throw new RuntimeException("FIXME NYI createQueue");
}
public void deleteQueue(final String name)
{
- throw new NotImplementedException("FIXME NYI deleteQueue");
+ throw new RuntimeException("FIXME NYI deleteQueue");
}
public void createQueueConnectionFactory(final String name)
@@ -81,12 +80,12 @@ public class AbstractAdmin implements Admin
public void createTopic(final String name)
{
- throw new NotImplementedException("FIXME NYI createTopic");
+ throw new RuntimeException("FIXME NYI createTopic");
}
public void deleteTopic(final String name)
{
- throw new NotImplementedException("FIXME NYI deleteTopic");
+ throw new RuntimeException("FIXME NYI deleteTopic");
}
public void createTopicConnectionFactory(final String name)
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/joram-tests/src/test/java/org/apache/activemq/jms/ActiveMQAdmin.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/apache/activemq/jms/ActiveMQAdmin.java b/tests/joram-tests/src/test/java/org/apache/activemq/jms/ActiveMQAdmin.java
new file mode 100644
index 0000000..4e9779b
--- /dev/null
+++ b/tests/joram-tests/src/test/java/org/apache/activemq/jms/ActiveMQAdmin.java
@@ -0,0 +1,339 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.jms;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.util.Hashtable;
+
+import org.apache.activemq.api.config.ActiveMQDefaultConfiguration;
+import org.apache.activemq.api.core.TransportConfiguration;
+import org.apache.activemq.api.core.client.ClientMessage;
+import org.apache.activemq.api.core.client.ClientRequestor;
+import org.apache.activemq.api.core.client.ClientSession;
+import org.apache.activemq.api.core.client.ClientSessionFactory;
+import org.apache.activemq.api.core.client.ActiveMQClient;
+import org.apache.activemq.api.core.client.ServerLocator;
+import org.apache.activemq.api.core.management.ManagementHelper;
+import org.apache.activemq.api.core.management.ResourceNames;
+import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory;
+import org.apache.activemq.tests.util.SpawnedVMSupport;
+import org.junit.Assert;
+import org.objectweb.jtests.jms.admin.Admin;
+
+/**
+ * A ActiveMQAdmin
+ *
+ * @author <a href="jmesnil@redhat.com">Jeff Mesnil</a>
+ */
+public class ActiveMQAdmin implements Admin
+{
+
+ private ClientSession clientSession;
+
+ private ClientRequestor requestor;
+
+ private Context context;
+
+ private Process serverProcess;
+
+ private ClientSessionFactory sf;
+
+ ServerLocator serverLocator;
+ /**
+ * Determines whether to act or 'no-op' on {@link ActiveMQAdmin#serverStart()} and
+ * {@link ActiveMQAdmin#serverStop()}. This is used when testing combinations of client and
+ * servers with different versions.
+ *
+ * @see https://github.com/activemq/activemq-version-tests
+ */
+ private final boolean serverLifeCycleActive;
+ private static final String SERVER_LIVE_CYCLE_PROPERTY = "org.apache.activemq.jms.ActiveMQAdmin.serverLifeCycle";
+
+ public ActiveMQAdmin()
+ {
+ serverLifeCycleActive = Boolean.valueOf(System.getProperty(SERVER_LIVE_CYCLE_PROPERTY, "true"));
+ try
+ {
+ Hashtable<String, String> env = new Hashtable<String, String>();
+ env.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+ env.put("java.naming.provider.url", "tcp://localhost:5445");
+ context = new InitialContext(env);
+ }
+ catch (NamingException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ public void start() throws Exception
+ {
+ serverLocator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName()));
+ sf = serverLocator.createSessionFactory();
+ clientSession = sf.createSession(ActiveMQDefaultConfiguration.getDefaultClusterUser(),
+ ActiveMQDefaultConfiguration.getDefaultClusterPassword(),
+ false,
+ true,
+ true,
+ false,
+ 1);
+ requestor = new ClientRequestor(clientSession, ActiveMQDefaultConfiguration.getDefaultManagementAddress());
+ clientSession.start();
+
+ }
+
+ public void stop() throws Exception
+ {
+ requestor.close();
+
+ if (sf != null)
+ {
+ sf.close();
+ }
+
+ if (serverLocator != null)
+ {
+ serverLocator.close();
+ }
+
+ sf = null;
+ serverLocator = null;
+ }
+
+ public void createConnectionFactory(final String name)
+ {
+ createConnection(name, 0);
+ }
+
+ private void createConnection(final String name, final int cfType)
+ {
+ try
+ {
+ invokeSyncOperation(ResourceNames.JMS_SERVER,
+ "createConnectionFactory",
+ name,
+ false,
+ false,
+ cfType,
+ "netty",
+ name);
+ }
+ catch (Exception e)
+ {
+ throw new IllegalStateException(e);
+ }
+
+ }
+
+ public Context createContext() throws NamingException
+ {
+ return context;
+ }
+
+ public void createQueue(final String name)
+ {
+ Boolean result;
+ try
+ {
+ result = (Boolean) invokeSyncOperation(ResourceNames.JMS_SERVER, "createQueue", name, name);
+ Assert.assertEquals(true, result.booleanValue());
+ }
+ catch (Exception e)
+ {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ public void createQueueConnectionFactory(final String name)
+ {
+ createConnection(name, 1);
+ }
+
+ public void createTopic(final String name)
+ {
+ Boolean result;
+ try
+ {
+ result = (Boolean) invokeSyncOperation(ResourceNames.JMS_SERVER, "createTopic", name, name);
+ Assert.assertEquals(true, result.booleanValue());
+ }
+ catch (Exception e)
+ {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ public void createTopicConnectionFactory(final String name)
+ {
+ createConnection(name, 2);
+ }
+
+ public void deleteConnectionFactory(final String name)
+ {
+ try
+ {
+ invokeSyncOperation(ResourceNames.JMS_SERVER, "destroyConnectionFactory", name);
+ }
+ catch (Exception e)
+ {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ public void deleteQueue(final String name)
+ {
+ Boolean result;
+ try
+ {
+ result = (Boolean) invokeSyncOperation(ResourceNames.JMS_SERVER, "destroyQueue", name);
+ Assert.assertEquals(true, result.booleanValue());
+ }
+ catch (Exception e)
+ {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ public void deleteQueueConnectionFactory(final String name)
+ {
+ deleteConnectionFactory(name);
+ }
+
+ public void deleteTopic(final String name)
+ {
+ Boolean result;
+ try
+ {
+ result = (Boolean) invokeSyncOperation(ResourceNames.JMS_SERVER, "destroyTopic", name);
+ Assert.assertEquals(true, result.booleanValue());
+ }
+ catch (Exception e)
+ {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ public void deleteTopicConnectionFactory(final String name)
+ {
+ deleteConnectionFactory(name);
+ }
+
+ public String getName()
+ {
+ return this.getClass().getName();
+ }
+
+ public void startServer() throws Exception
+ {
+ if (!serverLifeCycleActive)
+ {
+ return;
+ }
+
+ String[] vmArgs = new String[]{};
+ serverProcess = SpawnedVMSupport.spawnVM(SpawnedJMSServer.class.getName(), vmArgs, false);
+ InputStreamReader isr = new InputStreamReader(serverProcess.getInputStream());
+
+ final BufferedReader br = new BufferedReader(isr);
+ String line = null;
+ while ((line = br.readLine()) != null)
+ {
+ System.out.println("SERVER: " + line);
+ line.replace('|', '\n');
+ if ("OK".equals(line.trim()))
+ {
+ new Thread()
+ {
+ @Override
+ public void run()
+ {
+ try
+ {
+ String line1 = null;
+ while ((line1 = br.readLine()) != null)
+ {
+ System.out.println("SERVER: " + line1);
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+ }.start();
+ return;
+ }
+ else if ("KO".equals(line.trim()))
+ {
+ // something went wrong with the server, destroy it:
+ serverProcess.destroy();
+ throw new IllegalStateException("Unable to start the spawned server :" + line);
+ }
+ }
+ }
+
+ public void stopServer() throws Exception
+ {
+ if (!serverLifeCycleActive)
+ {
+ return;
+ }
+ OutputStreamWriter osw = new OutputStreamWriter(serverProcess.getOutputStream());
+ osw.write("STOP\n");
+ osw.flush();
+ int exitValue = serverProcess.waitFor();
+ if (exitValue != 0)
+ {
+ serverProcess.destroy();
+ }
+ }
+
+ private Object invokeSyncOperation(final String resourceName, final String operationName, final Object... parameters) throws Exception
+ {
+ ClientMessage message = clientSession.createMessage(false);
+ ManagementHelper.putOperationInvocation(message, resourceName, operationName, parameters);
+ ClientMessage reply;
+ try
+ {
+ reply = requestor.request(message, 3000);
+ }
+ catch (Exception e)
+ {
+ throw new IllegalStateException("Exception while invoking " + operationName + " on " + resourceName, e);
+ }
+ if (reply == null)
+ {
+ throw new IllegalStateException("no reply received when invoking " + operationName + " on " + resourceName);
+ }
+ if (!ManagementHelper.hasOperationSucceeded(reply))
+ {
+ throw new IllegalStateException("operation failed when invoking " + operationName +
+ " on " +
+ resourceName +
+ ": " +
+ ManagementHelper.getResult(reply));
+ }
+ return ManagementHelper.getResult(reply);
+ }
+
+ // Inner classes -------------------------------------------------
+
+}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/joram-tests/src/test/java/org/apache/activemq/jms/ActiveMQQAdmin.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/apache/activemq/jms/ActiveMQQAdmin.java b/tests/joram-tests/src/test/java/org/apache/activemq/jms/ActiveMQQAdmin.java
deleted file mode 100644
index acd05bb..0000000
--- a/tests/joram-tests/src/test/java/org/apache/activemq/jms/ActiveMQQAdmin.java
+++ /dev/null
@@ -1,340 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.jms;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.util.Hashtable;
-
-import org.apache.activemq.api.config.ActiveMQDefaultConfiguration;
-import org.apache.activemq.api.core.TransportConfiguration;
-import org.apache.activemq.api.core.client.ClientMessage;
-import org.apache.activemq.api.core.client.ClientRequestor;
-import org.apache.activemq.api.core.client.ClientSession;
-import org.apache.activemq.api.core.client.ClientSessionFactory;
-import org.apache.activemq.api.core.client.ActiveMQClient;
-import org.apache.activemq.api.core.client.ServerLocator;
-import org.apache.activemq.api.core.management.ManagementHelper;
-import org.apache.activemq.api.core.management.ResourceNames;
-import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory;
-import org.apache.activemq.tests.util.SpawnedVMSupport;
-import org.junit.Assert;
-import org.objectweb.jtests.jms.admin.Admin;
-
-/**
- * A ActiveMQAdmin
- *
- * @author <a href="jmesnil@redhat.com">Jeff Mesnil</a>
- */
-public class ActiveMQQAdmin implements Admin
-{
-
- private ClientSession clientSession;
-
- private ClientRequestor requestor;
-
- private Context context;
-
- private Process serverProcess;
-
- private ClientSessionFactory sf;
-
- ServerLocator serverLocator;
- /**
- * Determines whether to act or 'no-op' on {@link ActiveMQQAdmin#serverStart()} and
- * {@link ActiveMQQAdmin#serverStop()}. This is used when testing combinations of client and
- * servers with different versions.
- *
- * @see https://github.com/activemq/activemq-version-tests
- */
- private final boolean serverLifeCycleActive;
- private static final String SERVER_LIVE_CYCLE_PROPERTY = "org.apache.activemq.jms.ActiveMQAdmin.serverLifeCycle";
-
- public ActiveMQQAdmin()
- {
- serverLifeCycleActive = Boolean.valueOf(System.getProperty(SERVER_LIVE_CYCLE_PROPERTY, "true"));
- try
- {
- Hashtable<String, String> env = new Hashtable<String, String>();
- env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
- env.put("java.naming.provider.url", "jnp://localhost:1099");
- env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
- context = new InitialContext(env);
- }
- catch (NamingException e)
- {
- e.printStackTrace();
- }
- }
-
- public void start() throws Exception
- {
- serverLocator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName()));
- sf = serverLocator.createSessionFactory();
- clientSession = sf.createSession(ActiveMQDefaultConfiguration.getDefaultClusterUser(),
- ActiveMQDefaultConfiguration.getDefaultClusterPassword(),
- false,
- true,
- true,
- false,
- 1);
- requestor = new ClientRequestor(clientSession, ActiveMQDefaultConfiguration.getDefaultManagementAddress());
- clientSession.start();
-
- }
-
- public void stop() throws Exception
- {
- requestor.close();
-
- if (sf != null)
- {
- sf.close();
- }
-
- if (serverLocator != null)
- {
- serverLocator.close();
- }
-
- sf = null;
- serverLocator = null;
- }
-
- public void createConnectionFactory(final String name)
- {
- createConnection(name, 0);
- }
-
- private void createConnection(final String name, final int cfType)
- {
- try
- {
- invokeSyncOperation(ResourceNames.JMS_SERVER,
- "createConnectionFactory",
- name,
- false,
- false,
- cfType,
- "netty",
- name);
- }
- catch (Exception e)
- {
- throw new IllegalStateException(e);
- }
-
- }
-
- public Context createContext() throws NamingException
- {
- return context;
- }
-
- public void createQueue(final String name)
- {
- Boolean result;
- try
- {
- result = (Boolean) invokeSyncOperation(ResourceNames.JMS_SERVER, "createQueue", name, name);
- Assert.assertEquals(true, result.booleanValue());
- }
- catch (Exception e)
- {
- throw new IllegalStateException(e);
- }
- }
-
- public void createQueueConnectionFactory(final String name)
- {
- createConnection(name, 1);
- }
-
- public void createTopic(final String name)
- {
- Boolean result;
- try
- {
- result = (Boolean) invokeSyncOperation(ResourceNames.JMS_SERVER, "createTopic", name, name);
- Assert.assertEquals(true, result.booleanValue());
- }
- catch (Exception e)
- {
- throw new IllegalStateException(e);
- }
- }
-
- public void createTopicConnectionFactory(final String name)
- {
- createConnection(name, 2);
- }
-
- public void deleteConnectionFactory(final String name)
- {
- try
- {
- invokeSyncOperation(ResourceNames.JMS_SERVER, "destroyConnectionFactory", name);
- }
- catch (Exception e)
- {
- throw new IllegalStateException(e);
- }
- }
-
- public void deleteQueue(final String name)
- {
- Boolean result;
- try
- {
- result = (Boolean) invokeSyncOperation(ResourceNames.JMS_SERVER, "destroyQueue", name);
- Assert.assertEquals(true, result.booleanValue());
- }
- catch (Exception e)
- {
- throw new IllegalStateException(e);
- }
- }
-
- public void deleteQueueConnectionFactory(final String name)
- {
- deleteConnectionFactory(name);
- }
-
- public void deleteTopic(final String name)
- {
- Boolean result;
- try
- {
- result = (Boolean) invokeSyncOperation(ResourceNames.JMS_SERVER, "destroyTopic", name);
- Assert.assertEquals(true, result.booleanValue());
- }
- catch (Exception e)
- {
- throw new IllegalStateException(e);
- }
- }
-
- public void deleteTopicConnectionFactory(final String name)
- {
- deleteConnectionFactory(name);
- }
-
- public String getName()
- {
- return this.getClass().getName();
- }
-
- public void startServer() throws Exception
- {
- if (!serverLifeCycleActive)
- {
- return;
- }
-
- String[] vmArgs = new String[]{};
- serverProcess = SpawnedVMSupport.spawnVM(SpawnedJMSServer.class.getName(), vmArgs, false);
- InputStreamReader isr = new InputStreamReader(serverProcess.getInputStream());
-
- final BufferedReader br = new BufferedReader(isr);
- String line = null;
- while ((line = br.readLine()) != null)
- {
- System.out.println("SERVER: " + line);
- line.replace('|', '\n');
- if ("OK".equals(line.trim()))
- {
- new Thread()
- {
- @Override
- public void run()
- {
- try
- {
- String line1 = null;
- while ((line1 = br.readLine()) != null)
- {
- System.out.println("SERVER: " + line1);
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }.start();
- return;
- }
- else if ("KO".equals(line.trim()))
- {
- // something went wrong with the server, destroy it:
- serverProcess.destroy();
- throw new IllegalStateException("Unable to start the spawned server :" + line);
- }
- }
- }
-
- public void stopServer() throws Exception
- {
- if (!serverLifeCycleActive)
- {
- return;
- }
- OutputStreamWriter osw = new OutputStreamWriter(serverProcess.getOutputStream());
- osw.write("STOP\n");
- osw.flush();
- int exitValue = serverProcess.waitFor();
- if (exitValue != 0)
- {
- serverProcess.destroy();
- }
- }
-
- private Object invokeSyncOperation(final String resourceName, final String operationName, final Object... parameters) throws Exception
- {
- ClientMessage message = clientSession.createMessage(false);
- ManagementHelper.putOperationInvocation(message, resourceName, operationName, parameters);
- ClientMessage reply;
- try
- {
- reply = requestor.request(message, 3000);
- }
- catch (Exception e)
- {
- throw new IllegalStateException("Exception while invoking " + operationName + " on " + resourceName, e);
- }
- if (reply == null)
- {
- throw new IllegalStateException("no reply received when invoking " + operationName + " on " + resourceName);
- }
- if (!ManagementHelper.hasOperationSucceeded(reply))
- {
- throw new IllegalStateException("operation failed when invoking " + operationName +
- " on " +
- resourceName +
- ": " +
- ManagementHelper.getResult(reply));
- }
- return ManagementHelper.getResult(reply);
- }
-
- // Inner classes -------------------------------------------------
-
-}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/joram-tests/src/test/java/org/apache/activemq/jms/SpawnedJMSServer.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/apache/activemq/jms/SpawnedJMSServer.java b/tests/joram-tests/src/test/java/org/apache/activemq/jms/SpawnedJMSServer.java
index b624cdc..3a8b2fb 100644
--- a/tests/joram-tests/src/test/java/org/apache/activemq/jms/SpawnedJMSServer.java
+++ b/tests/joram-tests/src/test/java/org/apache/activemq/jms/SpawnedJMSServer.java
@@ -18,9 +18,6 @@ package org.apache.activemq.jms;
import java.io.BufferedReader;
import java.io.InputStreamReader;
-import java.util.Hashtable;
-
-import javax.naming.InitialContext;
import org.apache.activemq.api.core.TransportConfiguration;
import org.apache.activemq.core.config.Configuration;
@@ -31,8 +28,6 @@ import org.apache.activemq.core.server.ActiveMQServer;
import org.apache.activemq.core.server.ActiveMQServers;
import org.apache.activemq.jms.server.JMSServerManager;
import org.apache.activemq.jms.server.impl.JMSServerManagerImpl;
-import org.jnp.server.Main;
-import org.jnp.server.NamingBeanImpl;
/**
* A SpawnedServer
@@ -53,20 +48,6 @@ public class SpawnedJMSServer
{
try
{
- System.setProperty("java.rmi.server.hostname", "localhost");
- System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
- System.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
-
- final NamingBeanImpl namingInfo = new NamingBeanImpl();
- namingInfo.start();
- final Main jndiServer = new Main();
- jndiServer.setNamingInfo(namingInfo);
- jndiServer.setPort(1099);
- jndiServer.setBindAddress("localhost");
- jndiServer.setRmiPort(1098);
- jndiServer.setRmiBindAddress("localhost");
- jndiServer.start();
-
Configuration conf = new ConfigurationImpl()
.addAcceptorConfiguration(new TransportConfiguration(NettyAcceptorFactory.class.getName()))
.setSecurityEnabled(false)
@@ -77,11 +58,7 @@ public class SpawnedJMSServer
// disable server persistence since JORAM tests do not restart server
final ActiveMQServer server = ActiveMQServers.newActiveMQServer(conf, false);
- Hashtable<String, String> env = new Hashtable<String, String>();
- env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
- env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
JMSServerManager serverManager = new JMSServerManagerImpl(server);
- serverManager.setContext(new InitialContext(env));
serverManager.start();
System.out.println("Server started, ready to start client test");
@@ -99,8 +76,6 @@ public class SpawnedJMSServer
if ("STOP".equals(line.trim()))
{
server.stop();
- jndiServer.stop();
- namingInfo.stop();
System.out.println("Server stopped");
System.exit(0);
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/admin/AdminFactory.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/admin/AdminFactory.java b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/admin/AdminFactory.java
index a6c1b94..650bfd0 100644
--- a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/admin/AdminFactory.java
+++ b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/admin/AdminFactory.java
@@ -18,8 +18,6 @@ package org.objectweb.jtests.jms.admin;
import java.util.Properties;
-import org.jboss.util.NestedRuntimeException;
-
public class AdminFactory
{
private static final String PROP_NAME = "jms.provider.admin.class";
@@ -36,7 +34,7 @@ public class AdminFactory
Admin admin = null;
if (adminClassName == null)
{
- throw new NestedRuntimeException("Property " + AdminFactory.PROP_NAME + " has not been found in input props");
+ throw new RuntimeException("Property " + AdminFactory.PROP_NAME + " has not been found in input props");
}
try
{
@@ -45,11 +43,11 @@ public class AdminFactory
}
catch (ClassNotFoundException e)
{
- throw new NestedRuntimeException("Class " + adminClassName + " not found.", e);
+ throw new RuntimeException("Class " + adminClassName + " not found.", e);
}
catch (Exception e)
{
- throw new NestedRuntimeException(e);
+ throw new RuntimeException(e);
}
return admin;
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/message/headers/MessageHeaderTest.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/message/headers/MessageHeaderTest.java b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/message/headers/MessageHeaderTest.java
index ff15eef..530e8a1 100644
--- a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/message/headers/MessageHeaderTest.java
+++ b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/message/headers/MessageHeaderTest.java
@@ -23,8 +23,11 @@ import javax.jms.Message;
import javax.jms.Queue;
import javax.jms.TemporaryQueue;
import javax.naming.Context;
+import javax.naming.InitialContext;
import javax.naming.NamingException;
+import java.util.Hashtable;
+
import org.junit.Assert;
import org.junit.Test;
import org.objectweb.jtests.jms.framework.PTPTestCase;
@@ -204,7 +207,12 @@ public class MessageHeaderTest extends PTPTestCase
try
{
admin.createQueue("anotherQueue");
- Context ctx = admin.createContext();
+
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+ props.put("queue.anotherQueue", "anotherQueue");
+
+ Context ctx = new InitialContext(props);
Queue anotherQueue = (Queue)ctx.lookup("anotherQueue");
Assert.assertTrue(anotherQueue != senderQueue);
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/queue/QueueBrowserTest.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/queue/QueueBrowserTest.java b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/queue/QueueBrowserTest.java
index 7e1496b..7626a54 100644
--- a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/queue/QueueBrowserTest.java
+++ b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/queue/QueueBrowserTest.java
@@ -22,7 +22,6 @@ import javax.jms.Message;
import javax.jms.QueueBrowser;
import javax.jms.TextMessage;
-import org.jboss.util.NestedRuntimeException;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
@@ -164,7 +163,7 @@ public class QueueBrowserTest extends PTPTestCase
}
catch (JMSException e)
{
- throw new NestedRuntimeException(e);
+ throw new RuntimeException(e);
}
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/session/UnifiedSessionTest.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/session/UnifiedSessionTest.java b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/session/UnifiedSessionTest.java
index 6d8bc0c..1496579 100644
--- a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/session/UnifiedSessionTest.java
+++ b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/session/UnifiedSessionTest.java
@@ -23,7 +23,6 @@ import javax.jms.Session;
import javax.jms.TopicConnection;
import javax.jms.TopicSession;
-import org.jboss.util.NestedRuntimeException;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
@@ -279,7 +278,7 @@ public class UnifiedSessionTest extends UnifiedTestCase
}
catch (Exception e)
{
- throw new NestedRuntimeException(e);
+ throw new RuntimeException(e);
}
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/PTPTestCase.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/PTPTestCase.java b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/PTPTestCase.java
index 6b39eb6..7d72a3f 100644
--- a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/PTPTestCase.java
+++ b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/PTPTestCase.java
@@ -23,8 +23,11 @@ import javax.jms.QueueSender;
import javax.jms.QueueSession;
import javax.jms.Session;
import javax.naming.Context;
+import javax.naming.InitialContext;
-import org.jboss.util.NestedRuntimeException;
+import java.util.Hashtable;
+
+import org.apache.activemq.jndi.ActiveMQInitialContextFactory;
import org.junit.After;
import org.junit.Before;
@@ -117,8 +120,12 @@ public abstract class PTPTestCase extends JMSTestCase
admin.createQueueConnectionFactory(PTPTestCase.QCF_NAME);
admin.createQueue(PTPTestCase.QUEUE_NAME);
- // end of admin step, start of JMS client step
- ctx = admin.createContext();
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, ActiveMQInitialContextFactory.class.getCanonicalName());
+ props.put(ActiveMQInitialContextFactory.CONNECTION_FACTORY_NAMES, PTPTestCase.QCF_NAME);
+ props.put(Context.PROVIDER_URL, "tcp://127.0.0.1:5445");
+ props.put("queue." + PTPTestCase.QUEUE_NAME, PTPTestCase.QUEUE_NAME);
+ Context ctx = new InitialContext(props);
senderQCF = (QueueConnectionFactory)ctx.lookup(PTPTestCase.QCF_NAME);
senderQueue = (Queue)ctx.lookup(PTPTestCase.QUEUE_NAME);
@@ -138,7 +145,7 @@ public abstract class PTPTestCase extends JMSTestCase
}
catch (Exception e)
{
- throw new NestedRuntimeException(e);
+ throw new RuntimeException(e);
}
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/PubSubTestCase.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/PubSubTestCase.java b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/PubSubTestCase.java
index a4cf57f..fa0282b 100644
--- a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/PubSubTestCase.java
+++ b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/PubSubTestCase.java
@@ -23,8 +23,11 @@ import javax.jms.TopicPublisher;
import javax.jms.TopicSession;
import javax.jms.TopicSubscriber;
import javax.naming.Context;
+import javax.naming.InitialContext;
-import org.jboss.util.NestedRuntimeException;
+import java.util.Hashtable;
+
+import org.apache.activemq.jndi.ActiveMQInitialContextFactory;
import org.junit.After;
import org.junit.Before;
@@ -117,8 +120,12 @@ public abstract class PubSubTestCase extends JMSTestCase
admin.createTopicConnectionFactory(PubSubTestCase.TCF_NAME);
admin.createTopic(PubSubTestCase.TOPIC_NAME);
- // end of admin step, start of JMS client step
- ctx = admin.createContext();
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, ActiveMQInitialContextFactory.class.getCanonicalName());
+ props.put(ActiveMQInitialContextFactory.CONNECTION_FACTORY_NAMES, PubSubTestCase.TCF_NAME);
+ props.put(Context.PROVIDER_URL, "tcp://127.0.0.1:5445");
+ props.put("topic." + PubSubTestCase.TOPIC_NAME, PubSubTestCase.TOPIC_NAME);
+ Context ctx = new InitialContext(props);
publisherTCF = (TopicConnectionFactory)ctx.lookup(PubSubTestCase.TCF_NAME);
publisherTopic = (Topic)ctx.lookup(PubSubTestCase.TOPIC_NAME);
@@ -140,7 +147,7 @@ public abstract class PubSubTestCase extends JMSTestCase
}
catch (Exception e)
{
- throw new NestedRuntimeException(e);
+ throw new RuntimeException(e);
}
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/UnifiedTestCase.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/UnifiedTestCase.java b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/UnifiedTestCase.java
index 2f4b5b2..3264bd5 100644
--- a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/UnifiedTestCase.java
+++ b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/framework/UnifiedTestCase.java
@@ -26,8 +26,11 @@ import javax.jms.Session;
import javax.jms.Topic;
import javax.jms.TopicConnectionFactory;
import javax.naming.Context;
+import javax.naming.InitialContext;
-import org.jboss.util.NestedRuntimeException;
+import java.util.Hashtable;
+
+import org.apache.activemq.jndi.ActiveMQInitialContextFactory;
import org.junit.After;
import org.junit.Before;
@@ -166,8 +169,14 @@ public abstract class UnifiedTestCase extends JMSTestCase
admin.createQueue(UnifiedTestCase.QUEUE_NAME);
admin.createTopic(UnifiedTestCase.TOPIC_NAME);
- // end of admin step, start of JMS client step
- ctx = admin.createContext();
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, ActiveMQInitialContextFactory.class.getCanonicalName());
+ props.put(ActiveMQInitialContextFactory.CONNECTION_FACTORY_NAMES, UnifiedTestCase.CF_NAME + ", " + UnifiedTestCase.QCF_NAME + ", " + UnifiedTestCase.TCF_NAME);
+ props.put(Context.PROVIDER_URL, "tcp://127.0.0.1:5445");
+ props.put("queue." + UnifiedTestCase.DESTINATION_NAME, UnifiedTestCase.DESTINATION_NAME);
+ props.put("queue." + UnifiedTestCase.QUEUE_NAME, UnifiedTestCase.QUEUE_NAME);
+ props.put("topic." + UnifiedTestCase.TOPIC_NAME, UnifiedTestCase.TOPIC_NAME);
+ Context ctx = new InitialContext(props);
producerCF = (ConnectionFactory)ctx.lookup(UnifiedTestCase.CF_NAME);
// we see destination of the unified domain as a javax.jms.Destination
@@ -197,7 +206,7 @@ public abstract class UnifiedTestCase extends JMSTestCase
}
catch (Exception e)
{
- throw new NestedRuntimeException(e);
+ throw new RuntimeException(e);
}
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/joram-tests/src/test/resources/provider.properties
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/resources/provider.properties b/tests/joram-tests/src/test/resources/provider.properties
index b8f137f..49829f3 100644
--- a/tests/joram-tests/src/test/resources/provider.properties
+++ b/tests/joram-tests/src/test/resources/provider.properties
@@ -27,7 +27,7 @@
# Uncomment the chosen provider and comment the other ones
##
-jms.provider.admin.class=org.apache.activemq.jms.ActiveMQQAdmin
+jms.provider.admin.class=org.apache.activemq.jms.ActiveMQAdmin
#jms.provider.admin.class = org.apache.activemq.api.jms.GenericAdmin
#jms.provider.admin.class = org.objectweb.jtests.providers.admin.JoramAdmin
#jms.provider.admin.class = org.objectweb.jtests.providers.admin.AshnaMQAdmin
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/performance-tests/pom.xml
----------------------------------------------------------------------
diff --git a/tests/performance-tests/pom.xml b/tests/performance-tests/pom.xml
index 7737c3d..ea82e65 100644
--- a/tests/performance-tests/pom.xml
+++ b/tests/performance-tests/pom.xml
@@ -85,10 +85,6 @@
<artifactId>junit</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- </dependency>
- <dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-ejb_3.0_spec</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/soak-tests/pom.xml
----------------------------------------------------------------------
diff --git a/tests/soak-tests/pom.xml b/tests/soak-tests/pom.xml
index 7605f74..b876dc1 100644
--- a/tests/soak-tests/pom.xml
+++ b/tests/soak-tests/pom.xml
@@ -100,10 +100,6 @@
<artifactId>junit</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- </dependency>
- <dependency>
<groupId>apache-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/stress-tests/pom.xml
----------------------------------------------------------------------
diff --git a/tests/stress-tests/pom.xml b/tests/stress-tests/pom.xml
index c957190..9918a61 100644
--- a/tests/stress-tests/pom.xml
+++ b/tests/stress-tests/pom.xml
@@ -100,10 +100,6 @@
<artifactId>junit</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- </dependency>
- <dependency>
<groupId>apache-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/timing-tests/pom.xml
----------------------------------------------------------------------
diff --git a/tests/timing-tests/pom.xml b/tests/timing-tests/pom.xml
index 202ea26..3b1fb1a 100644
--- a/tests/timing-tests/pom.xml
+++ b/tests/timing-tests/pom.xml
@@ -82,10 +82,6 @@
<artifactId>junit</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- </dependency>
- <dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-ejb_3.0_spec</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/InVMContext.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/InVMContext.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/InVMContext.java
index 4103b80..88ef024 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/InVMContext.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/InVMContext.java
@@ -277,7 +277,6 @@ public class InVMContext implements Context, Serializable
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put("java.naming.factory.initial", "org.apache.activemq.jms.tests.tools.container.InVMInitialContextFactory");
- env.put("java.naming.provider.url", "org.jboss.naming:org.jnp.interface");
return env;
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/InVMNamingContext.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/InVMNamingContext.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/InVMNamingContext.java
index edfeae8..7fab4fa 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/InVMNamingContext.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/InVMNamingContext.java
@@ -276,7 +276,6 @@ public class InVMNamingContext implements Context, Serializable
{
Hashtable<String, String> env = new Hashtable<String, String>();
env.put("java.naming.factory.initial", "org.apache.activemq.jms.tests.tools.container.InVMInitialContextFactory");
- env.put("java.naming.provider.url", "org.jboss.naming:org.jnp.interface");
return env;
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/NonSerializableFactory.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/NonSerializableFactory.java b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/NonSerializableFactory.java
index 4fe692f..767fabf 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/NonSerializableFactory.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/tests/unit/util/NonSerializableFactory.java
@@ -21,15 +21,12 @@ import javax.naming.Name;
import javax.naming.NamingException;
import javax.naming.RefAddr;
import javax.naming.Reference;
-import javax.naming.StringRefAddr;
import javax.naming.spi.ObjectFactory;
import java.util.Collections;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Map;
-import org.jboss.util.naming.Util;
-
/**
* used by the default context when running in embedded local configuration
*
@@ -42,47 +39,47 @@ public class NonSerializableFactory implements ObjectFactory
{
}
- public static void unbind(final Context ctx, final String strName) throws NamingException
- {
- Name name = ctx.getNameParser("").parse(strName);
- int size = name.size();
- String atom = name.get(size - 1);
- Context parentCtx = Util.createSubcontext(ctx, name.getPrefix(size - 1));
- String key = new StringBuilder().append(parentCtx.getNameInNamespace()).append("/").append(atom).toString();
- NonSerializableFactory.getWrapperMap().remove(key);
- Util.unbind(ctx, strName);
- }
-
- public static void rebind(final Context ctx, final String strName, final Object value) throws NamingException
- {
- Name name = ctx.getNameParser("").parse(strName);
- int size = name.size();
- String atom = name.get(size - 1);
- Context parentCtx = Util.createSubcontext(ctx, name.getPrefix(size - 1));
- String key = new StringBuilder().append(parentCtx.getNameInNamespace()).append("/").append(atom).toString();
- NonSerializableFactory.getWrapperMap().put(key, value);
- String className = value.getClass().getName();
- String factory = NonSerializableFactory.class.getName();
- StringRefAddr addr = new StringRefAddr("nns", key);
- Reference memoryRef = new Reference(className, addr, factory, null);
- parentCtx.rebind(atom, memoryRef);
- }
+// public static void unbind(final Context ctx, final String strName) throws NamingException
+// {
+// Name name = ctx.getNameParser("").parse(strName);
+// int size = name.size();
+// String atom = name.get(size - 1);
+// Context parentCtx = Util.createSubcontext(ctx, name.getPrefix(size - 1));
+// String key = new StringBuilder().append(parentCtx.getNameInNamespace()).append("/").append(atom).toString();
+// NonSerializableFactory.getWrapperMap().remove(key);
+// Util.unbind(ctx, strName);
+// }
- public static void bind(final Context ctx, final String strName, final Object value) throws NamingException
- {
- Name name = ctx.getNameParser("").parse(strName);
- int size = name.size();
- String atom = name.get(size - 1);
- Context parentCtx = Util.createSubcontext(ctx, name.getPrefix(size - 1));
- String key = new StringBuilder().append(parentCtx.getNameInNamespace()).append("/").append(atom).toString();
- NonSerializableFactory.getWrapperMap().put(key, value);
- String className = value.getClass().getName();
- String factory = NonSerializableFactory.class.getName();
- StringRefAddr addr = new StringRefAddr("nns", key);
- Reference memoryRef = new Reference(className, addr, factory, null);
+// public static void rebind(final Context ctx, final String strName, final Object value) throws NamingException
+// {
+// Name name = ctx.getNameParser("").parse(strName);
+// int size = name.size();
+// String atom = name.get(size - 1);
+// Context parentCtx = Util.createSubcontext(ctx, name.getPrefix(size - 1));
+// String key = new StringBuilder().append(parentCtx.getNameInNamespace()).append("/").append(atom).toString();
+// NonSerializableFactory.getWrapperMap().put(key, value);
+// String className = value.getClass().getName();
+// String factory = NonSerializableFactory.class.getName();
+// StringRefAddr addr = new StringRefAddr("nns", key);
+// Reference memoryRef = new Reference(className, addr, factory, null);
+// parentCtx.rebind(atom, memoryRef);
+// }
- parentCtx.bind(atom, memoryRef);
- }
+// public static void bind(final Context ctx, final String strName, final Object value) throws NamingException
+// {
+// Name name = ctx.getNameParser("").parse(strName);
+// int size = name.size();
+// String atom = name.get(size - 1);
+// Context parentCtx = Util.createSubcontext(ctx, name.getPrefix(size - 1));
+// String key = new StringBuilder().append(parentCtx.getNameInNamespace()).append("/").append(atom).toString();
+// NonSerializableFactory.getWrapperMap().put(key, value);
+// String className = value.getClass().getName();
+// String factory = NonSerializableFactory.class.getName();
+// StringRefAddr addr = new StringRefAddr("nns", key);
+// Reference memoryRef = new Reference(className, addr, factory, null);
+//
+// parentCtx.bind(atom, memoryRef);
+// }
public static Object lookup(final String name) throws NamingException
{
[13/13] activemq-6 git commit: Merge #34 on JNDI changes
Posted by cl...@apache.org.
Merge #34 on JNDI changes
Project: http://git-wip-us.apache.org/repos/asf/activemq-6/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-6/commit/46182e41
Tree: http://git-wip-us.apache.org/repos/asf/activemq-6/tree/46182e41
Diff: http://git-wip-us.apache.org/repos/asf/activemq-6/diff/46182e41
Branch: refs/heads/master
Commit: 46182e4155dc2a4667359fb14996b9c63c3409bd
Parents: e419feb 7cfd76d
Author: Clebert Suconic <cl...@apache.org>
Authored: Fri Dec 5 10:37:50 2014 -0500
Committer: Clebert Suconic <cl...@apache.org>
Committed: Fri Dec 5 10:37:50 2014 -0500
----------------------------------------------------------------------
.gitignore | 5 -
.../org/apache/activemq/cli/commands/Run.java | 16 -
.../java/org/apache/activemq/dto/BrokerDTO.java | 3 -
.../java/org/apache/activemq/dto/NamingDTO.java | 39 -
.../org/apache/activemq/dto/jaxb.index | 1 -
.../jndi/ActiveMQInitialContextFactory.java | 496 +++++++++++++
.../apache/activemq/jndi/LazyCreateContext.java | 43 ++
.../apache/activemq/jndi/NameParserImpl.java | 30 +
.../apache/activemq/jndi/ReadOnlyContext.java | 534 ++++++++++++++
activemq-jms-server/pom.xml | 4 -
.../jms/server/JMSServerConfigParser.java | 9 -
.../jms/server/embedded/EmbeddedJMS.java | 6 +
.../server/impl/JMSServerConfigParserImpl.java | 339 +--------
.../jms/server/impl/JMSServerDeployer.java | 48 +-
.../jms/server/impl/JMSServerManagerImpl.java | 14 +-
.../jms/server/impl/StandaloneNamingServer.java | 170 -----
.../src/main/resources/schema/activemq-jms.xsd | 272 +------
activemq-ra/pom.xml | 7 +
.../integration/EmbeddedRestActiveMQJMS.java | 4 +
.../rest/queue/QueueDestinationsResource.java | 7 -
.../rest/topic/TopicDestinationsResource.java | 7 -
.../apache/activemq/rest/test/EmbeddedTest.java | 14 +-
.../src/test/resources/activemq-jms.xml | 13 +-
distribution/activemq/pom.xml | 5 -
distribution/activemq/src/main/assembly/dep.xml | 1 -
.../activemq/src/main/resources/bin/activemq | 4 +-
.../src/main/resources/bin/activemq.cmd | 2 +-
.../resources/config/clustered/activemq-jms.xml | 48 +-
.../resources/config/clustered/jndi.properties | 2 -
.../config/non-clustered/activemq-jms.xml | 48 +-
.../config/non-clustered/jndi.properties | 2 -
.../replicated/activemq-configuration.xml | 2 +-
.../config/replicated/activemq-jms.xml | 48 +-
.../resources/config/replicated/jndi.properties | 2 -
.../shared-store/activemq-configuration.xml | 2 +-
.../config/shared-store/activemq-jms.xml | 48 +-
.../config/shared-store/jndi.properties | 2 -
distribution/jnp-client/pom.xml | 75 --
distribution/pom.xml | 5 -
docs/user-manual/en/appserver-integration.xml | 53 +-
docs/user-manual/en/client-classpath.xml | 7 -
docs/user-manual/en/client-reconnection.xml | 25 +-
docs/user-manual/en/clusters.xml | 65 +-
docs/user-manual/en/configuration-index.xml | 330 +--------
docs/user-manual/en/configuring-transports.xml | 29 +-
docs/user-manual/en/flow-control.xml | 79 +-
docs/user-manual/en/interoperability.xml | 5 +-
docs/user-manual/en/large-messages.xml | 41 +-
docs/user-manual/en/logging.xml | 18 +-
docs/user-manual/en/message-grouping.xml | 37 +-
docs/user-manual/en/pre-acknowledge.xml | 16 +-
docs/user-manual/en/spring-integration.xml | 13 +-
docs/user-manual/en/thread-pooling.xml | 22 +-
docs/user-manual/en/using-jms.xml | 388 +++++-----
examples/core/embedded-remote/pom.xml | 5 -
examples/core/embedded/pom.xml | 5 -
examples/core/perf/pom.xml | 10 -
examples/core/vertx-connector/pom.xml | 10 -
.../src/main/resources/server0/activemq-jms.xml | 13 +-
.../config/server.properties | 2 +-
.../common/example/ActiveMQExample.java | 5 +-
examples/jms/aerogear/pom.xml | 7 +-
.../activemq/jms/example/AerogearExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/applet/pom.xml | 7 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/application-layer-failover/pom.xml | 9 +-
.../ApplicationLayerFailoverExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../resources/hornetq/server1/activemq-jms.xml | 13 +-
examples/jms/bridge/pom.xml | 9 +-
.../activemq/jms/example/BridgeExample.java | 8 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../resources/hornetq/server1/activemq-jms.xml | 13 +-
examples/jms/browser/pom.xml | 7 +-
.../jms/example/QueueBrowserExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/client-kickoff/pom.xml | 7 +-
.../jms/example/ClientKickoffExample.java | 2 +-
.../resources/hornetq/server0/activemq-jms.xml | 9 -
.../jms/client-side-failoverlistener/pom.xml | 9 +-
.../ClientSideFailoverListerExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 27 +-
.../resources/hornetq/server1/activemq-jms.xml | 26 +-
examples/jms/client-side-load-balancing/pom.xml | 9 +-
.../example/ClientSideLoadBalancingExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 11 +-
.../resources/hornetq/server1/activemq-jms.xml | 11 +-
.../resources/hornetq/server2/activemq-jms.xml | 11 +-
.../jms/clustered-durable-subscription/pom.xml | 9 +-
.../ClusteredDurableSubscriptionExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../resources/hornetq/server1/activemq-jms.xml | 13 +-
examples/jms/clustered-grouping/pom.xml | 11 +-
.../jms/example/ClusteredGroupingExample.java | 8 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../resources/hornetq/server1/activemq-jms.xml | 13 +-
.../resources/hornetq/server2/activemq-jms.xml | 13 +-
examples/jms/clustered-jgroups/pom.xml | 9 +-
.../jms/example/ClusteredJgroupsExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../hornetq/server0/client-jndi.properties | 5 +-
.../resources/hornetq/server1/activemq-jms.xml | 13 +-
.../hornetq/server1/client-jndi.properties | 5 +-
examples/jms/clustered-queue/pom.xml | 9 +-
.../jms/example/ClusteredQueueExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../resources/hornetq/server1/activemq-jms.xml | 13 +-
examples/jms/clustered-standalone/pom.xml | 11 +-
.../jms/example/ClusteredStandaloneExample.java | 8 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../resources/hornetq/server1/activemq-jms.xml | 12 +-
.../resources/hornetq/server2/activemq-jms.xml | 13 +-
examples/jms/clustered-static-discovery/pom.xml | 13 +-
.../example/StaticClusteredQueueExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 25 +-
.../resources/hornetq/server0/jndi.properties | 2 -
.../resources/hornetq/server1/activemq-jms.xml | 25 +-
.../resources/hornetq/server1/jndi.properties | 2 -
.../resources/hornetq/server2/activemq-jms.xml | 26 +-
.../resources/hornetq/server2/jndi.properties | 17 -
.../resources/hornetq/server3/activemq-jms.xml | 26 +-
.../resources/hornetq/server3/jndi.properties | 2 -
examples/jms/clustered-static-oneway/pom.xml | 11 +-
.../jms/example/ClusterStaticOnewayExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 25 +-
.../resources/hornetq/server0/jndi.properties | 2 -
.../resources/hornetq/server1/activemq-jms.xml | 25 +-
.../resources/hornetq/server1/jndi.properties | 2 -
.../resources/hornetq/server2/activemq-jms.xml | 26 +-
.../resources/hornetq/server2/jndi.properties | 18 -
examples/jms/clustered-topic/pom.xml | 9 +-
.../jms/example/ClusteredTopicExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../resources/hornetq/server1/activemq-jms.xml | 13 +-
.../jms/colocated-failover-scale-down/pom.xml | 9 +-
.../ColocatedFailoverScaleDownExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 24 +-
.../resources/hornetq/server1/activemq-jms.xml | 24 +-
examples/jms/colocated-failover/pom.xml | 9 +-
.../jms/example/ColocatedFailoverExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 24 +-
.../resources/hornetq/server1/activemq-jms.xml | 25 +-
examples/jms/consumer-rate-limit/pom.xml | 7 +-
.../jms/example/ConsumerRateLimitExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 18 +-
.../hornetq/server0/client-jndi.properties | 5 +-
examples/jms/dead-letter/pom.xml | 7 +-
.../activemq/jms/example/DeadLetterExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 17 +-
.../hornetq/server0/client-jndi.properties | 5 +-
examples/jms/delayed-redelivery/pom.xml | 7 +-
.../jms/example/DelayedRedeliveryExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 17 +-
.../hornetq/server0/client-jndi.properties | 5 +-
examples/jms/divert/pom.xml | 9 +-
.../activemq/jms/example/DivertExample.java | 12 +-
.../resources/hornetq/server0/activemq-jms.xml | 28 +-
.../resources/hornetq/server1/activemq-jms.xml | 15 +-
examples/jms/durable-subscription/pom.xml | 7 +-
.../jms/example/DurableSubscriptionExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../hornetq/server0/client-jndi.properties | 5 +-
examples/jms/embedded-simple/pom.xml | 9 +-
.../activemq/jms/example/EmbeddedExample.java | 2 +-
.../src/main/resources/activemq-jms.xml | 13 +-
examples/jms/embedded/pom.xml | 9 +-
examples/jms/embedded/readme.html | 27 +-
.../activemq/jms/example/EmbeddedExample.java | 4 +-
examples/jms/expiry/pom.xml | 7 +-
.../activemq/jms/example/ExpiryExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 17 +-
examples/jms/ha-policy-autobackup/pom.xml | 9 +-
.../jms/example/HAPolicyAutoBackupExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 24 +-
examples/jms/http-transport/pom.xml | 7 +-
.../jms/example/HttpTransportExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../jms/instantiate-connection-factory/pom.xml | 7 +-
examples/jms/interceptor/pom.xml | 7 +-
.../jms/example/InterceptorExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/jaas/pom.xml | 7 +-
.../activemq/jms/example/JAASExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/jms-auto-closeable/pom.xml | 7 +-
.../jms/example/JMSAutoCloseableExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/jms-bridge/pom.xml | 9 +-
examples/jms/jms-bridge/readme.html | 20 +-
.../activemq/jms/example/JMSBridgeExample.java | 15 +-
.../resources/hornetq/server0/activemq-jms.xml | 22 +-
.../resources/hornetq/server0/jndi.properties | 2 -
.../resources/hornetq/server1/activemq-jms.xml | 22 +-
.../resources/hornetq/server1/jndi.properties | 2 -
examples/jms/jms-completion-listener/pom.xml | 7 +-
.../example/JMSCompletionListenerExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/jms-context/pom.xml | 7 +-
.../activemq/jms/example/JMSContextExample.java | 4 +-
examples/jms/jms-shared-consumer/pom.xml | 7 +-
.../jms/example/JMSSharedConsumerExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/jmx/pom.xml | 7 +-
.../apache/activemq/jms/example/JMXExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 12 +-
examples/jms/large-message/pom.xml | 7 +-
.../jms/example/LargeMessageExample.java | 8 +-
.../resources/hornetq/server0/activemq-jms.xml | 14 +-
examples/jms/last-value-queue/pom.xml | 7 +-
.../jms/example/LastValueQueueExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 14 +-
examples/jms/management-notifications/pom.xml | 7 +-
.../example/ManagementNotificationExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 18 +-
examples/jms/management/pom.xml | 7 +-
.../activemq/jms/example/ManagementExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 14 +-
examples/jms/message-counters/pom.xml | 7 +-
.../jms/example/MessageCounterExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 17 +-
examples/jms/message-group/pom.xml | 7 +-
.../jms/example/MessageGroupExample.java | 4 +-
.../resources/hornetq/server0/hornetq-jms.xml | 13 +-
examples/jms/message-group2/pom.xml | 7 +-
.../jms/example/MessageGroup2Example.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 14 +-
examples/jms/message-priority/pom.xml | 7 +-
.../jms/example/MessagePriorityExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/multiple-failover-failback/pom.xml | 11 +-
.../MultipleFailoverFailbackExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 27 +-
.../resources/hornetq/server1/activemq-jms.xml | 26 +-
.../resources/hornetq/server2/activemq-jms.xml | 26 +-
examples/jms/multiple-failover/pom.xml | 11 +-
.../jms/example/MultipleFailoverExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 27 +-
.../resources/hornetq/server1/activemq-jms.xml | 26 +-
.../resources/hornetq/server2/activemq-jms.xml | 26 +-
examples/jms/no-consumer-buffering/pom.xml | 7 +-
.../jms/example/NoConsumerBufferingExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 18 +-
examples/jms/non-transaction-failover/pom.xml | 9 +-
.../example/NonTransactionFailoverExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 26 +-
.../resources/hornetq/server1/activemq-jms.xml | 26 +-
examples/jms/openwire/pom.xml | 7 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/paging/pom.xml | 7 +-
.../activemq/jms/example/PagingExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 17 +-
examples/jms/perf/pom.xml | 10 -
.../src/main/resources/client.jndi.properties | 5 +-
.../resources/hornetq/server0/activemq-jms.xml | 15 +-
examples/jms/pre-acknowledge/pom.xml | 7 +-
.../jms/example/PreacknowledgeExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/producer-rate-limit/pom.xml | 7 +-
.../jms/example/ProducerRateLimitExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 18 +-
examples/jms/proton-cpp/pom.xml | 10 -
examples/jms/proton-j/pom.xml | 7 +-
examples/jms/proton-ruby/pom.xml | 5 -
.../jms/queue-message-redistribution/pom.xml | 9 +-
.../QueueMessageRedistributionExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../resources/hornetq/server1/activemq-jms.xml | 13 +-
examples/jms/queue-requestor/pom.xml | 7 +-
.../jms/example/QueueRequestorExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/queue-selector/pom.xml | 7 +-
.../jms/example/QueueSelectorExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/queue/pom.xml | 7 +-
.../activemq/jms/example/QueueExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/reattach-node/pom.xml | 7 +-
.../activemq/jms/example/ReattachExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 45 +-
examples/jms/replicated-failback-static/pom.xml | 9 +-
.../ReplicatedFailbackStaticExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 27 +-
.../resources/hornetq/server1/activemq-jms.xml | 26 +-
examples/jms/replicated-failback/pom.xml | 9 +-
.../jms/example/ReplicatedFailbackExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 27 +-
.../resources/hornetq/server1/activemq-jms.xml | 26 +-
.../jms/replicated-multiple-failover/pom.xml | 11 +-
.../ReplicatedMultipleFailoverExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 27 +-
.../resources/hornetq/server1/activemq-jms.xml | 26 +-
.../resources/hornetq/server2/activemq-jms.xml | 26 +-
.../jms/replicated-transaction-failover/pom.xml | 9 +-
.../ReplicatedTransactionFailoverExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 25 +-
.../resources/hornetq/server1/activemq-jms.xml | 25 +-
examples/jms/request-reply/pom.xml | 7 +-
.../jms/example/RequestReplyExample.java | 8 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../src/main/resources/activemq-jms.xml | 13 +-
.../src/main/resources/activemq-jms.xml | 13 +-
.../src/main/resources/activemq-jms.xml | 13 +-
.../push/src/main/resources/activemq-jms.xml | 19 +-
examples/jms/scale-down/pom.xml | 9 +-
.../activemq/jms/example/ScaleDownExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 24 +-
.../resources/hornetq/server1/activemq-jms.xml | 24 +-
examples/jms/scheduled-message/pom.xml | 7 +-
.../jms/example/ScheduledMessageExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/security/pom.xml | 7 +-
.../activemq/jms/example/SecurityExample.java | 8 +-
.../resources/hornetq/server0/activemq-jms.xml | 23 +-
examples/jms/send-acknowledgements/pom.xml | 7 +-
.../example/SendAcknowledgementsExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 14 +-
examples/jms/spring-integration/pom.xml | 7 +-
.../src/main/resources/activemq-jms.xml | 13 +-
examples/jms/ssl-enabled/pom.xml | 7 +-
.../apache/activemq/jms/example/SSLExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/static-selector-jms/pom.xml | 7 +-
.../jms/example/StaticSelectorJMSExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 12 +-
examples/jms/static-selector/pom.xml | 7 +-
.../jms/example/StaticSelectorExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/stomp-websockets/pom.xml | 7 +-
.../jms/example/StompWebSocketExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/stomp/pom.xml | 7 +-
.../activemq/jms/example/StompExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/stomp1.1/pom.xml | 7 +-
.../activemq/jms/example/StompExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/stomp1.2/pom.xml | 7 +-
.../activemq/jms/example/StompExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/stop-server-failover/pom.xml | 9 +-
.../jms/example/StopServerFailoverExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 26 +-
.../resources/hornetq/server1/activemq-jms.xml | 26 +-
examples/jms/symmetric-cluster/pom.xml | 17 +-
.../resources/hornetq/server0/activemq-jms.xml | 17 +-
.../resources/hornetq/server1/activemq-jms.xml | 17 +-
.../resources/hornetq/server2/activemq-jms.xml | 17 +-
.../resources/hornetq/server3/activemq-jms.xml | 17 +-
.../resources/hornetq/server4/activemq-jms.xml | 17 +-
.../resources/hornetq/server5/activemq-jms.xml | 17 +-
examples/jms/temp-queue/pom.xml | 7 +-
.../jms/example/TemporaryQueueExample.java | 2 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/topic-hierarchies/pom.xml | 7 +-
.../jms/example/TopicHierarchyExample.java | 2 +-
.../resources/hornetq/server0/activemq-jms.xml | 33 +-
examples/jms/topic-selector-example1/pom.xml | 7 +-
.../jms/example/TopicSelectorExample1.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/topic-selector-example2/pom.xml | 7 +-
.../jms/example/TopicSelectorExample2.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/topic/pom.xml | 7 +-
.../activemq/jms/example/TopicExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../hornetq/server0/client-jndi.properties | 5 +-
examples/jms/transaction-failover/pom.xml | 9 +-
.../jms/example/TransactionFailoverExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 25 +-
.../resources/hornetq/server1/activemq-jms.xml | 25 +-
examples/jms/transactional/pom.xml | 7 +-
.../jms/example/TransactionalExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/xa-heuristic/pom.xml | 7 +-
.../jms/example/XAHeuristicExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 14 +-
examples/jms/xa-receive/pom.xml | 7 +-
.../activemq/jms/example/XAReceiveExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 14 +-
examples/jms/xa-send/pom.xml | 7 +-
.../activemq/jms/example/XASendExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 14 +-
examples/jms/xa-with-jta/pom.xml | 7 +-
.../activemq/jms/example/XAwithJTAExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 14 +-
examples/soak/normal/pom.xml | 13 +-
examples/soak/normal/server0/activemq-jms.xml | 18 +-
.../activemq/jms/soak/example/SoakReceiver.java | 5 +-
.../activemq/jms/soak/example/SoakSender.java | 5 +-
pom.xml | 11 -
tests/byteman-tests/pom.xml | 4 -
.../server-start-stop-backup-jms-config1.xml | 11 +-
.../server-start-stop-live-jms-config1.xml | 13 +-
tests/integration-tests/pom.xml | 7 +
.../tests/integration/client/PagingTest.java | 2 +-
.../integration/jms/SimpleJNDIClientTest.java | 722 +++++++++++++++++++
.../jms/server/JMSServerDeployerTest.java | 207 +-----
.../config/JMSServerConfigParserTest.java | 35 -
.../management/JMSServerControl2Test.java | 4 +-
.../integration/ra/ActiveMQRATestBase.java | 9 +
.../integration/ra/ResourceAdapterTest.java | 2 +-
.../spring/SpringIntegrationTest.java | 17 +-
.../tests/integration/stomp/ExtraStompTest.java | 2 +-
.../tests/util/NonSerializableFactory.java | 84 ++-
.../activemq-jms-for-JMSServerDeployerTest.xml | 48 +-
.../activemq-jms-for-JMSServerDeployerTest2.xml | 48 +-
.../colocated-server-start-stop-jms-config1.xml | 13 +-
.../colocated-server-start-stop-jms-config2.xml | 13 +-
.../resources/server-start-stop-jms-config1.xml | 13 +-
.../src/test/resources/spring-activemq-jms.xml | 13 +-
.../src/test/resources/spring-jms-beans.xml | 21 +-
tests/jms-tests/pom.xml | 4 -
.../jms/tests/ActiveMQServerTestCase.java | 14 +
.../jms/tests/ConnectionFactoryTest.java | 49 ++
.../apache/activemq/jms/tests/SessionTest.java | 2 +
.../tests/message/SimpleJMSStreamMessage.java | 4 +-
.../jms/tests/tools/WrappedJNDIServer.java | 92 ---
.../jms/tests/tools/container/InVMContext.java | 1 -
.../container/InVMInitialContextFactory.java | 2 -
.../tests/tools/container/LocalTestServer.java | 32 +-
.../tools/container/NonSerializableFactory.java | 85 ++-
.../jms/tests/tools/container/Server.java | 6 +
.../src/test/resources/activemq-jms.xml | 120 ---
.../src/test/resources/jndi.properties | 3 +-
tests/joram-tests/pom.xml | 4 -
.../org/apache/activemq/jms/AbstractAdmin.java | 13 +-
.../org/apache/activemq/jms/ActiveMQAdmin.java | 339 +++++++++
.../org/apache/activemq/jms/ActiveMQQAdmin.java | 340 ---------
.../apache/activemq/jms/SpawnedJMSServer.java | 25 -
.../jtests/jms/admin/AdminFactory.java | 8 +-
.../message/headers/MessageHeaderTest.java | 10 +-
.../jms/conform/queue/QueueBrowserTest.java | 3 +-
.../jms/conform/session/UnifiedSessionTest.java | 3 +-
.../jtests/jms/framework/PTPTestCase.java | 15 +-
.../jtests/jms/framework/PubSubTestCase.java | 15 +-
.../jtests/jms/framework/UnifiedTestCase.java | 17 +-
.../src/test/resources/provider.properties | 2 +-
tests/performance-tests/pom.xml | 4 -
tests/soak-tests/pom.xml | 4 -
tests/stress-tests/pom.xml | 4 -
tests/timing-tests/pom.xml | 4 -
.../activemq/tests/unit/util/InVMContext.java | 1 -
.../tests/unit/util/InVMNamingContext.java | 1 -
.../tests/unit/util/NonSerializableFactory.java | 81 +--
445 files changed, 3476 insertions(+), 6323 deletions(-)
----------------------------------------------------------------------
[02/13] activemq-6 git commit: ACTIVEMQ6-14 Replace JNDI server with
client impl
Posted by cl...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/SimpleJNDIClientTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/SimpleJNDIClientTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/SimpleJNDIClientTest.java
new file mode 100644
index 0000000..680d429
--- /dev/null
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/SimpleJNDIClientTest.java
@@ -0,0 +1,722 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.tests.integration.jms;
+
+import javax.jms.ConnectionFactory;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Queue;
+import javax.jms.Topic;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.activemq.api.config.ActiveMQDefaultConfiguration;
+import org.apache.activemq.api.core.BroadcastGroupConfiguration;
+import org.apache.activemq.api.core.DiscoveryGroupConfiguration;
+import org.apache.activemq.api.core.TransportConfiguration;
+import org.apache.activemq.api.core.UDPBroadcastGroupConfiguration;
+import org.apache.activemq.api.jms.JMSFactoryType;
+import org.apache.activemq.core.config.Configuration;
+import org.apache.activemq.core.config.ha.SharedStoreMasterPolicyConfiguration;
+import org.apache.activemq.core.remoting.impl.netty.TransportConstants;
+import org.apache.activemq.core.server.ActiveMQServer;
+import org.apache.activemq.core.server.ActiveMQServers;
+import org.apache.activemq.jms.client.ActiveMQConnectionFactory;
+import org.apache.activemq.jndi.ActiveMQInitialContextFactory;
+import org.apache.activemq.tests.util.RandomUtil;
+import org.apache.activemq.tests.util.UnitTestCase;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ *
+ * A ActiveMQConnectionFactoryTest
+ *
+ * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
+ *
+ *
+ */
+public class SimpleJNDIClientTest extends UnitTestCase
+{
+ private final String groupAddress = getUDPDiscoveryAddress();
+
+ private final int groupPort = getUDPDiscoveryPort();
+
+ private ActiveMQServer liveService;
+
+ private TransportConfiguration liveTC;
+
+ @Test
+ public void testDefaultConnectionFactories() throws NamingException, JMSException
+ {
+ Hashtable<String, Object> props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+ Context ctx = new InitialContext(props);
+
+ ConnectionFactory connectionFactory = (ConnectionFactory) ctx.lookup("ConnectionFactory");
+ Assert.assertEquals(JMSFactoryType.CF.intValue(), ((ActiveMQConnectionFactory)connectionFactory).getFactoryType());
+ connectionFactory.createConnection().close();
+
+ connectionFactory = (ConnectionFactory) ctx.lookup("XAConnectionFactory");
+ Assert.assertEquals(JMSFactoryType.XA_CF.intValue(), ((ActiveMQConnectionFactory)connectionFactory).getFactoryType());
+ connectionFactory.createConnection().close();
+
+ connectionFactory = (ConnectionFactory) ctx.lookup("TopicConnectionFactory");
+ Assert.assertEquals(JMSFactoryType.TOPIC_CF.intValue(), ((ActiveMQConnectionFactory)connectionFactory).getFactoryType());
+ connectionFactory.createConnection().close();
+
+ connectionFactory = (ConnectionFactory) ctx.lookup("QueueConnectionFactory");
+ Assert.assertEquals(JMSFactoryType.QUEUE_CF.intValue(), ((ActiveMQConnectionFactory)connectionFactory).getFactoryType());
+ connectionFactory.createConnection().close();
+ }
+
+ @Test
+ public void testCustomCF() throws NamingException, JMSException
+ {
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+ props.put(ActiveMQInitialContextFactory.CONNECTION_FACTORY_NAMES, "myConnectionFactory");
+ props.put("connection.myConnectionFactory.type", "CF");
+ Context ctx = new InitialContext(props);
+
+ ConnectionFactory connectionFactory = (ConnectionFactory) ctx.lookup("myConnectionFactory");
+
+ Assert.assertEquals(JMSFactoryType.CF.intValue(), ((ActiveMQConnectionFactory)connectionFactory).getFactoryType());
+
+ connectionFactory.createConnection().close();
+ }
+
+ @Test
+ public void testVMCF0() throws NamingException, JMSException
+ {
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+ props.put(Context.PROVIDER_URL, "vm://0");
+ Context ctx = new InitialContext(props);
+
+ ConnectionFactory connectionFactory = (ConnectionFactory) ctx.lookup("ConnectionFactory");
+
+ connectionFactory.createConnection().close();
+ }
+
+ @Test
+ public void testVMCF1() throws NamingException, JMSException
+ {
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+ props.put(Context.PROVIDER_URL, "vm://1");
+ Context ctx = new InitialContext(props);
+
+ ConnectionFactory connectionFactory = (ConnectionFactory) ctx.lookup("ConnectionFactory");
+
+ connectionFactory.createConnection().close();
+ }
+
+ @Test
+ public void testXACF() throws NamingException, JMSException
+ {
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+ props.put(ActiveMQInitialContextFactory.CONNECTION_FACTORY_NAMES, "myConnectionFactory");
+ props.put("connection.myConnectionFactory.type", "XA_CF");
+ Context ctx = new InitialContext(props);
+
+ ActiveMQConnectionFactory connectionFactory = (ActiveMQConnectionFactory) ctx.lookup("myConnectionFactory");
+
+ Assert.assertEquals(JMSFactoryType.XA_CF.intValue(), connectionFactory.getFactoryType());
+ }
+
+ @Test
+ public void testQueueCF() throws NamingException, JMSException
+ {
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+ props.put(ActiveMQInitialContextFactory.CONNECTION_FACTORY_NAMES, "myConnectionFactory");
+ props.put("connection.myConnectionFactory.type", "QUEUE_CF");
+ Context ctx = new InitialContext(props);
+
+ ActiveMQConnectionFactory connectionFactory = (ActiveMQConnectionFactory) ctx.lookup("myConnectionFactory");
+
+ Assert.assertEquals(JMSFactoryType.QUEUE_CF.intValue(), connectionFactory.getFactoryType());
+ }
+
+ @Test
+ public void testQueueXACF() throws NamingException, JMSException
+ {
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+ props.put(ActiveMQInitialContextFactory.CONNECTION_FACTORY_NAMES, "myConnectionFactory");
+ props.put("connection.myConnectionFactory.type", "QUEUE_XA_CF");
+ Context ctx = new InitialContext(props);
+
+ ActiveMQConnectionFactory connectionFactory = (ActiveMQConnectionFactory) ctx.lookup("myConnectionFactory");
+
+ Assert.assertEquals(JMSFactoryType.QUEUE_XA_CF.intValue(), connectionFactory.getFactoryType());
+ }
+
+ @Test
+ public void testTopicCF() throws NamingException, JMSException
+ {
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+ props.put(ActiveMQInitialContextFactory.CONNECTION_FACTORY_NAMES, "myConnectionFactory");
+ props.put("connection.myConnectionFactory.type", "TOPIC_CF");
+ Context ctx = new InitialContext(props);
+
+ ActiveMQConnectionFactory connectionFactory = (ActiveMQConnectionFactory) ctx.lookup("myConnectionFactory");
+
+ Assert.assertEquals(JMSFactoryType.TOPIC_CF.intValue(), connectionFactory.getFactoryType());
+ }
+
+ @Test
+ public void testTopicXACF() throws NamingException, JMSException
+ {
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+ props.put(ActiveMQInitialContextFactory.CONNECTION_FACTORY_NAMES, "myConnectionFactory");
+ props.put("connection.myConnectionFactory.type", "TOPIC_XA_CF");
+ Context ctx = new InitialContext(props);
+
+ ActiveMQConnectionFactory connectionFactory = (ActiveMQConnectionFactory) ctx.lookup("myConnectionFactory");
+
+ Assert.assertEquals(JMSFactoryType.TOPIC_XA_CF.intValue(), connectionFactory.getFactoryType());
+ }
+
+ @Test
+ public void testCFWithProperties() throws NamingException, JMSException
+ {
+ // we don't test the 'ha' property here because it's not supported on a local connection factory (i.e. one
+ // constructed from an InitialContext where the environment doesn't contain the property "java.naming.provider.url")
+
+ long callFailoverTimeout = RandomUtil.randomPositiveLong();
+ long callTimeout = RandomUtil.randomPositiveLong();
+ long clientFailureCheckPeriod = RandomUtil.randomPositiveLong();
+ String clientID = RandomUtil.randomString();
+ int confirmationWindowSize = RandomUtil.randomPositiveInt();
+ String connectionLoadBalancingPolicyClassName = RandomUtil.randomString();
+ long connectionTTL = RandomUtil.randomPositiveLong();
+ int consumerMaxRate = RandomUtil.randomPositiveInt();
+ int consumerWindowSize = RandomUtil.randomPositiveInt();
+ int minLargeMessageSize = RandomUtil.randomPositiveInt();
+ int dupsOKBatchSize = RandomUtil.randomPositiveInt();
+ String groupID = RandomUtil.randomString();
+ int initialConnectAttempts = RandomUtil.randomPositiveInt();
+ int initialMessagePacketSize = RandomUtil.randomPositiveInt();
+ long maxRetryInterval = RandomUtil.randomPositiveLong();
+ int producerMaxRate = RandomUtil.randomPositiveInt();
+ int producerWindowSize = RandomUtil.randomPositiveInt();
+ int reconnectAttempts = RandomUtil.randomPositiveInt();
+ long retryInterval = RandomUtil.randomPositiveLong();
+ double retryIntervalMultiplier = RandomUtil.randomDouble();
+ int scheduledThreadPoolMaxSize = RandomUtil.randomPositiveInt();
+ int threadPoolMaxSize = RandomUtil.randomPositiveInt();
+ int transactionBatchSize = RandomUtil.randomPositiveInt();
+ boolean autoGroup = RandomUtil.randomBoolean();
+ boolean blockOnAcknowledge = RandomUtil.randomBoolean();
+ boolean blockOnDurableSend = RandomUtil.randomBoolean();
+ boolean blockOnNonDurableSend = RandomUtil.randomBoolean();
+ boolean cacheLargeMessagesClient = RandomUtil.randomBoolean();
+ boolean compressLargeMessage = RandomUtil.randomBoolean();
+ boolean failoverOnInitialConnection = RandomUtil.randomBoolean();
+ boolean preAcknowledge = RandomUtil.randomBoolean();
+ boolean useGlobalPools = RandomUtil.randomBoolean();
+
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+ props.put(ActiveMQInitialContextFactory.CONNECTION_FACTORY_NAMES, "myConnectionFactory");
+ props.put("connection.myConnectionFactory.callFailoverTimeout", callFailoverTimeout);
+ props.put("connection.myConnectionFactory.callTimeout", callTimeout);
+ props.put("connection.myConnectionFactory.clientFailureCheckPeriod", clientFailureCheckPeriod);
+ props.put("connection.myConnectionFactory.clientID", clientID);
+ props.put("connection.myConnectionFactory.confirmationWindowSize", confirmationWindowSize);
+ props.put("connection.myConnectionFactory.connectionLoadBalancingPolicyClassName", connectionLoadBalancingPolicyClassName);
+ props.put("connection.myConnectionFactory.connectionTTL", connectionTTL);
+ props.put("connection.myConnectionFactory.consumerMaxRate", consumerMaxRate);
+ props.put("connection.myConnectionFactory.consumerWindowSize", consumerWindowSize);
+ props.put("connection.myConnectionFactory.minLargeMessageSize", minLargeMessageSize);
+ props.put("connection.myConnectionFactory.dupsOKBatchSize", dupsOKBatchSize);
+ props.put("connection.myConnectionFactory.groupID", groupID);
+ props.put("connection.myConnectionFactory.initialConnectAttempts", initialConnectAttempts);
+ props.put("connection.myConnectionFactory.initialMessagePacketSize", initialMessagePacketSize);
+ props.put("connection.myConnectionFactory.maxRetryInterval", maxRetryInterval);
+ props.put("connection.myConnectionFactory.producerMaxRate", producerMaxRate);
+ props.put("connection.myConnectionFactory.producerWindowSize", producerWindowSize);
+ props.put("connection.myConnectionFactory.reconnectAttempts", reconnectAttempts);
+ props.put("connection.myConnectionFactory.retryInterval", retryInterval);
+ props.put("connection.myConnectionFactory.retryIntervalMultiplier", retryIntervalMultiplier);
+ props.put("connection.myConnectionFactory.scheduledThreadPoolMaxSize", scheduledThreadPoolMaxSize);
+ props.put("connection.myConnectionFactory.threadPoolMaxSize", threadPoolMaxSize);
+ props.put("connection.myConnectionFactory.transactionBatchSize", transactionBatchSize);
+ props.put("connection.myConnectionFactory.blockOnAcknowledge", blockOnAcknowledge);
+ props.put("connection.myConnectionFactory.blockOnDurableSend", blockOnDurableSend);
+ props.put("connection.myConnectionFactory.blockOnNonDurableSend", blockOnNonDurableSend);
+ props.put("connection.myConnectionFactory.cacheLargeMessagesClient", cacheLargeMessagesClient);
+ props.put("connection.myConnectionFactory.compressLargeMessage", compressLargeMessage);
+ props.put("connection.myConnectionFactory.failoverOnInitialConnection", failoverOnInitialConnection);
+ props.put("connection.myConnectionFactory.autoGroup", autoGroup);
+ props.put("connection.myConnectionFactory.preAcknowledge", preAcknowledge);
+ props.put("connection.myConnectionFactory.useGlobalPools", useGlobalPools);
+ Context ctx = new InitialContext(props);
+
+ ActiveMQConnectionFactory cf = (ActiveMQConnectionFactory) ctx.lookup("myConnectionFactory");
+
+ Assert.assertEquals(callFailoverTimeout, cf.getCallFailoverTimeout());
+ Assert.assertEquals(callTimeout, cf.getCallTimeout());
+ Assert.assertEquals(clientFailureCheckPeriod, cf.getClientFailureCheckPeriod());
+ Assert.assertEquals(clientID, cf.getClientID());
+ Assert.assertEquals(confirmationWindowSize, cf.getConfirmationWindowSize());
+ Assert.assertEquals(connectionLoadBalancingPolicyClassName, cf.getConnectionLoadBalancingPolicyClassName());
+ Assert.assertEquals(connectionTTL, cf.getConnectionTTL());
+ Assert.assertEquals(consumerMaxRate, cf.getConsumerMaxRate());
+ Assert.assertEquals(consumerWindowSize, cf.getConsumerWindowSize());
+ Assert.assertEquals(minLargeMessageSize, cf.getMinLargeMessageSize());
+ Assert.assertEquals(dupsOKBatchSize, cf.getDupsOKBatchSize());
+ Assert.assertEquals(groupID, cf.getGroupID());
+ Assert.assertEquals(initialConnectAttempts, cf.getInitialConnectAttempts());
+ Assert.assertEquals(initialMessagePacketSize, cf.getInitialMessagePacketSize());
+ Assert.assertEquals(maxRetryInterval, cf.getMaxRetryInterval());
+ Assert.assertEquals(producerMaxRate, cf.getProducerMaxRate());
+ Assert.assertEquals(producerWindowSize, cf.getProducerWindowSize());
+ Assert.assertEquals(reconnectAttempts, cf.getReconnectAttempts());
+ Assert.assertEquals(retryInterval, cf.getRetryInterval());
+ Assert.assertEquals(retryIntervalMultiplier, cf.getRetryIntervalMultiplier(), 0.0001);
+ Assert.assertEquals(scheduledThreadPoolMaxSize, cf.getScheduledThreadPoolMaxSize());
+ Assert.assertEquals(threadPoolMaxSize, cf.getThreadPoolMaxSize());
+ Assert.assertEquals(transactionBatchSize, cf.getTransactionBatchSize());
+ Assert.assertEquals(autoGroup, cf.isAutoGroup());
+ Assert.assertEquals(blockOnAcknowledge, cf.isBlockOnAcknowledge());
+ Assert.assertEquals(blockOnDurableSend, cf.isBlockOnDurableSend());
+ Assert.assertEquals(blockOnNonDurableSend, cf.isBlockOnNonDurableSend());
+ Assert.assertEquals(cacheLargeMessagesClient, cf.isCacheLargeMessagesClient());
+ Assert.assertEquals(compressLargeMessage, cf.isCompressLargeMessage());
+ Assert.assertEquals(failoverOnInitialConnection, cf.isFailoverOnInitialConnection());
+ Assert.assertEquals(preAcknowledge, cf.isPreAcknowledge());
+ Assert.assertEquals(useGlobalPools, cf.isUseGlobalPools());
+ }
+
+ @Test
+ public void testCFWithStringProperties() throws NamingException, JMSException
+ {
+ // we don't test the 'ha' property here because it's not supported on a local connection factory (i.e. one
+ // constructed from an InitialContext where the environment doesn't contain the property "java.naming.provider.url")
+
+ String callFailoverTimeout = Long.toString(RandomUtil.randomPositiveLong());
+ String callTimeout = Long.toString(RandomUtil.randomPositiveLong());
+ String clientFailureCheckPeriod = Long.toString(RandomUtil.randomPositiveLong());
+ String clientID = RandomUtil.randomString();
+ String confirmationWindowSize = Integer.toString(RandomUtil.randomPositiveInt());
+ String connectionLoadBalancingPolicyClassName = RandomUtil.randomString();
+ String connectionTTL = Long.toString(RandomUtil.randomPositiveLong());
+ String consumerMaxRate = Integer.toString(RandomUtil.randomPositiveInt());
+ String consumerWindowSize = Integer.toString(RandomUtil.randomPositiveInt());
+ String minLargeMessageSize = Integer.toString(RandomUtil.randomPositiveInt());
+ String dupsOKBatchSize = Integer.toString(RandomUtil.randomPositiveInt());
+ String groupID = RandomUtil.randomString();
+ String initialConnectAttempts = Integer.toString(RandomUtil.randomPositiveInt());
+ String initialMessagePacketSize = Integer.toString(RandomUtil.randomPositiveInt());
+ String maxRetryInterval = Long.toString(RandomUtil.randomPositiveLong());
+ String producerMaxRate = Integer.toString(RandomUtil.randomPositiveInt());
+ String producerWindowSize = Integer.toString(RandomUtil.randomPositiveInt());
+ String reconnectAttempts = Integer.toString(RandomUtil.randomPositiveInt());
+ String retryInterval = Long.toString(RandomUtil.randomPositiveLong());
+ String retryIntervalMultiplier = Double.toString(RandomUtil.randomDouble());
+ String scheduledThreadPoolMaxSize = Integer.toString(RandomUtil.randomPositiveInt());
+ String threadPoolMaxSize = Integer.toString(RandomUtil.randomPositiveInt());
+ String transactionBatchSize = Integer.toString(RandomUtil.randomPositiveInt());
+ String autoGroup = Boolean.toString(RandomUtil.randomBoolean());
+ String blockOnAcknowledge = Boolean.toString(RandomUtil.randomBoolean());
+ String blockOnDurableSend = Boolean.toString(RandomUtil.randomBoolean());
+ String blockOnNonDurableSend = Boolean.toString(RandomUtil.randomBoolean());
+ String cacheLargeMessagesClient = Boolean.toString(RandomUtil.randomBoolean());
+ String compressLargeMessage = Boolean.toString(RandomUtil.randomBoolean());
+ String failoverOnInitialConnection = Boolean.toString(RandomUtil.randomBoolean());
+ String preAcknowledge = Boolean.toString(RandomUtil.randomBoolean());
+ String useGlobalPools = Boolean.toString(RandomUtil.randomBoolean());
+
+ Hashtable props = new Hashtable<String, String>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+ props.put(ActiveMQInitialContextFactory.CONNECTION_FACTORY_NAMES, "myConnectionFactory");
+ props.put("connection.myConnectionFactory.callFailoverTimeout", callFailoverTimeout);
+ props.put("connection.myConnectionFactory.callTimeout", callTimeout);
+ props.put("connection.myConnectionFactory.clientFailureCheckPeriod", clientFailureCheckPeriod);
+ props.put("connection.myConnectionFactory.clientID", clientID);
+ props.put("connection.myConnectionFactory.confirmationWindowSize", confirmationWindowSize);
+ props.put("connection.myConnectionFactory.connectionLoadBalancingPolicyClassName", connectionLoadBalancingPolicyClassName);
+ props.put("connection.myConnectionFactory.connectionTTL", connectionTTL);
+ props.put("connection.myConnectionFactory.consumerMaxRate", consumerMaxRate);
+ props.put("connection.myConnectionFactory.consumerWindowSize", consumerWindowSize);
+ props.put("connection.myConnectionFactory.minLargeMessageSize", minLargeMessageSize);
+ props.put("connection.myConnectionFactory.dupsOKBatchSize", dupsOKBatchSize);
+ props.put("connection.myConnectionFactory.groupID", groupID);
+ props.put("connection.myConnectionFactory.initialConnectAttempts", initialConnectAttempts);
+ props.put("connection.myConnectionFactory.initialMessagePacketSize", initialMessagePacketSize);
+ props.put("connection.myConnectionFactory.maxRetryInterval", maxRetryInterval);
+ props.put("connection.myConnectionFactory.producerMaxRate", producerMaxRate);
+ props.put("connection.myConnectionFactory.producerWindowSize", producerWindowSize);
+ props.put("connection.myConnectionFactory.reconnectAttempts", reconnectAttempts);
+ props.put("connection.myConnectionFactory.retryInterval", retryInterval);
+ props.put("connection.myConnectionFactory.retryIntervalMultiplier", retryIntervalMultiplier);
+ props.put("connection.myConnectionFactory.scheduledThreadPoolMaxSize", scheduledThreadPoolMaxSize);
+ props.put("connection.myConnectionFactory.threadPoolMaxSize", threadPoolMaxSize);
+ props.put("connection.myConnectionFactory.transactionBatchSize", transactionBatchSize);
+ props.put("connection.myConnectionFactory.blockOnAcknowledge", blockOnAcknowledge);
+ props.put("connection.myConnectionFactory.blockOnDurableSend", blockOnDurableSend);
+ props.put("connection.myConnectionFactory.blockOnNonDurableSend", blockOnNonDurableSend);
+ props.put("connection.myConnectionFactory.cacheLargeMessagesClient", cacheLargeMessagesClient);
+ props.put("connection.myConnectionFactory.compressLargeMessage", compressLargeMessage);
+ props.put("connection.myConnectionFactory.failoverOnInitialConnection", failoverOnInitialConnection);
+ props.put("connection.myConnectionFactory.autoGroup", autoGroup);
+ props.put("connection.myConnectionFactory.preAcknowledge", preAcknowledge);
+ props.put("connection.myConnectionFactory.useGlobalPools", useGlobalPools);
+ Context ctx = new InitialContext(props);
+
+ ActiveMQConnectionFactory cf = (ActiveMQConnectionFactory) ctx.lookup("myConnectionFactory");
+
+ Assert.assertEquals(Long.parseLong(callFailoverTimeout), cf.getCallFailoverTimeout());
+ Assert.assertEquals(Long.parseLong(callTimeout), cf.getCallTimeout());
+ Assert.assertEquals(Long.parseLong(clientFailureCheckPeriod), cf.getClientFailureCheckPeriod());
+ Assert.assertEquals(clientID, cf.getClientID());
+ Assert.assertEquals(Integer.parseInt(confirmationWindowSize), cf.getConfirmationWindowSize());
+ Assert.assertEquals(connectionLoadBalancingPolicyClassName, cf.getConnectionLoadBalancingPolicyClassName());
+ Assert.assertEquals(Long.parseLong(connectionTTL), cf.getConnectionTTL());
+ Assert.assertEquals(Integer.parseInt(consumerMaxRate), cf.getConsumerMaxRate());
+ Assert.assertEquals(Integer.parseInt(consumerWindowSize), cf.getConsumerWindowSize());
+ Assert.assertEquals(Integer.parseInt(minLargeMessageSize), cf.getMinLargeMessageSize());
+ Assert.assertEquals(Integer.parseInt(dupsOKBatchSize), cf.getDupsOKBatchSize());
+ Assert.assertEquals(groupID, cf.getGroupID());
+ Assert.assertEquals(Integer.parseInt(initialConnectAttempts), cf.getInitialConnectAttempts());
+ Assert.assertEquals(Integer.parseInt(initialMessagePacketSize), cf.getInitialMessagePacketSize());
+ Assert.assertEquals(Long.parseLong(maxRetryInterval), cf.getMaxRetryInterval());
+ Assert.assertEquals(Integer.parseInt(producerMaxRate), cf.getProducerMaxRate());
+ Assert.assertEquals(Integer.parseInt(producerWindowSize), cf.getProducerWindowSize());
+ Assert.assertEquals(Integer.parseInt(reconnectAttempts), cf.getReconnectAttempts());
+ Assert.assertEquals(Long.parseLong(retryInterval), cf.getRetryInterval());
+ Assert.assertEquals(Double.parseDouble(retryIntervalMultiplier), cf.getRetryIntervalMultiplier(), 0.0001);
+ Assert.assertEquals(Integer.parseInt(scheduledThreadPoolMaxSize), cf.getScheduledThreadPoolMaxSize());
+ Assert.assertEquals(Integer.parseInt(threadPoolMaxSize), cf.getThreadPoolMaxSize());
+ Assert.assertEquals(Integer.parseInt(transactionBatchSize), cf.getTransactionBatchSize());
+ Assert.assertEquals(Boolean.parseBoolean(autoGroup), cf.isAutoGroup());
+ Assert.assertEquals(Boolean.parseBoolean(blockOnAcknowledge), cf.isBlockOnAcknowledge());
+ Assert.assertEquals(Boolean.parseBoolean(blockOnDurableSend), cf.isBlockOnDurableSend());
+ Assert.assertEquals(Boolean.parseBoolean(blockOnNonDurableSend), cf.isBlockOnNonDurableSend());
+ Assert.assertEquals(Boolean.parseBoolean(cacheLargeMessagesClient), cf.isCacheLargeMessagesClient());
+ Assert.assertEquals(Boolean.parseBoolean(compressLargeMessage), cf.isCompressLargeMessage());
+ Assert.assertEquals(Boolean.parseBoolean(failoverOnInitialConnection), cf.isFailoverOnInitialConnection());
+ Assert.assertEquals(Boolean.parseBoolean(preAcknowledge), cf.isPreAcknowledge());
+ Assert.assertEquals(Boolean.parseBoolean(useGlobalPools), cf.isUseGlobalPools());
+ }
+
+ @Test
+ public void testRemoteCFWithTCP() throws NamingException, JMSException
+ {
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+ props.put(Context.PROVIDER_URL, "tcp://127.0.0.1:5445");
+ props.put(ActiveMQInitialContextFactory.CONNECTION_FACTORY_NAMES, "myConnectionFactory");
+ Context ctx = new InitialContext(props);
+
+ ConnectionFactory connectionFactory = (ConnectionFactory) ctx.lookup("myConnectionFactory");
+
+ connectionFactory.createConnection().close();
+ }
+
+ @Test
+ public void testRemoteCFWithTCPandHA() throws NamingException, JMSException
+ {
+ boolean ha = true;
+
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+ props.put(Context.PROVIDER_URL, "tcp://127.0.0.1:5445");
+ props.put(ActiveMQInitialContextFactory.CONNECTION_FACTORY_NAMES, "myConnectionFactory");
+ props.put("connection.myConnectionFactory.ha", ha);
+ Context ctx = new InitialContext(props);
+
+ ActiveMQConnectionFactory cf = (ActiveMQConnectionFactory) ctx.lookup("myConnectionFactory");
+
+ Assert.assertEquals(ha, cf.isHA());
+ }
+
+ @Test
+ public void testRemoteCFWithJGroups() throws Exception
+ {
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+ props.put(Context.PROVIDER_URL, "jgroups://test-jgroups-file_ping.xml");
+ Context ctx = new InitialContext(props);
+
+ ActiveMQConnectionFactory connectionFactory = (ActiveMQConnectionFactory) ctx.lookup("ConnectionFactory");
+ connectionFactory.getDiscoveryGroupConfiguration().getBroadcastEndpointFactoryConfiguration().createBroadcastEndpointFactory().createBroadcastEndpoint().close(false);
+ }
+
+ @Test
+ public void testRemoteCFWithJgroupsWithTransportConfig() throws Exception
+ {
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, ActiveMQInitialContextFactory.class.getCanonicalName());
+ props.put(Context.PROVIDER_URL, "jgroups://test-jgroups-file_ping.xml?" +
+ ActiveMQInitialContextFactory.REFRESH_TIMEOUT + "=5000&" +
+ ActiveMQInitialContextFactory.DISCOVERY_INITIAL_WAIT_TIMEOUT + "=6000");
+ Context ctx = new InitialContext(props);
+
+ ActiveMQConnectionFactory cf = (ActiveMQConnectionFactory) ctx.lookup("ConnectionFactory");
+
+ DiscoveryGroupConfiguration discoveryGroupConfiguration = cf.getDiscoveryGroupConfiguration();
+ Assert.assertEquals(5000, discoveryGroupConfiguration.getRefreshTimeout());
+ Assert.assertEquals(6000, discoveryGroupConfiguration.getDiscoveryInitialWaitTimeout());
+
+ cf.getDiscoveryGroupConfiguration().getBroadcastEndpointFactoryConfiguration().createBroadcastEndpointFactory().createBroadcastEndpoint().close(false);
+ }
+
+ @Test
+ public void testRemoteCFWithUDP() throws NamingException, JMSException
+ {
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+ props.put(Context.PROVIDER_URL, "udp://" + getUDPDiscoveryAddress() + ":" + getUDPDiscoveryPort());
+ props.put(ActiveMQInitialContextFactory.CONNECTION_FACTORY_NAMES, "myConnectionFactory");
+ Context ctx = new InitialContext(props);
+
+ ConnectionFactory connectionFactory = (ConnectionFactory) ctx.lookup("myConnectionFactory");
+
+ connectionFactory.createConnection().close();
+ }
+
+ @Test
+ public void testRemoteCFWithUDPWithTransportConfig() throws NamingException, JMSException
+ {
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, ActiveMQInitialContextFactory.class.getCanonicalName());
+ props.put(Context.PROVIDER_URL, "udp://" + getUDPDiscoveryAddress() + ":" + getUDPDiscoveryPort() + "?" +
+ TransportConstants.LOCAL_ADDRESS_PROP_NAME + "=127.0.0.1&" +
+ TransportConstants.LOCAL_PORT_PROP_NAME + "=1198&" +
+ ActiveMQInitialContextFactory.REFRESH_TIMEOUT + "=5000&" +
+ ActiveMQInitialContextFactory.DISCOVERY_INITIAL_WAIT_TIMEOUT + "=6000");
+ props.put(ActiveMQInitialContextFactory.CONNECTION_FACTORY_NAMES, "myConnectionFactory");
+ Context ctx = new InitialContext(props);
+
+ ActiveMQConnectionFactory cf = (ActiveMQConnectionFactory) ctx.lookup("myConnectionFactory");
+
+ DiscoveryGroupConfiguration discoveryGroupConfiguration = cf.getDiscoveryGroupConfiguration();
+ Assert.assertEquals(5000, discoveryGroupConfiguration.getRefreshTimeout());
+ Assert.assertEquals(6000, discoveryGroupConfiguration.getDiscoveryInitialWaitTimeout());
+
+ UDPBroadcastGroupConfiguration udpBroadcastGroupConfiguration = (UDPBroadcastGroupConfiguration) discoveryGroupConfiguration.getBroadcastEndpointFactoryConfiguration();
+ Assert.assertEquals("127.0.0.1", udpBroadcastGroupConfiguration.getLocalBindAddress());
+ Assert.assertEquals(1198, udpBroadcastGroupConfiguration.getLocalBindPort());
+ Assert.assertEquals(getUDPDiscoveryAddress(), udpBroadcastGroupConfiguration.getGroupAddress());
+ Assert.assertEquals(getUDPDiscoveryPort(), udpBroadcastGroupConfiguration.getGroupPort());
+ }
+
+ @Test
+ public void testRemoteCFWithMultipleHosts() throws NamingException, JMSException
+ {
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+ props.put(Context.PROVIDER_URL, "tcp://127.0.0.1:5445,127.0.0.2:5446");
+ props.put(ActiveMQInitialContextFactory.CONNECTION_FACTORY_NAMES, "myConnectionFactory");
+ Context ctx = new InitialContext(props);
+
+ ConnectionFactory connectionFactory = (ConnectionFactory) ctx.lookup("myConnectionFactory");
+
+ connectionFactory.createConnection().close();
+ }
+
+ @Test
+ public void testRemoteCFWithTransportConfig() throws NamingException, JMSException
+ {
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+ props.put(Context.PROVIDER_URL, "tcp://127.0.0.1:5445?" +
+ TransportConstants.SSL_ENABLED_PROP_NAME + "=mySSLEnabledPropValue&" +
+ TransportConstants.HTTP_ENABLED_PROP_NAME + "=myHTTPEnabledPropValue&" +
+ TransportConstants.HTTP_CLIENT_IDLE_PROP_NAME + "=myHTTPClientIdlePropValue&" +
+ TransportConstants.HTTP_CLIENT_IDLE_SCAN_PERIOD + "=myHTTPClientIdleScanPeriodValue&" +
+ TransportConstants.HTTP_REQUIRES_SESSION_ID + "=myHTTPRequiresSessionIDValue&" +
+ TransportConstants.HTTP_UPGRADE_ENABLED_PROP_NAME + "=myHTTPUpgradeEnabledPropValue&" +
+ TransportConstants.HTTP_UPGRADE_ENDPOINT_PROP_NAME + "=myHTTPUpgradeEndpointPropValue&" +
+ TransportConstants.USE_SERVLET_PROP_NAME + "=myUseServletPropValue&" +
+ TransportConstants.SERVLET_PATH + "=myServletPathValue&" +
+ TransportConstants.USE_NIO_PROP_NAME + "=myUseNIOPropValue&" +
+ TransportConstants.USE_NIO_GLOBAL_WORKER_POOL_PROP_NAME + "=myUseNIOGlobalWorkerPoolPropValue&" +
+ TransportConstants.LOCAL_ADDRESS_PROP_NAME + "=myLocalAddressPropValue&" +
+ TransportConstants.LOCAL_PORT_PROP_NAME + "=myLocalPortPropValue&" +
+ TransportConstants.KEYSTORE_PROVIDER_PROP_NAME + "=myKeystoreProviderPropValue&" +
+ TransportConstants.KEYSTORE_PATH_PROP_NAME + "=myKeystorePathPropValue&" +
+ TransportConstants.KEYSTORE_PASSWORD_PROP_NAME + "=myKeystorePasswordPropValue&" +
+ TransportConstants.TRUSTSTORE_PROVIDER_PROP_NAME + "=myTruststoreProviderPropValue&" +
+ TransportConstants.TRUSTSTORE_PATH_PROP_NAME + "=myTruststorePathPropValue&" +
+ TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME + "=myTruststorePasswordPropValue&" +
+ TransportConstants.ENABLED_CIPHER_SUITES_PROP_NAME + "=myEnabledCipherSuitesPropValue&" +
+ TransportConstants.ENABLED_PROTOCOLS_PROP_NAME + "=myEnabledProtocolsPropValue&" +
+ TransportConstants.TCP_NODELAY_PROPNAME + "=myTCPNoDelayPropValue&" +
+ TransportConstants.TCP_SENDBUFFER_SIZE_PROPNAME + "=myTCPSendbufferSizePropValue&" +
+ TransportConstants.TCP_RECEIVEBUFFER_SIZE_PROPNAME + "=myTCPReceivebufferSizePropValue&" +
+ TransportConstants.NIO_REMOTING_THREADS_PROPNAME + "=myNIORemotingThreadsPropValue&" +
+ TransportConstants.BATCH_DELAY + "=myBatchDelay&" +
+ ActiveMQDefaultConfiguration.getPropMaskPassword() + "=myPropMaskPassword&" +
+ ActiveMQDefaultConfiguration.getPropPasswordCodec() + "=myPropPasswordCodec&" +
+ TransportConstants.NETTY_CONNECT_TIMEOUT + "=myNettyConnectTimeout&");
+ props.put(ActiveMQInitialContextFactory.CONNECTION_FACTORY_NAMES, "myConnectionFactory");
+ Context ctx = new InitialContext(props);
+
+ ActiveMQConnectionFactory cf = (ActiveMQConnectionFactory) ctx.lookup("myConnectionFactory");
+
+ Map parametersFromJNDI = cf.getServerLocator().getStaticTransportConfigurations()[0].getParams();
+
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.SSL_ENABLED_PROP_NAME), "mySSLEnabledPropValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.HTTP_ENABLED_PROP_NAME), "myHTTPEnabledPropValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.HTTP_CLIENT_IDLE_PROP_NAME), "myHTTPClientIdlePropValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.HTTP_CLIENT_IDLE_SCAN_PERIOD), "myHTTPClientIdleScanPeriodValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.HTTP_REQUIRES_SESSION_ID), "myHTTPRequiresSessionIDValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.HTTP_UPGRADE_ENABLED_PROP_NAME), "myHTTPUpgradeEnabledPropValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.HTTP_UPGRADE_ENDPOINT_PROP_NAME), "myHTTPUpgradeEndpointPropValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.USE_SERVLET_PROP_NAME), "myUseServletPropValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.SERVLET_PATH), "myServletPathValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.USE_NIO_PROP_NAME), "myUseNIOPropValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.USE_NIO_GLOBAL_WORKER_POOL_PROP_NAME), "myUseNIOGlobalWorkerPoolPropValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.LOCAL_ADDRESS_PROP_NAME), "myLocalAddressPropValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.LOCAL_PORT_PROP_NAME), "myLocalPortPropValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.KEYSTORE_PROVIDER_PROP_NAME), "myKeystoreProviderPropValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.KEYSTORE_PATH_PROP_NAME), "myKeystorePathPropValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.KEYSTORE_PASSWORD_PROP_NAME), "myKeystorePasswordPropValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.TRUSTSTORE_PROVIDER_PROP_NAME), "myTruststoreProviderPropValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.TRUSTSTORE_PATH_PROP_NAME), "myTruststorePathPropValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME), "myTruststorePasswordPropValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.ENABLED_CIPHER_SUITES_PROP_NAME), "myEnabledCipherSuitesPropValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.ENABLED_PROTOCOLS_PROP_NAME), "myEnabledProtocolsPropValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.TCP_NODELAY_PROPNAME), "myTCPNoDelayPropValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.TCP_SENDBUFFER_SIZE_PROPNAME), "myTCPSendbufferSizePropValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.TCP_RECEIVEBUFFER_SIZE_PROPNAME), "myTCPReceivebufferSizePropValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.NIO_REMOTING_THREADS_PROPNAME), "myNIORemotingThreadsPropValue");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.BATCH_DELAY), "myBatchDelay");
+ Assert.assertEquals(parametersFromJNDI.get(ActiveMQDefaultConfiguration.getPropMaskPassword()), "myPropMaskPassword");
+ Assert.assertEquals(parametersFromJNDI.get(ActiveMQDefaultConfiguration.getPropPasswordCodec()), "myPropPasswordCodec");
+ Assert.assertEquals(parametersFromJNDI.get(TransportConstants.NETTY_CONNECT_TIMEOUT), "myNettyConnectTimeout");
+ }
+
+ @Override
+ @Before
+ public void setUp() throws Exception
+ {
+ super.setUp();
+
+ startServer();
+ }
+
+ private void startServer() throws Exception
+ {
+ liveTC = new TransportConfiguration(INVM_CONNECTOR_FACTORY);
+ Map<String, TransportConfiguration> connectors = new HashMap<String, TransportConfiguration>();
+ connectors.put(liveTC.getName(), liveTC);
+ List<String> connectorNames = new ArrayList<String>();
+ connectorNames.add(liveTC.getName());
+
+ Map params = new HashMap();
+ params.put("server-id", 1);
+
+ Configuration liveConf = createBasicConfig()
+ .addAcceptorConfiguration(new TransportConfiguration(INVM_ACCEPTOR_FACTORY))
+ .addAcceptorConfiguration(new TransportConfiguration(INVM_ACCEPTOR_FACTORY, params))
+ .addAcceptorConfiguration(new TransportConfiguration(NETTY_ACCEPTOR_FACTORY))
+ .setConnectorConfigurations(connectors)
+ .setHAPolicyConfiguration(new SharedStoreMasterPolicyConfiguration());
+
+ final long broadcastPeriod = 250;
+
+ final String bcGroupName = "bc1";
+
+ final int localBindPort = 5432;
+
+ BroadcastGroupConfiguration bcConfig1 = new BroadcastGroupConfiguration()
+ .setName(bcGroupName)
+ .setBroadcastPeriod(broadcastPeriod)
+ .setConnectorInfos(connectorNames)
+ .setEndpointFactoryConfiguration(new UDPBroadcastGroupConfiguration()
+ .setGroupAddress(groupAddress)
+ .setGroupPort(groupPort)
+ .setLocalBindPort(localBindPort));
+
+ List<BroadcastGroupConfiguration> bcConfigs1 = new ArrayList<BroadcastGroupConfiguration>();
+ bcConfigs1.add(bcConfig1);
+ liveConf.setBroadcastGroupConfigurations(bcConfigs1);
+
+ liveService = addServer(ActiveMQServers.newActiveMQServer(liveConf, false));
+ liveService.start();
+ }
+
+ @Test
+ public void testQueue() throws NamingException, JMSException
+ {
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+ props.put("queue.myQueue", "myQueue");
+ props.put("queue.queues/myQueue", "myQueue");
+ Context ctx = new InitialContext(props);
+
+ Destination destination = (Destination) ctx.lookup("myQueue");
+ Assert.assertTrue(destination instanceof Queue);
+
+ destination = (Destination) ctx.lookup("queues/myQueue");
+ Assert.assertTrue(destination instanceof Queue);
+ }
+
+ @Test
+ public void testDynamicQueue() throws NamingException, JMSException
+ {
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+ Context ctx = new InitialContext(props);
+
+ Destination destination = (Destination) ctx.lookup("dynamicQueues/myQueue");
+ Assert.assertTrue(destination instanceof Queue);
+ }
+
+ @Test
+ public void testTopic() throws NamingException, JMSException
+ {
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+ props.put("topic.myTopic", "myTopic");
+ props.put("topic.topics/myTopic", "myTopic");
+ Context ctx = new InitialContext(props);
+
+ Destination destination = (Destination) ctx.lookup("myTopic");
+ Assert.assertTrue(destination instanceof Topic);
+
+ destination = (Destination) ctx.lookup("topics/myTopic");
+ Assert.assertTrue(destination instanceof Topic);
+ }
+
+ @Test
+ public void testDynamicTopic() throws NamingException, JMSException
+ {
+ Hashtable props = new Hashtable<>();
+ props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+ Context ctx = new InitialContext(props);
+
+ Destination destination = (Destination) ctx.lookup("dynamicTopics/myTopic");
+ Assert.assertTrue(destination instanceof Topic);
+ }
+}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/JMSServerDeployerTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/JMSServerDeployerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/JMSServerDeployerTest.java
index 4ce9f14..bede98b 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/JMSServerDeployerTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/JMSServerDeployerTest.java
@@ -19,7 +19,6 @@ package org.apache.activemq.tests.integration.jms.server;
import javax.jms.Queue;
import javax.jms.Topic;
import javax.naming.Context;
-import java.net.URI;
import org.apache.activemq.api.core.DiscoveryGroupConfiguration;
import org.apache.activemq.api.core.TransportConfiguration;
@@ -29,14 +28,12 @@ import org.apache.activemq.core.deployers.DeploymentManager;
import org.apache.activemq.core.deployers.impl.FileDeploymentManager;
import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory;
import org.apache.activemq.core.server.ActiveMQServer;
-import org.apache.activemq.jms.client.ActiveMQConnectionFactory;
import org.apache.activemq.jms.server.JMSServerManager;
import org.apache.activemq.jms.server.impl.JMSServerDeployer;
import org.apache.activemq.jms.server.impl.JMSServerManagerImpl;
import org.apache.activemq.tests.integration.IntegrationTestLogger;
import org.apache.activemq.tests.unit.util.InVMNamingContext;
import org.apache.activemq.tests.util.ServiceTestBase;
-import org.apache.activemq.tests.util.UnitTestCase;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
@@ -93,7 +90,6 @@ public class JMSServerDeployerTest extends ServiceTestBase
doTestDeployQueuesWithUnusualNames("queue\\with\\backslashes\\in\\name", "/myqueue4");
doTestDeployQueuesWithUnusualNames("queue with # chars and * chars in name",
- "queue with # chars and * chars in name",
"/myqueue5");
}
@@ -109,21 +105,13 @@ public class JMSServerDeployerTest extends ServiceTestBase
doTestDeployTopicsWithUnusualNames("topic\\with\\backslashes\\in\\name", "/mytopic4");
doTestDeployTopicsWithUnusualNames("topic with # chars and * chars in name",
- "topic with # chars and * chars in name",
"/mytopic5");
}
private void doTestDeployQueuesWithUnusualNames(final String queueName,
- final String htmlEncodedName,
final String jndiName) throws Exception
{
- JMSServerDeployer deployer = new JMSServerDeployer(jmsServer, deploymentManager);
-
- String xml = "<queue name=\"" + htmlEncodedName + "\">" + "<entry name=\"" + jndiName + "\"/>" + "</queue>";
-
- Element rootNode = org.apache.activemq.utils.XMLUtil.stringToElement(xml);
-
- deployer.deploy(rootNode);
+ jmsServer.createQueue(false, queueName, null, false, jndiName);
Queue queue = (Queue) context.lookup(jndiName);
Assert.assertNotNull(queue);
@@ -131,206 +119,15 @@ public class JMSServerDeployerTest extends ServiceTestBase
}
private void doTestDeployTopicsWithUnusualNames(final String topicName,
- final String htmlEncodedName,
final String jndiName) throws Exception
{
- JMSServerDeployer deployer = new JMSServerDeployer(jmsServer, deploymentManager);
-
- String xml =
-
- "<topic name=\"" + htmlEncodedName + "\">" + "<entry name=\"" + jndiName + "\"/>" + "</topic>";
-
- Element rootNode = org.apache.activemq.utils.XMLUtil.stringToElement(xml);
-
- deployer.deploy(rootNode);
+ jmsServer.createTopic(false, topicName, jndiName);
Topic topic = (Topic) context.lookup(jndiName);
Assert.assertNotNull(topic);
Assert.assertEquals(topicName, topic.getTopicName());
}
- private void doTestDeployQueuesWithUnusualNames(final String queueName, final String jndiName) throws Exception
- {
- doTestDeployQueuesWithUnusualNames(queueName, queueName, jndiName);
- }
-
- private void doTestDeployTopicsWithUnusualNames(final String topicName, final String jndiName) throws Exception
- {
- doTestDeployTopicsWithUnusualNames(topicName, topicName, jndiName);
- }
-
- @Test
- public void testDeployFullConfiguration() throws Exception
- {
- JMSServerDeployer deployer = new JMSServerDeployer(jmsServer, deploymentManager);
-
- String conf = "activemq-jms-for-JMSServerDeployerTest.xml";
- URI confURL = Thread.currentThread().getContextClassLoader().getResource(conf).toURI();
-
- String[] connectionFactoryBindings = new String[]{"/fullConfigurationConnectionFactory",
- "/acme/fullConfigurationConnectionFactory",
- "java:/xyz/tfullConfigurationConnectionFactory",
- "java:/connectionfactories/acme/fullConfigurationConnectionFactory"};
- String[] queueBindings = new String[]{"/fullConfigurationQueue", "/queue/fullConfigurationQueue"};
- String[] topicBindings = new String[]{"/fullConfigurationTopic", "/topic/fullConfigurationTopic"};
-
- for (String binding : connectionFactoryBindings)
- {
- UnitTestCase.checkNoBinding(context, binding);
- }
- for (String binding : queueBindings)
- {
- UnitTestCase.checkNoBinding(context, binding);
- }
- for (String binding : topicBindings)
- {
- UnitTestCase.checkNoBinding(context, binding);
- }
-
- deployer.deploy(confURL);
-
- for (String binding : connectionFactoryBindings)
- {
- UnitTestCase.checkBinding(context, binding);
- }
- for (String binding : queueBindings)
- {
- UnitTestCase.checkBinding(context, binding);
- }
- for (String binding : topicBindings)
- {
- UnitTestCase.checkBinding(context, binding);
- }
-
- for (String binding : connectionFactoryBindings)
- {
- ActiveMQConnectionFactory cf = (ActiveMQConnectionFactory) context.lookup(binding);
- Assert.assertNotNull(cf);
- Assert.assertEquals(1234, cf.getClientFailureCheckPeriod());
- Assert.assertEquals(5678, cf.getCallTimeout());
- Assert.assertEquals(12345, cf.getConsumerWindowSize());
- Assert.assertEquals(6789, cf.getConsumerMaxRate());
- Assert.assertEquals(123456, cf.getConfirmationWindowSize());
- Assert.assertEquals(7712652, cf.getProducerWindowSize());
- Assert.assertEquals(789, cf.getProducerMaxRate());
- Assert.assertEquals(12, cf.getMinLargeMessageSize());
- Assert.assertEquals("TestClientID", cf.getClientID());
- Assert.assertEquals(3456, cf.getDupsOKBatchSize());
- Assert.assertEquals(4567, cf.getTransactionBatchSize());
- Assert.assertEquals(true, cf.isBlockOnAcknowledge());
- Assert.assertEquals(false, cf.isBlockOnNonDurableSend());
- Assert.assertEquals(true, cf.isBlockOnDurableSend());
- Assert.assertEquals(false, cf.isAutoGroup());
- Assert.assertEquals(true, cf.isPreAcknowledge());
- Assert.assertEquals(2345, cf.getConnectionTTL());
- assertEquals(true, cf.isFailoverOnInitialConnection());
- Assert.assertEquals(34, cf.getReconnectAttempts());
- Assert.assertEquals(5, cf.getRetryInterval());
- Assert.assertEquals(6.0, cf.getRetryIntervalMultiplier(), 0.000001);
- Assert.assertEquals(true, cf.isCacheLargeMessagesClient());
- }
-
- for (String binding : queueBindings)
- {
- Queue queue = (Queue) context.lookup(binding);
- Assert.assertNotNull(queue);
- Assert.assertEquals("fullConfigurationQueue", queue.getQueueName());
- }
-
- for (String binding : topicBindings)
- {
- Topic topic = (Topic) context.lookup(binding);
- Assert.assertNotNull(topic);
- Assert.assertEquals("fullConfigurationTopic", topic.getTopicName());
- }
- }
-
- @Test
- public void testDeployFullConfiguration2() throws Exception
- {
- JMSServerDeployer deployer = new JMSServerDeployer(jmsServer, deploymentManager);
-
- String conf = "activemq-jms-for-JMSServerDeployerTest2.xml";
- URI confURL = Thread.currentThread().getContextClassLoader().getResource(conf).toURI();
-
- String[] connectionFactoryBindings = new String[]{"/fullConfigurationConnectionFactory",
- "/acme/fullConfigurationConnectionFactory",
- "java:/xyz/tfullConfigurationConnectionFactory",
- "java:/connectionfactories/acme/fullConfigurationConnectionFactory"};
- String[] queueBindings = new String[]{"/fullConfigurationQueue", "/queue/fullConfigurationQueue"};
- String[] topicBindings = new String[]{"/fullConfigurationTopic", "/topic/fullConfigurationTopic"};
-
- for (String binding : connectionFactoryBindings)
- {
- UnitTestCase.checkNoBinding(context, binding);
- }
- for (String binding : queueBindings)
- {
- UnitTestCase.checkNoBinding(context, binding);
- }
- for (String binding : topicBindings)
- {
- UnitTestCase.checkNoBinding(context, binding);
- }
-
- deployer.deploy(confURL);
-
- for (String binding : connectionFactoryBindings)
- {
- UnitTestCase.checkBinding(context, binding);
- }
- for (String binding : queueBindings)
- {
- UnitTestCase.checkBinding(context, binding);
- }
- for (String binding : topicBindings)
- {
- UnitTestCase.checkBinding(context, binding);
- }
-
- for (String binding : connectionFactoryBindings)
- {
- ActiveMQConnectionFactory cf = (ActiveMQConnectionFactory) context.lookup(binding);
- Assert.assertNotNull(cf);
- Assert.assertEquals(1234, cf.getClientFailureCheckPeriod());
- Assert.assertEquals(5678, cf.getCallTimeout());
- Assert.assertEquals(12345, cf.getConsumerWindowSize());
- Assert.assertEquals(6789, cf.getConsumerMaxRate());
- Assert.assertEquals(123456, cf.getConfirmationWindowSize());
- Assert.assertEquals(7712652, cf.getProducerWindowSize());
- Assert.assertEquals(789, cf.getProducerMaxRate());
- Assert.assertEquals(12, cf.getMinLargeMessageSize());
- Assert.assertEquals("TestClientID", cf.getClientID());
- Assert.assertEquals(3456, cf.getDupsOKBatchSize());
- Assert.assertEquals(4567, cf.getTransactionBatchSize());
- Assert.assertEquals(true, cf.isBlockOnAcknowledge());
- Assert.assertEquals(false, cf.isBlockOnNonDurableSend());
- Assert.assertEquals(true, cf.isBlockOnDurableSend());
- Assert.assertEquals(false, cf.isAutoGroup());
- Assert.assertEquals(true, cf.isPreAcknowledge());
- Assert.assertEquals(2345, cf.getConnectionTTL());
- assertEquals(true, cf.isFailoverOnInitialConnection());
- Assert.assertEquals(34, cf.getReconnectAttempts());
- Assert.assertEquals(5, cf.getRetryInterval());
- Assert.assertEquals(6.0, cf.getRetryIntervalMultiplier(), 0.000001);
- Assert.assertEquals(true, cf.isCacheLargeMessagesClient());
- }
-
- for (String binding : queueBindings)
- {
- Queue queue = (Queue) context.lookup(binding);
- Assert.assertNotNull(queue);
- Assert.assertEquals("fullConfigurationQueue", queue.getQueueName());
- }
-
- for (String binding : topicBindings)
- {
- Topic topic = (Topic) context.lookup(binding);
- Assert.assertNotNull(topic);
- Assert.assertEquals("fullConfigurationTopic", topic.getTopicName());
- }
- }
-
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/config/JMSServerConfigParserTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/config/JMSServerConfigParserTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/config/JMSServerConfigParserTest.java
index 0255aab..0957a31 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/config/JMSServerConfigParserTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/config/JMSServerConfigParserTest.java
@@ -24,7 +24,6 @@ import java.net.URL;
import org.apache.activemq.api.core.TransportConfiguration;
import org.apache.activemq.core.config.Configuration;
import org.apache.activemq.jms.server.JMSServerConfigParser;
-import org.apache.activemq.jms.server.config.ConnectionFactoryConfiguration;
import org.apache.activemq.jms.server.config.JMSConfiguration;
import org.apache.activemq.jms.server.config.JMSQueueConfiguration;
import org.apache.activemq.jms.server.config.TopicConfiguration;
@@ -69,49 +68,15 @@ public class JMSServerConfigParserTest extends ServiceTestBase
JMSConfiguration jmsconfig = parser.parseConfiguration(stream);
stream.close();
- ConnectionFactoryConfiguration cfConfig = jmsconfig.getConnectionFactoryConfigurations().get(0);
-
- assertEquals(1234, cfConfig.getClientFailureCheckPeriod());
- assertEquals(5678, cfConfig.getCallTimeout());
- assertEquals(12345, cfConfig.getConsumerWindowSize());
- assertEquals(6789, cfConfig.getConsumerMaxRate());
- assertEquals(123456, cfConfig.getConfirmationWindowSize());
- assertEquals(7712652, cfConfig.getProducerWindowSize());
- assertEquals(789, cfConfig.getProducerMaxRate());
- assertEquals(12, cfConfig.getMinLargeMessageSize());
- assertEquals(true, cfConfig.isCompressLargeMessages());
- assertEquals("TestClientID", cfConfig.getClientID());
- assertEquals(3456, cfConfig.getDupsOKBatchSize());
- assertEquals(4567, cfConfig.getTransactionBatchSize());
- assertEquals(true, cfConfig.isBlockOnAcknowledge());
- assertEquals(false, cfConfig.isBlockOnNonDurableSend());
- assertEquals(true, cfConfig.isBlockOnDurableSend());
- assertEquals(false, cfConfig.isAutoGroup());
- assertEquals(true, cfConfig.isPreAcknowledge());
- assertEquals(2345, cfConfig.getConnectionTTL());
- assertEquals("FooClass", cfConfig.getLoadBalancingPolicyClassName());
- assertEquals(34, cfConfig.getReconnectAttempts());
- assertEquals(5, cfConfig.getRetryInterval());
- assertEquals(6.0, cfConfig.getRetryIntervalMultiplier(), 0.000001);
- assertEquals(300, cfConfig.getMaxRetryInterval());
- assertEquals(true, cfConfig.isCacheLargeMessagesClient());
-
-
assertEquals(1, jmsconfig.getQueueConfigurations().size());
JMSQueueConfiguration queueConfig = jmsconfig.getQueueConfigurations().get(0);
assertEquals("fullConfigurationQueue", queueConfig.getName());
- assertEquals(2, queueConfig.getBindings().length);
- assertEquals("/fullConfigurationQueue", queueConfig.getBindings()[0]);
- assertEquals("/queue/fullConfigurationQueue", queueConfig.getBindings()[1]);
assertEquals(1, jmsconfig.getTopicConfigurations().size());
TopicConfiguration topicConfig = jmsconfig.getTopicConfigurations().get(0);
assertEquals("fullConfigurationTopic", topicConfig.getName());
- assertEquals(2, topicConfig.getBindings().length);
- assertEquals("/fullConfigurationTopic", topicConfig.getBindings()[0]);
- assertEquals("/topic/fullConfigurationTopic", topicConfig.getBindings()[1]);
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQRATestBase.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQRATestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQRATestBase.java
index 355b68c..7778a45 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQRATestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ActiveMQRATestBase.java
@@ -119,6 +119,7 @@ public abstract class ActiveMQRATestBase extends JMSTestBase
isDeliveryTransacted = deliveryTransacted;
}
+ @Override
public MessageEndpoint createEndpoint(XAResource xaResource) throws UnavailableException
{
if (xaResource != null)
@@ -196,11 +197,13 @@ public abstract class ActiveMQRATestBase extends JMSTestBase
return null;
}
+ @Override
public WorkManager getWorkManager()
{
return workManager;
}
+ @Override
public XATerminator getXATerminator()
{
return null;
@@ -208,29 +211,35 @@ public abstract class ActiveMQRATestBase extends JMSTestBase
class DummyWorkManager implements WorkManager
{
+ @Override
public void doWork(Work work) throws WorkException
{
}
+ @Override
public void doWork(Work work, long l, ExecutionContext executionContext, WorkListener workListener) throws WorkException
{
}
+ @Override
public long startWork(Work work) throws WorkException
{
return 0;
}
+ @Override
public long startWork(Work work, long l, ExecutionContext executionContext, WorkListener workListener) throws WorkException
{
return 0;
}
+ @Override
public void scheduleWork(Work work) throws WorkException
{
work.run();
}
+ @Override
public void scheduleWork(Work work, long l, ExecutionContext executionContext, WorkListener workListener) throws WorkException
{
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/spring/SpringIntegrationTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/spring/SpringIntegrationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/spring/SpringIntegrationTest.java
index ff9d7dc..b9cd6f2 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/spring/SpringIntegrationTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/spring/SpringIntegrationTest.java
@@ -50,9 +50,10 @@ public class SpringIntegrationTest extends UnitTestCase
public void testSpring() throws Exception
{
System.out.println("Creating bean factory...");
- ApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"spring-jms-beans.xml"});
+ ApplicationContext context = null;
try
{
+ context = new ClassPathXmlApplicationContext(new String[]{"spring-jms-beans.xml"});
MessageSender sender = (MessageSender) context.getBean("MessageSender");
System.out.println("Sending message...");
ExampleListener.latch.countUp();
@@ -66,8 +67,11 @@ public class SpringIntegrationTest extends UnitTestCase
{
try
{
- DefaultMessageListenerContainer container = (DefaultMessageListenerContainer) context.getBean("listenerContainer");
- container.stop();
+ if (context != null)
+ {
+ DefaultMessageListenerContainer container = (DefaultMessageListenerContainer) context.getBean("listenerContainer");
+ container.stop();
+ }
}
catch (Throwable ignored)
{
@@ -75,8 +79,11 @@ public class SpringIntegrationTest extends UnitTestCase
}
try
{
- EmbeddedJMS jms = (EmbeddedJMS) context.getBean("EmbeddedJms");
- jms.stop();
+ if (context != null)
+ {
+ EmbeddedJMS jms = (EmbeddedJMS) context.getBean("EmbeddedJms");
+ jms.stop();
+ }
}
catch (Throwable ignored)
{
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/integration-tests/src/test/java/org/apache/activemq/tests/util/NonSerializableFactory.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/util/NonSerializableFactory.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/util/NonSerializableFactory.java
index f1a62d5..6d1bba7 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/util/NonSerializableFactory.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/util/NonSerializableFactory.java
@@ -21,14 +21,12 @@ import javax.naming.Name;
import javax.naming.NamingException;
import javax.naming.RefAddr;
import javax.naming.Reference;
-import javax.naming.StringRefAddr;
import javax.naming.spi.ObjectFactory;
import java.util.Collections;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Map;
-import org.jboss.util.naming.Util;
/**
* used by the default context when running in embedded local configuration
@@ -43,47 +41,47 @@ public final class NonSerializableFactory implements ObjectFactory
// Utility
}
- public static void unbind(final Context ctx, final String strName) throws NamingException
- {
- Name name = ctx.getNameParser("").parse(strName);
- int size = name.size();
- String atom = name.get(size - 1);
- Context parentCtx = Util.createSubcontext(ctx, name.getPrefix(size - 1));
- String key = new StringBuilder().append(parentCtx.getNameInNamespace()).append("/").append(atom).toString();
- NonSerializableFactory.getWrapperMap().remove(key);
- Util.unbind(ctx, strName);
- }
-
- public static void rebind(final Context ctx, final String strName, final Object value) throws NamingException
- {
- Name name = ctx.getNameParser("").parse(strName);
- int size = name.size();
- String atom = name.get(size - 1);
- Context parentCtx = Util.createSubcontext(ctx, name.getPrefix(size - 1));
- String key = new StringBuilder().append(parentCtx.getNameInNamespace()).append("/").append(atom).toString();
- NonSerializableFactory.getWrapperMap().put(key, value);
- String className = value.getClass().getName();
- String factory = NonSerializableFactory.class.getName();
- StringRefAddr addr = new StringRefAddr("nns", key);
- Reference memoryRef = new Reference(className, addr, factory, null);
- parentCtx.rebind(atom, memoryRef);
- }
-
- public static void bind(final Context ctx, final String strName, final Object value) throws NamingException
- {
- Name name = ctx.getNameParser("").parse(strName);
- int size = name.size();
- String atom = name.get(size - 1);
- Context parentCtx = Util.createSubcontext(ctx, name.getPrefix(size - 1));
- String key = new StringBuilder().append(parentCtx.getNameInNamespace()).append("/").append(atom).toString();
- NonSerializableFactory.getWrapperMap().put(key, value);
- String className = value.getClass().getName();
- String factory = NonSerializableFactory.class.getName();
- StringRefAddr addr = new StringRefAddr("nns", key);
- Reference memoryRef = new Reference(className, addr, factory, null);
-
- parentCtx.bind(atom, memoryRef);
- }
+// public static void unbind(final Context ctx, final String strName) throws NamingException
+// {
+// Name name = ctx.getNameParser("").parse(strName);
+// int size = name.size();
+// String atom = name.get(size - 1);
+// Context parentCtx = Util.createSubcontext(ctx, name.getPrefix(size - 1));
+// String key = new StringBuilder().append(parentCtx.getNameInNamespace()).append("/").append(atom).toString();
+// NonSerializableFactory.getWrapperMap().remove(key);
+// Util.unbind(ctx, strName);
+// }
+//
+// public static void rebind(final Context ctx, final String strName, final Object value) throws NamingException
+// {
+// Name name = ctx.getNameParser("").parse(strName);
+// int size = name.size();
+// String atom = name.get(size - 1);
+// Context parentCtx = Util.createSubcontext(ctx, name.getPrefix(size - 1));
+// String key = new StringBuilder().append(parentCtx.getNameInNamespace()).append("/").append(atom).toString();
+// NonSerializableFactory.getWrapperMap().put(key, value);
+// String className = value.getClass().getName();
+// String factory = NonSerializableFactory.class.getName();
+// StringRefAddr addr = new StringRefAddr("nns", key);
+// Reference memoryRef = new Reference(className, addr, factory, null);
+// parentCtx.rebind(atom, memoryRef);
+// }
+//
+// public static void bind(final Context ctx, final String strName, final Object value) throws NamingException
+// {
+// Name name = ctx.getNameParser("").parse(strName);
+// int size = name.size();
+// String atom = name.get(size - 1);
+// Context parentCtx = Util.createSubcontext(ctx, name.getPrefix(size - 1));
+// String key = new StringBuilder().append(parentCtx.getNameInNamespace()).append("/").append(atom).toString();
+// NonSerializableFactory.getWrapperMap().put(key, value);
+// String className = value.getClass().getName();
+// String factory = NonSerializableFactory.class.getName();
+// StringRefAddr addr = new StringRefAddr("nns", key);
+// Reference memoryRef = new Reference(className, addr, factory, null);
+//
+// parentCtx.bind(atom, memoryRef);
+// }
public static Object lookup(final String name) throws NamingException
{
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/integration-tests/src/test/resources/activemq-jms-for-JMSServerDeployerTest.xml
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/resources/activemq-jms-for-JMSServerDeployerTest.xml b/tests/integration-tests/src/test/resources/activemq-jms-for-JMSServerDeployerTest.xml
index 021796c..8fb11a9 100644
--- a/tests/integration-tests/src/test/resources/activemq-jms-for-JMSServerDeployerTest.xml
+++ b/tests/integration-tests/src/test/resources/activemq-jms-for-JMSServerDeployerTest.xml
@@ -2,52 +2,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq ../../src/schemas/activemq-jms.xsd ">
- <connection-factory name="fullConfigurationConnectionFactory">
- <entries>
- <entry name="/fullConfigurationConnectionFactory"/>
- <entry name="/acme/fullConfigurationConnectionFactory"/>
- <entry name="java:/xyz/tfullConfigurationConnectionFactory"/>
- <entry name="java:/connectionfactories/acme/fullConfigurationConnectionFactory"/>
- </entries>
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <client-failure-check-period>1234</client-failure-check-period>
- <call-timeout>5678</call-timeout>
- <consumer-window-size>12345</consumer-window-size>
- <consumer-max-rate>6789</consumer-max-rate>
- <confirmation-window-size>123456</confirmation-window-size>
- <producer-window-size>7712652</producer-window-size>
- <producer-max-rate>789</producer-max-rate>
- <min-large-message-size>12</min-large-message-size>
- <compress-large-messages>true</compress-large-messages>
- <client-id>TestClientID</client-id>
- <dups-ok-batch-size>3456</dups-ok-batch-size>
- <transaction-batch-size>4567</transaction-batch-size>
- <block-on-acknowledge>true</block-on-acknowledge>
- <block-on-non-durable-send>false</block-on-non-durable-send>
- <block-on-durable-send>true</block-on-durable-send>
- <auto-group>false</auto-group>
- <pre-acknowledge>true</pre-acknowledge>
- <connection-ttl>2345</connection-ttl>
- <failover-on-initial-connection>true</failover-on-initial-connection>
- <failover-on-server-shutdown>false</failover-on-server-shutdown>
- <connection-load-balancing-policy-class-name>FooClass</connection-load-balancing-policy-class-name>
- <reconnect-attempts>34</reconnect-attempts>
- <retry-interval>5</retry-interval>
- <retry-interval-multiplier>6.0</retry-interval-multiplier>
- <max-retry-interval>300</max-retry-interval>
- <cache-large-message-client>true</cache-large-message-client>
- </connection-factory>
+ <queue name="fullConfigurationQueue"/>
- <queue name="fullConfigurationQueue">
- <entry name="/fullConfigurationQueue"/>
- <entry name="/queue/fullConfigurationQueue"/>
- </queue>
-
- <topic name="fullConfigurationTopic">
- <entry name="/fullConfigurationTopic"/>
- <entry name="/topic/fullConfigurationTopic"/>
- </topic>
+ <topic name="fullConfigurationTopic"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/integration-tests/src/test/resources/activemq-jms-for-JMSServerDeployerTest2.xml
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/resources/activemq-jms-for-JMSServerDeployerTest2.xml b/tests/integration-tests/src/test/resources/activemq-jms-for-JMSServerDeployerTest2.xml
index 0e59ead..8fb11a9 100644
--- a/tests/integration-tests/src/test/resources/activemq-jms-for-JMSServerDeployerTest2.xml
+++ b/tests/integration-tests/src/test/resources/activemq-jms-for-JMSServerDeployerTest2.xml
@@ -2,52 +2,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq ../../src/schemas/activemq-jms.xsd ">
- <connection-factory name="fullConfigurationConnectionFactory">
- <entries>
- <entry name="/fullConfigurationConnectionFactory"/>
- <entry name="/acme/fullConfigurationConnectionFactory"/>
- <entry name="java:/xyz/tfullConfigurationConnectionFactory"/>
- <entry name="java:/connectionfactories/acme/fullConfigurationConnectionFactory"/>
- </entries>
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <discovery-group-ref discovery-group-name="mygroup"/>
- <client-failure-check-period>1234</client-failure-check-period>
- <call-timeout>5678</call-timeout>
- <consumer-window-size>12345</consumer-window-size>
- <consumer-max-rate>6789</consumer-max-rate>
- <confirmation-window-size>123456</confirmation-window-size>
- <producer-window-size>7712652</producer-window-size>
- <producer-max-rate>789</producer-max-rate>
- <min-large-message-size>12</min-large-message-size>
- <client-id>TestClientID</client-id>
- <dups-ok-batch-size>3456</dups-ok-batch-size>
- <transaction-batch-size>4567</transaction-batch-size>
- <block-on-acknowledge>true</block-on-acknowledge>
- <block-on-non-durable-send>false</block-on-non-durable-send>
- <block-on-durable-send>true</block-on-durable-send>
- <auto-group>false</auto-group>
- <pre-acknowledge>true</pre-acknowledge>
- <connection-ttl>2345</connection-ttl>
- <failover-on-initial-connection>true</failover-on-initial-connection>
- <failover-on-server-shutdown>false</failover-on-server-shutdown>
- <connection-load-balancing-policy-class-name>FooClass</connection-load-balancing-policy-class-name>
- <reconnect-attempts>34</reconnect-attempts>
- <retry-interval>5</retry-interval>
- <retry-interval-multiplier>6.0</retry-interval-multiplier>
- <max-retry-interval>300</max-retry-interval>
- <cache-large-message-client>true</cache-large-message-client>
- </connection-factory>
+ <queue name="fullConfigurationQueue"/>
- <queue name="fullConfigurationQueue">
- <entry name="/fullConfigurationQueue"/>
- <entry name="/queue/fullConfigurationQueue"/>
- </queue>
-
- <topic name="fullConfigurationTopic">
- <entry name="/fullConfigurationTopic"/>
- <entry name="/topic/fullConfigurationTopic"/>
- </topic>
+ <topic name="fullConfigurationTopic"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/integration-tests/src/test/resources/colocated-server-start-stop-jms-config1.xml
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/resources/colocated-server-start-stop-jms-config1.xml b/tests/integration-tests/src/test/resources/colocated-server-start-stop-jms-config1.xml
index b57c8a5..00b7d07 100644
--- a/tests/integration-tests/src/test/resources/colocated-server-start-stop-jms-config1.xml
+++ b/tests/integration-tests/src/test/resources/colocated-server-start-stop-jms-config1.xml
@@ -1,18 +1,7 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
- <queue name="myJMSQueue">
- <entry name="myJMSQueue"/>
- </queue>
+ <queue name="myJMSQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/integration-tests/src/test/resources/colocated-server-start-stop-jms-config2.xml
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/resources/colocated-server-start-stop-jms-config2.xml b/tests/integration-tests/src/test/resources/colocated-server-start-stop-jms-config2.xml
index b57c8a5..00b7d07 100644
--- a/tests/integration-tests/src/test/resources/colocated-server-start-stop-jms-config2.xml
+++ b/tests/integration-tests/src/test/resources/colocated-server-start-stop-jms-config2.xml
@@ -1,18 +1,7 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
- <queue name="myJMSQueue">
- <entry name="myJMSQueue"/>
- </queue>
+ <queue name="myJMSQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/integration-tests/src/test/resources/server-start-stop-jms-config1.xml
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/resources/server-start-stop-jms-config1.xml b/tests/integration-tests/src/test/resources/server-start-stop-jms-config1.xml
index f2fb22c..5987e7e 100644
--- a/tests/integration-tests/src/test/resources/server-start-stop-jms-config1.xml
+++ b/tests/integration-tests/src/test/resources/server-start-stop-jms-config1.xml
@@ -1,18 +1,7 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
- <queue name="myJMSQueue">
- <entry name="myJMSQueue"/>
- </queue>
+ <queue name="myJMSQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/integration-tests/src/test/resources/spring-activemq-jms.xml
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/resources/spring-activemq-jms.xml b/tests/integration-tests/src/test/resources/spring-activemq-jms.xml
index bce97ab..3758989 100644
--- a/tests/integration-tests/src/test/resources/spring-activemq-jms.xml
+++ b/tests/integration-tests/src/test/resources/spring-activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="in-vm"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/integration-tests/src/test/resources/spring-jms-beans.xml
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/resources/spring-jms-beans.xml b/tests/integration-tests/src/test/resources/spring-jms-beans.xml
index 7dee319..38bb944 100644
--- a/tests/integration-tests/src/test/resources/spring-jms-beans.xml
+++ b/tests/integration-tests/src/test/resources/spring-jms-beans.xml
@@ -9,16 +9,29 @@
<property name="jmsConfigResourcePath" value="spring-activemq-jms.xml"/>
</bean>
+ <bean id="connectionFactory" class="org.apache.activemq.jms.client.ActiveMQJMSConnectionFactory">
+ <constructor-arg value="false" />
+ <constructor-arg>
+ <bean class="org.apache.activemq.api.core.TransportConfiguration">
+ <constructor-arg value="org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory" />
+ </bean>
+ </constructor-arg>
+ </bean>
+
+ <bean id="exampleQueue" class="org.apache.activemq.jms.client.ActiveMQQueue">
+ <constructor-arg index="0" value="exampleQueue"/>
+ </bean>
+
<bean id="listener" class="org.apache.activemq.tests.integration.spring.ExampleListener"/>
<bean id="MessageSender" class="org.apache.activemq.tests.integration.spring.MessageSender">
- <property name="connectionFactory" ref="ConnectionFactory"/>
- <property name="destination" ref="/queue/exampleQueue"/>
+ <property name="connectionFactory" ref="connectionFactory"/>
+ <property name="destination" ref="exampleQueue"/>
</bean>
<bean id="listenerContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer">
- <property name="connectionFactory" ref="ConnectionFactory"/>
- <property name="destination" ref="/queue/exampleQueue"/>
+ <property name="connectionFactory" ref="connectionFactory"/>
+ <property name="destination" ref="exampleQueue"/>
<property name="messageListener" ref="listener"/>
</bean>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/jms-tests/pom.xml
----------------------------------------------------------------------
diff --git a/tests/jms-tests/pom.xml b/tests/jms-tests/pom.xml
index e9a6aee..287a0da 100644
--- a/tests/jms-tests/pom.xml
+++ b/tests/jms-tests/pom.xml
@@ -79,10 +79,6 @@
<artifactId>junit</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- </dependency>
- <dependency>
<groupId>apache-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ActiveMQServerTestCase.java
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ActiveMQServerTestCase.java b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ActiveMQServerTestCase.java
index 7bc2a0c..12247ea 100644
--- a/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ActiveMQServerTestCase.java
+++ b/tests/jms-tests/src/test/java/org/apache/activemq/jms/tests/ActiveMQServerTestCase.java
@@ -39,6 +39,7 @@ import java.util.Set;
import com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple;
import org.apache.activemq.api.core.SimpleString;
+import org.apache.activemq.api.jms.JMSFactoryType;
import org.apache.activemq.core.postoffice.Binding;
import org.apache.activemq.core.postoffice.impl.LocalQueueBinding;
import org.apache.activemq.core.security.Role;
@@ -245,6 +246,9 @@ public abstract class ActiveMQServerTestCase
createQueue("Queue2");
createQueue("Queue3");
createQueue("Queue4");
+ deployConnectionFactory(0, JMSFactoryType.CF, "ConnectionFactory", "/ConnectionFactory");
+ deployConnectionFactory(0, JMSFactoryType.TOPIC_CF, "CF_TOPIC", "/CF_TOPIC");
+ deployConnectionFactory(0, JMSFactoryType.XA_CF, "CF_XA_TRUE", "/CF_XA_TRUE");
}
private void lookUp() throws Exception
@@ -276,6 +280,10 @@ public abstract class ActiveMQServerTestCase
destroyQueue("Queue2");
destroyQueue("Queue3");
destroyQueue("Queue4");
+
+ undeployConnectionFactory("ConnectionFactory");
+ undeployConnectionFactory("CF_TOPIC");
+ undeployConnectionFactory("CF_XA_TRUE");
}
@AfterClass
@@ -490,6 +498,11 @@ public abstract class ActiveMQServerTestCase
ActiveMQServerTestCase.servers.get(server).deployConnectionFactory(objectName, jndiBindings);
}
+ public static void deployConnectionFactory(final int server, JMSFactoryType type, final String objectName, final String... jndiBindings) throws Exception
+ {
+ ActiveMQServerTestCase.servers.get(server).deployConnectionFactory(objectName, type, jndiBindings);
+ }
+
public void deployConnectionFactory(final String clientId,
final String objectName,
final int prefetchSize,
@@ -503,6 +516,7 @@ public abstract class ActiveMQServerTestCase
final String... jndiBindings) throws Exception
{
ActiveMQServerTestCase.servers.get(0).deployConnectionFactory(clientId,
+ JMSFactoryType.CF,
objectName,
prefetchSize,
defaultTempQueueFullSize,
[07/13] activemq-6 git commit: ACTIVEMQ6-14 Replace JNDI server with
client impl
Posted by cl...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-grouping/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-grouping/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/clustered-grouping/src/main/resources/hornetq/server1/activemq-jms.xml
index 452b958..847659f 100644
--- a/examples/jms/clustered-grouping/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/clustered-grouping/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-grouping/src/main/resources/hornetq/server2/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-grouping/src/main/resources/hornetq/server2/activemq-jms.xml b/examples/jms/clustered-grouping/src/main/resources/hornetq/server2/activemq-jms.xml
index 452b958..847659f 100644
--- a/examples/jms/clustered-grouping/src/main/resources/hornetq/server2/activemq-jms.xml
+++ b/examples/jms/clustered-grouping/src/main/resources/hornetq/server2/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-jgroups/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-jgroups/pom.xml b/examples/jms/clustered-jgroups/pom.xml
index 1cdaf59..aca8a25 100644
--- a/examples/jms/clustered-jgroups/pom.xml
+++ b/examples/jms/clustered-jgroups/pom.xml
@@ -75,8 +75,8 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ClusteredJgroupsExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
</args>
</configuration>
</execution>
@@ -135,11 +135,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-jgroups/src/main/java/org/apache/activemq/jms/example/ClusteredJgroupsExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-jgroups/src/main/java/org/apache/activemq/jms/example/ClusteredJgroupsExample.java b/examples/jms/clustered-jgroups/src/main/java/org/apache/activemq/jms/example/ClusteredJgroupsExample.java
index d838a5e..24ae554 100644
--- a/examples/jms/clustered-jgroups/src/main/java/org/apache/activemq/jms/example/ClusteredJgroupsExample.java
+++ b/examples/jms/clustered-jgroups/src/main/java/org/apache/activemq/jms/example/ClusteredJgroupsExample.java
@@ -57,16 +57,16 @@ public class ClusteredJgroupsExample extends ActiveMQExample
ic0 = getContext(0);
// Step 2. Look-up the JMS Queue object from JNDI
- Queue queue = (Queue)ic0.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)ic0.lookup("queue/exampleQueue");
// Step 3. Look-up a JMS Connection Factory object from JNDI on server 0
- ConnectionFactory cf0 = (ConnectionFactory)ic0.lookup("/ConnectionFactory");
+ ConnectionFactory cf0 = (ConnectionFactory)ic0.lookup("ConnectionFactory");
// Step 4. Get an initial context for looking up JNDI from server 1
ic1 = getContext(1);
// Step 5. Look-up a JMS Connection Factory object from JNDI on server 1
- ConnectionFactory cf1 = (ConnectionFactory)ic1.lookup("/ConnectionFactory");
+ ConnectionFactory cf1 = (ConnectionFactory)ic1.lookup("ConnectionFactory");
// Step 6. We create a JMS Connection connection0 which is a connection to server 0
connection0 = cf0.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-jgroups/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-jgroups/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/clustered-jgroups/src/main/resources/hornetq/server0/activemq-jms.xml
index 452b958..847659f 100644
--- a/examples/jms/clustered-jgroups/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/clustered-jgroups/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-jgroups/src/main/resources/hornetq/server0/client-jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-jgroups/src/main/resources/hornetq/server0/client-jndi.properties b/examples/jms/clustered-jgroups/src/main/resources/hornetq/server0/client-jndi.properties
index 080524f..6940f75 100644
--- a/examples/jms/clustered-jgroups/src/main/resources/hornetq/server0/client-jndi.properties
+++ b/examples/jms/clustered-jgroups/src/main/resources/hornetq/server0/client-jndi.properties
@@ -1,3 +1,2 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-jgroups/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-jgroups/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/clustered-jgroups/src/main/resources/hornetq/server1/activemq-jms.xml
index 452b958..847659f 100644
--- a/examples/jms/clustered-jgroups/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/clustered-jgroups/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-jgroups/src/main/resources/hornetq/server1/client-jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-jgroups/src/main/resources/hornetq/server1/client-jndi.properties b/examples/jms/clustered-jgroups/src/main/resources/hornetq/server1/client-jndi.properties
index 7bcaf95..7905109 100644
--- a/examples/jms/clustered-jgroups/src/main/resources/hornetq/server1/client-jndi.properties
+++ b/examples/jms/clustered-jgroups/src/main/resources/hornetq/server1/client-jndi.properties
@@ -1,3 +1,2 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:2099
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5446
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-queue/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-queue/pom.xml b/examples/jms/clustered-queue/pom.xml
index 55147fa..dfb3c5a 100644
--- a/examples/jms/clustered-queue/pom.xml
+++ b/examples/jms/clustered-queue/pom.xml
@@ -71,8 +71,8 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ClusteredQueueExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
</args>
</configuration>
</execution>
@@ -131,11 +131,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-queue/src/main/java/org/apache/activemq/jms/example/ClusteredQueueExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-queue/src/main/java/org/apache/activemq/jms/example/ClusteredQueueExample.java b/examples/jms/clustered-queue/src/main/java/org/apache/activemq/jms/example/ClusteredQueueExample.java
index b264886..5c1874d 100644
--- a/examples/jms/clustered-queue/src/main/java/org/apache/activemq/jms/example/ClusteredQueueExample.java
+++ b/examples/jms/clustered-queue/src/main/java/org/apache/activemq/jms/example/ClusteredQueueExample.java
@@ -57,16 +57,16 @@ public class ClusteredQueueExample extends ActiveMQExample
ic0 = getContext(0);
// Step 2. Look-up the JMS Queue object from JNDI
- Queue queue = (Queue)ic0.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)ic0.lookup("queue/exampleQueue");
// Step 3. Look-up a JMS Connection Factory object from JNDI on server 0
- ConnectionFactory cf0 = (ConnectionFactory)ic0.lookup("/ConnectionFactory");
+ ConnectionFactory cf0 = (ConnectionFactory)ic0.lookup("ConnectionFactory");
// Step 4. Get an initial context for looking up JNDI from server 1
ic1 = getContext(1);
// Step 5. Look-up a JMS Connection Factory object from JNDI on server 1
- ConnectionFactory cf1 = (ConnectionFactory)ic1.lookup("/ConnectionFactory");
+ ConnectionFactory cf1 = (ConnectionFactory)ic1.lookup("ConnectionFactory");
// Step 6. We create a JMS Connection connection0 which is a connection to server 0
connection0 = cf0.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-queue/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-queue/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/clustered-queue/src/main/resources/hornetq/server0/activemq-jms.xml
index 452b958..847659f 100644
--- a/examples/jms/clustered-queue/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/clustered-queue/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-queue/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-queue/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/clustered-queue/src/main/resources/hornetq/server1/activemq-jms.xml
index 452b958..847659f 100644
--- a/examples/jms/clustered-queue/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/clustered-queue/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-standalone/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-standalone/pom.xml b/examples/jms/clustered-standalone/pom.xml
index cb5e4b2..427ec71 100644
--- a/examples/jms/clustered-standalone/pom.xml
+++ b/examples/jms/clustered-standalone/pom.xml
@@ -89,9 +89,9 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ClusteredStandaloneExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
- <param>jnp://localhost:1299</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
+ <param>tcp://localhost:5447</param>
</args>
<systemProperties>
<property>
@@ -165,11 +165,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
</plugin>
</plugins>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-standalone/src/main/java/org/apache/activemq/jms/example/ClusteredStandaloneExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-standalone/src/main/java/org/apache/activemq/jms/example/ClusteredStandaloneExample.java b/examples/jms/clustered-standalone/src/main/java/org/apache/activemq/jms/example/ClusteredStandaloneExample.java
index 7196c71..28704ce 100644
--- a/examples/jms/clustered-standalone/src/main/java/org/apache/activemq/jms/example/ClusteredStandaloneExample.java
+++ b/examples/jms/clustered-standalone/src/main/java/org/apache/activemq/jms/example/ClusteredStandaloneExample.java
@@ -79,19 +79,19 @@ public class ClusteredStandaloneExample extends ActiveMQExample
// We create a connection on each node, create a consumer on each connection and send some
// messages at a node and verify they are all received by all consumers
- ConnectionFactory cf0 = (ConnectionFactory)initialContext0.lookup("/ConnectionFactory");
+ ConnectionFactory cf0 = (ConnectionFactory)initialContext0.lookup("ConnectionFactory");
System.out.println("Got cf " + cf0);
- ConnectionFactory cf1 = (ConnectionFactory)initialContext1.lookup("/ConnectionFactory");
+ ConnectionFactory cf1 = (ConnectionFactory)initialContext1.lookup("ConnectionFactory");
System.out.println("Got cf " + cf1);
- ConnectionFactory cf2 = (ConnectionFactory)initialContext2.lookup("/ConnectionFactory");
+ ConnectionFactory cf2 = (ConnectionFactory)initialContext2.lookup("ConnectionFactory");
System.out.println("Got cf " + cf2);
- Topic topic = (Topic)initialContext0.lookup("/topic/ExampleTopic");
+ Topic topic = (Topic)initialContext0.lookup("topic/exampleTopic");
connection0 = cf0.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-standalone/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-standalone/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/clustered-standalone/src/main/resources/hornetq/server0/activemq-jms.xml
index 70a5fd5..845dfe1 100644
--- a/examples/jms/clustered-standalone/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/clustered-standalone/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the topic used by the example-->
- <topic name="exampleTopic">
- <entry name="/topic/ExampleTopic"/>
- </topic>
+ <topic name="exampleTopic"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-standalone/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-standalone/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/clustered-standalone/src/main/resources/hornetq/server1/activemq-jms.xml
index 70a5fd5..212fbd1 100644
--- a/examples/jms/clustered-standalone/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/clustered-standalone/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,19 +1,9 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the topic used by the example-->
- <topic name="exampleTopic">
- <entry name="/topic/ExampleTopic"/>
+ <topic name="exampleTopic"/>
</topic>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-standalone/src/main/resources/hornetq/server2/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-standalone/src/main/resources/hornetq/server2/activemq-jms.xml b/examples/jms/clustered-standalone/src/main/resources/hornetq/server2/activemq-jms.xml
index 70a5fd5..845dfe1 100644
--- a/examples/jms/clustered-standalone/src/main/resources/hornetq/server2/activemq-jms.xml
+++ b/examples/jms/clustered-standalone/src/main/resources/hornetq/server2/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the topic used by the example-->
- <topic name="exampleTopic">
- <entry name="/topic/ExampleTopic"/>
- </topic>
+ <topic name="exampleTopic"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-static-discovery/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-static-discovery/pom.xml b/examples/jms/clustered-static-discovery/pom.xml
index 8ce3ac9..5245a17 100644
--- a/examples/jms/clustered-static-discovery/pom.xml
+++ b/examples/jms/clustered-static-discovery/pom.xml
@@ -83,10 +83,10 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.StaticClusteredQueueExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
- <param>jnp://localhost:1299</param>
- <param>jnp://localhost:1399</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
+ <param>tcp://localhost:5447</param>
+ <param>tcp://localhost:5448</param>
</args>
<systemProperties>
<property>
@@ -169,11 +169,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-static-discovery/src/main/java/org/apache/activemq/jms/example/StaticClusteredQueueExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-static-discovery/src/main/java/org/apache/activemq/jms/example/StaticClusteredQueueExample.java b/examples/jms/clustered-static-discovery/src/main/java/org/apache/activemq/jms/example/StaticClusteredQueueExample.java
index cca25b5..868d611 100644
--- a/examples/jms/clustered-static-discovery/src/main/java/org/apache/activemq/jms/example/StaticClusteredQueueExample.java
+++ b/examples/jms/clustered-static-discovery/src/main/java/org/apache/activemq/jms/example/StaticClusteredQueueExample.java
@@ -61,10 +61,10 @@ public class StaticClusteredQueueExample extends ActiveMQExample
ic0 = getContext(3);
// Step 2. Look-up the JMS Queue object from JNDI
- Queue queue = (Queue)ic0.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)ic0.lookup("queue/exampleQueue");
// Step 3. Look-up a JMS Connection Factory object from JNDI on server 0
- ConnectionFactory cf0 = (ConnectionFactory)ic0.lookup("/ConnectionFactory");
+ ConnectionFactory cf0 = (ConnectionFactory)ic0.lookup("ConnectionFactory");
//grab an initial connection and wait, in reality you wouldn't do it this way but since we want to ensure an
// equal load balance we do this and then create 4 connections round robined
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server0/activemq-jms.xml
index 68d3cce..847659f 100644
--- a/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,31 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server0/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server0/jndi.properties b/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server0/jndi.properties
deleted file mode 100644
index e2a9832..0000000
--- a/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server0/jndi.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server1/activemq-jms.xml
index 68d3cce..847659f 100644
--- a/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,31 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server1/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server1/jndi.properties b/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server1/jndi.properties
deleted file mode 100644
index e2a9832..0000000
--- a/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server1/jndi.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server2/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server2/activemq-jms.xml b/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server2/activemq-jms.xml
index 60569d2..e254e36 100644
--- a/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server2/activemq-jms.xml
+++ b/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server2/activemq-jms.xml
@@ -18,32 +18,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
-
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server2/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server2/jndi.properties b/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server2/jndi.properties
deleted file mode 100644
index dd51418..0000000
--- a/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server2/jndi.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server3/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server3/activemq-jms.xml b/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server3/activemq-jms.xml
index 60569d2..e254e36 100644
--- a/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server3/activemq-jms.xml
+++ b/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server3/activemq-jms.xml
@@ -18,32 +18,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
-
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server3/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server3/jndi.properties b/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server3/jndi.properties
deleted file mode 100644
index e2a9832..0000000
--- a/examples/jms/clustered-static-discovery/src/main/resources/hornetq/server3/jndi.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-static-oneway/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-static-oneway/pom.xml b/examples/jms/clustered-static-oneway/pom.xml
index 652a01f..0722ddf 100644
--- a/examples/jms/clustered-static-oneway/pom.xml
+++ b/examples/jms/clustered-static-oneway/pom.xml
@@ -71,9 +71,9 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ClusterStaticOnewayExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
- <param>jnp://localhost:1299</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
+ <param>tcp://localhost:5447</param>
</args>
<systemProperties>
<property>
@@ -147,11 +147,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-static-oneway/src/main/java/org/apache/activemq/jms/example/ClusterStaticOnewayExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-static-oneway/src/main/java/org/apache/activemq/jms/example/ClusterStaticOnewayExample.java b/examples/jms/clustered-static-oneway/src/main/java/org/apache/activemq/jms/example/ClusterStaticOnewayExample.java
index fee4497..2eab7ae 100644
--- a/examples/jms/clustered-static-oneway/src/main/java/org/apache/activemq/jms/example/ClusterStaticOnewayExample.java
+++ b/examples/jms/clustered-static-oneway/src/main/java/org/apache/activemq/jms/example/ClusterStaticOnewayExample.java
@@ -59,10 +59,10 @@ public class ClusterStaticOnewayExample extends ActiveMQExample
ic0 = getContext(0);
// Step 2. Look-up the JMS Queue object from JNDI
- Queue queue = (Queue)ic0.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)ic0.lookup("queue/exampleQueue");
// Step 3. Look-up a JMS Connection Factory object from JNDI on server 0
- ConnectionFactory cf0 = (ConnectionFactory)ic0.lookup("/ConnectionFactory");
+ ConnectionFactory cf0 = (ConnectionFactory)ic0.lookup("ConnectionFactory");
//step 4. grab an initial connection and wait, in reality you wouldn't do it this way but since we want to ensure an
// equal load balance we do this and then create 4 connections round robined
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server0/activemq-jms.xml
index 68d3cce..847659f 100644
--- a/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,31 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server0/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server0/jndi.properties b/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server0/jndi.properties
deleted file mode 100644
index e2a9832..0000000
--- a/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server0/jndi.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server1/activemq-jms.xml
index 68d3cce..847659f 100644
--- a/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,31 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server1/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server1/jndi.properties b/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server1/jndi.properties
deleted file mode 100644
index e2a9832..0000000
--- a/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server1/jndi.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server2/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server2/activemq-jms.xml b/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server2/activemq-jms.xml
index 60569d2..e254e36 100644
--- a/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server2/activemq-jms.xml
+++ b/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server2/activemq-jms.xml
@@ -18,32 +18,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
-
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server2/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server2/jndi.properties b/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server2/jndi.properties
deleted file mode 100644
index 045c093..0000000
--- a/examples/jms/clustered-static-oneway/src/main/resources/hornetq/server2/jndi.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-topic/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-topic/pom.xml b/examples/jms/clustered-topic/pom.xml
index 9c68f4b..18d9fb5 100644
--- a/examples/jms/clustered-topic/pom.xml
+++ b/examples/jms/clustered-topic/pom.xml
@@ -79,8 +79,8 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ClusteredTopicExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
</args>
<systemProperties>
<property>
@@ -145,11 +145,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-topic/src/main/java/org/apache/activemq/jms/example/ClusteredTopicExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-topic/src/main/java/org/apache/activemq/jms/example/ClusteredTopicExample.java b/examples/jms/clustered-topic/src/main/java/org/apache/activemq/jms/example/ClusteredTopicExample.java
index e5a6028..eb51603 100644
--- a/examples/jms/clustered-topic/src/main/java/org/apache/activemq/jms/example/ClusteredTopicExample.java
+++ b/examples/jms/clustered-topic/src/main/java/org/apache/activemq/jms/example/ClusteredTopicExample.java
@@ -57,16 +57,16 @@ public class ClusteredTopicExample extends ActiveMQExample
ic0 = getContext(0);
// Step 2. Look-up the JMS Topic object from JNDI
- Topic topic = (Topic)ic0.lookup("/topic/exampleTopic");
+ Topic topic = (Topic)ic0.lookup("topic/exampleTopic");
// Step 3. Look-up a JMS Connection Factory object from JNDI on server 0
- ConnectionFactory cf0 = (ConnectionFactory)ic0.lookup("/ConnectionFactory");
+ ConnectionFactory cf0 = (ConnectionFactory)ic0.lookup("ConnectionFactory");
// Step 4. Get an initial context for looking up JNDI from server 1
ic1 = getContext(1);
// Step 5. Look-up a JMS Connection Factory object from JNDI on server 1
- ConnectionFactory cf1 = (ConnectionFactory)ic1.lookup("/ConnectionFactory");
+ ConnectionFactory cf1 = (ConnectionFactory)ic1.lookup("ConnectionFactory");
// Step 6. We create a JMS Connection connection0 which is a connection to server 0
connection0 = cf0.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-topic/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-topic/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/clustered-topic/src/main/resources/hornetq/server0/activemq-jms.xml
index 1dd09a6..ab4841d 100644
--- a/examples/jms/clustered-topic/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/clustered-topic/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the topic used by the example-->
- <topic name="exampleTopic">
- <entry name="/topic/exampleTopic"/>
- </topic>
+ <topic name="exampleTopic"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-topic/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-topic/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/clustered-topic/src/main/resources/hornetq/server1/activemq-jms.xml
index 1dd09a6..ab4841d 100644
--- a/examples/jms/clustered-topic/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/clustered-topic/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the topic used by the example-->
- <topic name="exampleTopic">
- <entry name="/topic/exampleTopic"/>
- </topic>
+ <topic name="exampleTopic"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/colocated-failover-scale-down/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/colocated-failover-scale-down/pom.xml b/examples/jms/colocated-failover-scale-down/pom.xml
index fccdaed..f128ea7 100644
--- a/examples/jms/colocated-failover-scale-down/pom.xml
+++ b/examples/jms/colocated-failover-scale-down/pom.xml
@@ -71,8 +71,8 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ColocatedFailoverScaleDownExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
</args>
<systemProperties>
<property>
@@ -137,11 +137,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/colocated-failover-scale-down/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverScaleDownExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/colocated-failover-scale-down/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverScaleDownExample.java b/examples/jms/colocated-failover-scale-down/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverScaleDownExample.java
index 73609af..b65279b 100644
--- a/examples/jms/colocated-failover-scale-down/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverScaleDownExample.java
+++ b/examples/jms/colocated-failover-scale-down/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverScaleDownExample.java
@@ -58,9 +58,9 @@ public class ColocatedFailoverScaleDownExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Look up the JMS resources from JNDI
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
- ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
- ConnectionFactory connectionFactory1 = (ConnectionFactory)initialContext1.lookup("/ConnectionFactory");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
+ ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
+ ConnectionFactory connectionFactory1 = (ConnectionFactory)initialContext1.lookup("ConnectionFactory");
// Step 3. Create a JMS Connections
connection = connectionFactory.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/colocated-failover-scale-down/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/colocated-failover-scale-down/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/colocated-failover-scale-down/src/main/resources/hornetq/server0/activemq-jms.xml
index 2bf8233..847659f 100644
--- a/examples/jms/colocated-failover-scale-down/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/colocated-failover-scale-down/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,30 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/colocated-failover-scale-down/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/colocated-failover-scale-down/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/colocated-failover-scale-down/src/main/resources/hornetq/server1/activemq-jms.xml
index 2bf8233..847659f 100644
--- a/examples/jms/colocated-failover-scale-down/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/colocated-failover-scale-down/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,30 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/colocated-failover/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/colocated-failover/pom.xml b/examples/jms/colocated-failover/pom.xml
index 4d63b88..290ed90 100644
--- a/examples/jms/colocated-failover/pom.xml
+++ b/examples/jms/colocated-failover/pom.xml
@@ -71,8 +71,8 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ColocatedFailoverExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
+ <param>tcp://localhost:1099</param>
+ <param>tcp://localhost:1199</param>
</args>
<systemProperties>
<property>
@@ -137,11 +137,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/colocated-failover/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/colocated-failover/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverExample.java b/examples/jms/colocated-failover/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverExample.java
index 533d248..29d57a6 100644
--- a/examples/jms/colocated-failover/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverExample.java
+++ b/examples/jms/colocated-failover/src/main/java/org/apache/activemq/jms/example/ColocatedFailoverExample.java
@@ -56,9 +56,9 @@ public class ColocatedFailoverExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Look up the JMS resources from JNDI
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
- ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
- ConnectionFactory connectionFactory1 = (ConnectionFactory)initialContext1.lookup("/ConnectionFactory");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
+ ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
+ ConnectionFactory connectionFactory1 = (ConnectionFactory)initialContext1.lookup("ConnectionFactory");
// Step 3. Create a JMS Connections
connection = connectionFactory.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/colocated-failover/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/colocated-failover/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/colocated-failover/src/main/resources/hornetq/server0/activemq-jms.xml
index 2bf8233..847659f 100644
--- a/examples/jms/colocated-failover/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/colocated-failover/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,30 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/colocated-failover/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/colocated-failover/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/colocated-failover/src/main/resources/hornetq/server1/activemq-jms.xml
index 2bf8233..0a77a3f 100644
--- a/examples/jms/colocated-failover/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/colocated-failover/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,30 +1,7 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
-
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/consumer-rate-limit/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/consumer-rate-limit/pom.xml b/examples/jms/consumer-rate-limit/pom.xml
index aa15902..2b95571 100644
--- a/examples/jms/consumer-rate-limit/pom.xml
+++ b/examples/jms/consumer-rate-limit/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ConsumerRateLimitExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/consumer-rate-limit/src/main/java/org/apache/activemq/jms/example/ConsumerRateLimitExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/consumer-rate-limit/src/main/java/org/apache/activemq/jms/example/ConsumerRateLimitExample.java b/examples/jms/consumer-rate-limit/src/main/java/org/apache/activemq/jms/example/ConsumerRateLimitExample.java
index 61fdd77..5bb9da8 100644
--- a/examples/jms/consumer-rate-limit/src/main/java/org/apache/activemq/jms/example/ConsumerRateLimitExample.java
+++ b/examples/jms/consumer-rate-limit/src/main/java/org/apache/activemq/jms/example/ConsumerRateLimitExample.java
@@ -51,10 +51,10 @@ public class ConsumerRateLimitExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perfom a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. Create a JMS Connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/consumer-rate-limit/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/consumer-rate-limit/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/consumer-rate-limit/src/main/resources/hornetq/server0/activemq-jms.xml
index ad3d3e0..0d5c953 100644
--- a/examples/jms/consumer-rate-limit/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/consumer-rate-limit/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,24 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <!-- We limit consumers created on this connection factory to consume messages at a maximum rate
- of 10 messages per sec -->
- <consumer-max-rate>10</consumer-max-rate>
-
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/consumer-rate-limit/src/main/resources/hornetq/server0/client-jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/consumer-rate-limit/src/main/resources/hornetq/server0/client-jndi.properties b/examples/jms/consumer-rate-limit/src/main/resources/hornetq/server0/client-jndi.properties
index 080524f..6940f75 100644
--- a/examples/jms/consumer-rate-limit/src/main/resources/hornetq/server0/client-jndi.properties
+++ b/examples/jms/consumer-rate-limit/src/main/resources/hornetq/server0/client-jndi.properties
@@ -1,3 +1,2 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/dead-letter/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/dead-letter/pom.xml b/examples/jms/dead-letter/pom.xml
index ad0315b..6f7ebc8 100644
--- a/examples/jms/dead-letter/pom.xml
+++ b/examples/jms/dead-letter/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.DeadLetterExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/dead-letter/src/main/java/org/apache/activemq/jms/example/DeadLetterExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/dead-letter/src/main/java/org/apache/activemq/jms/example/DeadLetterExample.java b/examples/jms/dead-letter/src/main/java/org/apache/activemq/jms/example/DeadLetterExample.java
index 04c2482..1768955 100644
--- a/examples/jms/dead-letter/src/main/java/org/apache/activemq/jms/example/DeadLetterExample.java
+++ b/examples/jms/dead-letter/src/main/java/org/apache/activemq/jms/example/DeadLetterExample.java
@@ -52,10 +52,10 @@ public class DeadLetterExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perfom a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4.Create a JMS Connection
connection = cf.createConnection();
@@ -108,7 +108,7 @@ public class DeadLetterExample extends ActiveMQExample
// We will now consume the message from the dead letter queue
// Step 17. Perform a lookup on the dead letter queue
- Queue deadLetterQueue = (Queue)initialContext.lookup("/queue/deadLetterQueue");
+ Queue deadLetterQueue = (Queue)initialContext.lookup("queue/deadLetterQueue");
// Step 18. Create a JMS Message Consumer for the dead letter queue
MessageConsumer deadLetterConsumer = session.createConsumer(deadLetterQueue);
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/dead-letter/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/dead-letter/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/dead-letter/src/main/resources/hornetq/server0/activemq-jms.xml
index e3ad631..8fa2fbb 100644
--- a/examples/jms/dead-letter/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/dead-letter/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,24 +1,11 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
<!-- the dead letter queue where dead messages will be sent-->
- <queue name="deadLetterQueue">
- <entry name="/queue/deadLetterQueue"/>
- </queue>
+ <queue name="deadLetterQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/dead-letter/src/main/resources/hornetq/server0/client-jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/dead-letter/src/main/resources/hornetq/server0/client-jndi.properties b/examples/jms/dead-letter/src/main/resources/hornetq/server0/client-jndi.properties
index 080524f..6940f75 100644
--- a/examples/jms/dead-letter/src/main/resources/hornetq/server0/client-jndi.properties
+++ b/examples/jms/dead-letter/src/main/resources/hornetq/server0/client-jndi.properties
@@ -1,3 +1,2 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/delayed-redelivery/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/delayed-redelivery/pom.xml b/examples/jms/delayed-redelivery/pom.xml
index 17d18c0..db25002 100644
--- a/examples/jms/delayed-redelivery/pom.xml
+++ b/examples/jms/delayed-redelivery/pom.xml
@@ -44,7 +44,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.DelayedRedeliveryExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -91,11 +91,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/delayed-redelivery/src/main/java/org/apache/activemq/jms/example/DelayedRedeliveryExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/delayed-redelivery/src/main/java/org/apache/activemq/jms/example/DelayedRedeliveryExample.java b/examples/jms/delayed-redelivery/src/main/java/org/apache/activemq/jms/example/DelayedRedeliveryExample.java
index a80c31f..4bfc1ca 100644
--- a/examples/jms/delayed-redelivery/src/main/java/org/apache/activemq/jms/example/DelayedRedeliveryExample.java
+++ b/examples/jms/delayed-redelivery/src/main/java/org/apache/activemq/jms/example/DelayedRedeliveryExample.java
@@ -55,10 +55,10 @@ public class DelayedRedeliveryExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perform a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. Create a JMS Connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/delayed-redelivery/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/delayed-redelivery/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/delayed-redelivery/src/main/resources/hornetq/server0/activemq-jms.xml
index e3ad631..8fa2fbb 100644
--- a/examples/jms/delayed-redelivery/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/delayed-redelivery/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,24 +1,11 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
<!-- the dead letter queue where dead messages will be sent-->
- <queue name="deadLetterQueue">
- <entry name="/queue/deadLetterQueue"/>
- </queue>
+ <queue name="deadLetterQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/delayed-redelivery/src/main/resources/hornetq/server0/client-jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/delayed-redelivery/src/main/resources/hornetq/server0/client-jndi.properties b/examples/jms/delayed-redelivery/src/main/resources/hornetq/server0/client-jndi.properties
index 080524f..6940f75 100644
--- a/examples/jms/delayed-redelivery/src/main/resources/hornetq/server0/client-jndi.properties
+++ b/examples/jms/delayed-redelivery/src/main/resources/hornetq/server0/client-jndi.properties
@@ -1,3 +1,2 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/divert/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/divert/pom.xml b/examples/jms/divert/pom.xml
index 011e7c9..d987365 100644
--- a/examples/jms/divert/pom.xml
+++ b/examples/jms/divert/pom.xml
@@ -64,8 +64,8 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.DivertExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
</args>
<systemProperties>
<property>
@@ -130,11 +130,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
[08/13] activemq-6 git commit: ACTIVEMQ6-14 Replace JNDI server with
client impl
Posted by cl...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/docs/user-manual/en/using-jms.xml
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/using-jms.xml b/docs/user-manual/en/using-jms.xml
index 40be7b7..fdf0729 100644
--- a/docs/user-manual/en/using-jms.xml
+++ b/docs/user-manual/en/using-jms.xml
@@ -49,210 +49,262 @@
server JMS configuration so it is created automatically without us having to explicitly
create it from the client.</para>
</section>
- <section id="using-jms.server.configuration">
- <title>JMS Server Configuration</title>
- <para>The file <literal>activemq-jms.xml</literal> on the server classpath contains any JMS
- Queue, Topic and ConnectionFactory instances that we wish to create and make available
- to lookup via the JNDI.</para>
- <para>A JMS ConnectionFactory object is used by the client to make connections to the
- server. It knows the location of the server it is connecting to, as well as many other
- configuration parameters. In most cases the defaults will be acceptable.</para>
- <para>We'll deploy a single JMS Queue and a single JMS Connection Factory instance on the
- server for this example but there are no limits to the number of Queues, Topics and
- Connection Factory instances you can deploy from the file. Here's our
- configuration:</para>
- <programlisting>
-<configuration xmlns="urn:activemq"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:activemq ../schemas/activemq-jms.xsd ">
-
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <queue name="OrderQueue">
- <entry name="queues/OrderQueue"/>
- </queue>
-</configuration></programlisting>
- <para>We deploy one ConnectionFactory called <literal>ConnectionFactory</literal> and bind
- it in just one place in JNDI as given by the <literal>entry</literal> element.
- ConnectionFactory instances can be bound in many places in JNDI if you require. </para>
+ <section id="using-jms.jndi.configuration">
+ <title>JNDI Configuration</title>
+ <para>The JMS specification establishes the convention that <emphasis>administered
+ objects</emphasis> (i.e. JMS queue, topic and connection factory instances) are made
+ available via the JNDI API. Brokers are free to implement JNDI as they see fit assuming
+ the implementation fits the API. ActiveMQ does not have a JNDI server. Rather, it uses a
+ client-side JNDI implementation that relies on special properties set in the environment
+ to construct the appropriate JMS objects. In other words, no objects are stored in JNDI
+ on the ActiveMQ server. There are simply instantiated on the client based on the provided
+ configuration. Let's look at the different kinds of administered objects and how to configure
+ them.</para>
<note>
- <para>The JMS connection factory references a <literal>connector</literal> called
- <literal>netty</literal>. This is a reference to a connector object deployed in
- the main core configuration file <literal>activemq-configuration.xml</literal> which
- defines the transport and parameters used to actually connect to the server.</para>
+ <para>The following configuration properties <emphasis>are strictly required when ActiveMQ
+ is running in stand-alone mode</emphasis>. When ActiveMQ is integrated to an application
+ server (e.g. Wildfly) the application server itself will almost certainly provide a JNDI
+ client with its own properties.</para>
</note>
- </section>
- <section id="using-jms.configure.factory.types">
- <title>Connection Factory Types</title>
- <para>The JMS API doc provides several connection factories for applications. ActiveMQ JMS users
- can choose to configure the types for their connection factories. Each connection factory
- has a <literal>signature</literal> attribute and a <literal>xa</literal> parameter, the
- combination of which determines the type of the factory. Attribute <literal>signature</literal>
- has three possible string values, i.e. <emphasis>generic</emphasis>,
- <emphasis>queue</emphasis> and <emphasis>topic</emphasis>; <literal>xa</literal> is a boolean
- type parameter. The following table gives their configuration values for different
- connection factory interfaces.</para>
- <table frame="topbot" id="using-jms.table.configure.factory.types">
+ <section>
+ <title>ConnectionFactory JNDI</title>
+ <para>A JMS connection factory is used by the client to make connections to the server.
+ It knows the location of the server it is connecting to, as well as many other
+ configuration parameters.</para>
+ <para>By default, a <literal>javax.naming.Context</literal> instance created using the
+ <literal>org.apache.activemq.jndi.ActiveMQInitialContextFactory</literal> will automatically
+ have the following connection factories available for lookup:</para>
+ <itemizedlist>
+ <listitem>
+ <para><literal>ConnectionFactory</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>XAConnectionFactory</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>QueueConnectionFactory</literal></para>
+ </listitem>
+ <listitem>
+ <para><literal>TopicConnectionFactory</literal></para>
+ </listitem>
+ </itemizedlist>
+ <para>Here's a simple example of the JNDI context environment for a client looking up a connection factory
+ to access an <emphasis>embedded</emphasis> instance of ActiveMQ:</para>
+ <programlisting>
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory</programlisting>
+ <para>It's really as simple as that. As noted previously, any JNDI context created with the
+ <literal>ActiveMQInitialContextFactory</literal> will have a set of default connection factories
+ available. Therefore, only the <literal>java.naming.factory.initial</literal> property is required
+ to access an embedded broker.</para>
+ <para>In certain situations there could be multiple server instances running within a particular JVM. In
+ that situation each server would typically have an InVM acceptor with a unique server-ID. A client
+ using JMS and JNDI can account for this by specifying a
+ <literal>javax.naming.Context.PROVIDER_URL</literal> (<literal>String</literal> value of
+ "java.naming.provider.url") in the JNDI environment like <literal>vm://2</literal> where
+ <literal>2</literal> is the server-ID for acceptor.</para>
+ <para>Here is a list of all the supported URL schemes:</para>
+ <itemizedlist>
+ <listitem><para><literal>vm</literal></para></listitem>
+ <listitem><para><literal>tcp</literal></para></listitem>
+ <listitem><para><literal>udp</literal></para></listitem>
+ <listitem><para><literal>jgroups</literal></para></listitem>
+ </itemizedlist>
+ <para>Most clients won't be connecting to an embedded broker. Clients will most commonly connect
+ across a network a remote broker. In that case the client can use the
+ <literal>javax.naming.Context.PROVIDER_URL</literal> (<literal>String</literal> value of
+ "java.naming.provider.url") in the JNDI environment to specify where to connect. Here's a simple
+ example of a client configuring a connection factory to connect to a remote broker running on
+ myhost:5445:</para>
+ <programlisting>
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://myhost:5445</programlisting>
+ <para>In the example above the client is using the <literal>tcp</literal> scheme for the provider URL.
+ A client may also specify multiple comma-delimited host:port combinations in the URL (e.g.
+ <literal>tcp://remote-host1:5445,remote-host2:5445</literal>). Whether there is one or many
+ host:port combinations in the URL they are treated as the <emphasis>initial connector(s)</emphasis>
+ for the underlying connection.</para>
+ <para>The <literal>udp</literal> scheme is also supported which should use an host:port combination that
+ matches the <literal>group-address</literal> and <literal>group-port</literal> from the corresponding
+ <literal>broadcast-group</literal> configured on the ActiveMQ server(s).</para>
+ <para>Each scheme has a specific set of properties which can be set using the traditional URL query string
+ format (e.g. <literal>scheme://host:port?key1=value1&key2=value2</literal>) to customize the underlying
+ transport mechanism. For example, if a client wanted to connect to a remote server using TCP and SSL
+ it would use a <literal>Context.PROVIDER_URL</literal> of
+ <literal>tcp://remote-host:5445?ssl-enabled=true</literal>.</para>
+ <para>All the properties available for the <literal>tcp</literal> scheme are described in
+ <link linkend="configuring-transports.netty">the documentation regarding the Netty transport</link>.</para>
+ <para>The <literal>udp</literal> scheme supports 4 properties:</para>
+ <itemizedlist>
+ <listitem>
+ <para><literal>local-address</literal> - If you are running with multiple network interfaces on the same
+ machine, you may want to specify that the discovery group listens only only a specific interface. To
+ do this you can specify the interface address with this parameter.</para>
+ </listitem>
+ <listitem>
+ <para><literal>local-port</literal> - If you want to specify a local port to which the datagram socket is
+ bound you can specify it here. Normally you would just use the default value of -1 which signifies
+ that an anonymous port should be used. This parameter is always specified in conjunction with
+ <literal>local-address</literal>.</para>
+ </listitem>
+ <listitem>
+ <para><literal>refresh-timeout</literal> - This is the period the discovery group waits after receiving
+ the last broadcast from a particular server before removing that servers connector pair entry from its
+ list. You would normally set this to a value significantly higher than the broadcast-period on the
+ broadcast group otherwise servers might intermittently disappear from the list even though they are
+ still broadcasting due to slight differences in timing. This parameter is optional, the default value
+ is 10000 milliseconds (10 seconds).</para>
+ </listitem>
+ <listitem>
+ <para><literal>discovery-initial-wait-timeout</literal> - If the connection factory is used immediately
+ after creation then it may not have had enough time to received broadcasts from all the nodes in the
+ cluster. On first usage, the connection factory will make sure it waits this long since creation
+ before creating the first connection. The default value for this parameter is 10000 milliseconds.</para>
+ </listitem>
+ </itemizedlist>
+ <para>Lastly, the <literal>jgroups</literal> scheme is supported which provides an alternative to the
+ <literal>udp</literal> scheme for server discovery. The URL pattern is as follows
+ <literal>jgroups://<jgroups-xml-conf-filename></literal> where
+ <literal><jgroups-xml-conf-filename></literal> refers to an XML file on the classpath that contains
+ the JGroups configuration.</para>
+ <para>The <literal>refresh-timeout</literal> and <literal>discovery-initial-wait-timeout</literal> properties
+ are supported just like with <literal>udp</literal>.</para>
+ <para>Although a <literal>javax.naming.Context</literal> instance created using the
+ <literal>org.apache.activemq.jndi.ActiveMQInitialContextFactory</literal> will automatically
+ have some connection factories present, it is possible for a client to specify its own connection
+ factories. This is done using the
+ <literal>org.apache.activemq.jndi.ActiveMQInitialContextFactory.CONNECTION_FACTORY_NAMES</literal>
+ property (String value of "connectionFactoryNames"). The value for this property is a comma delimited
+ String of all the connection factories the client wishes to create. For example:</para>
+ <programlisting>
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
+connectionFactoryNames=myConnectionFactory</programlisting>
+ <para>In this example, the client is creating a connection factory named "myConnectionFactory." This
+ replaces all the default connection factories so that only the "myConnectionFactory" connection factory
+ is available to the client.</para>
+ <para>Aside from the underlying transport, the underlying connection factory implementation can also be
+ configured using special properties. To configure a particular connection factory the client would
+ follow this pattern for the property name to set in the environment:
+ <literal>connection.<connection-factory-name>.<property-name></literal>. For example, if the
+ client wanted to customize the default connection factory "ConnectionFactory" to support
+ high-availability then it would do this:</para>
+ <programlisting>
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://myhost:5445
+connection.ConnectionFactory.ha=true</programlisting>
+ <para>Any property available on the underlying
+ <literal>org.apache.activemq.jms.client.ActiveMQConnectionFactory</literal> can be set this way in
+ addition to the <literal>ha</literal> (boolean) and <literal>type</literal> (String) properties. Here
+ are the different options for the <literal>type</literal>:</para>
+ <table frame="topbot" id="using-jms.table.configure.factory.types">
<title>Configuration for Connection Factory Types</title>
<tgroup cols="3">
- <colspec colname="signature" colnum="1"/>
- <colspec colname="xa" colnum="2"/>
- <colspec colname="cftype" colnum="3"/>
+ <colspec colname="cftype" colnum="1"/>
+ <colspec colname="interface" colnum="2"/>
<thead>
<row>
- <entry>signature</entry>
- <entry>xa</entry>
- <entry>Connection Factory Type</entry>
+ <entry>type</entry>
+ <entry>interface</entry>
</row>
</thead>
<tbody>
<row>
- <entry>generic (default)</entry>
- <entry>false (default)</entry>
+ <entry>CF (default)</entry>
<entry>javax.jms.ConnectionFactory</entry>
</row>
<row>
- <entry>generic</entry>
- <entry>true</entry>
+ <entry>XA_CF</entry>
<entry>javax.jms.XAConnectionFactory</entry>
</row>
<row>
- <entry>queue</entry>
- <entry>false</entry>
+ <entry>QUEUE_CF</entry>
<entry>javax.jms.QueueConnectionFactory</entry>
</row>
<row>
- <entry>queue</entry>
- <entry>true</entry>
+ <entry>QUEUE_XA_CF</entry>
<entry>javax.jms.XAQueueConnectionFactory</entry>
</row>
<row>
- <entry>topic</entry>
- <entry>false</entry>
+ <entry>TOPIC_CF</entry>
<entry>javax.jms.TopicConnectionFactory</entry>
</row>
<row>
- <entry>topic</entry>
- <entry>true</entry>
+ <entry>TOPIC_XA_CF</entry>
<entry>javax.jms.XATopicConnectionFactory</entry>
</row>
</tbody>
</tgroup>
</table>
- <para>As an example, the following configures an XAQueueConnectionFactory:</para>
- <programlisting>
-<configuration xmlns="urn:activemq"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:activemq ../schemas/activemq-jms.xsd ">
-
- <connection-factory name="ConnectionFactory" signature="queue">
- <xa>true</xa>
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
-</configuration></programlisting>
-
- </section>
- <section>
- <title>JNDI configuration</title>
- <para>When using JNDI from the client side you need to specify a set of JNDI properties
- which tell the JNDI client where to locate the JNDI server, amongst other things. These
- are often specified in a file called <literal>jndi.properties</literal> on the client
- classpath, or you can specify them directly when creating the JNDI initial context. A
- full JNDI tutorial is outside the scope of this document, please see the <ulink
- url="http://docs.oracle.com/javase/jndi/tutorial">Sun JNDI tutorial</ulink>
- for more information on how to use JNDI.</para>
- <para>For talking to the JBoss JNDI Server, the jndi properties will look something like
- this:</para>
- <programlisting>
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://myhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces</programlisting>
- <para>Where <literal>myhost</literal> is the hostname or IP address of the JNDI server. 1099
- is the port used by the JNDI server and may vary depending on how you have configured
- your JNDI server.</para>
- <para>In the default standalone configuration, JNDI server ports are configured in the file
- <literal>activemq-beans.xml</literal> by setting properties on the <literal
- >JNDIServer</literal> bean:</para>
- <programlisting>
-<bean name="StandaloneServer" class="org.apache.activemq.jms.server.impl.StandaloneNamingServer">
- <constructor>
- <parameter>
- <inject bean="ActiveMQServer"/>
- </parameter>
- </constructor>
- <property name="port">${jnp.port:1099}</property>
- <property name="bindAddress">${jnp.host:localhost}</property>
- <property name="rmiPort">${jnp.rmiPort:1098}</property>
- <property name="rmiBindAddress">${jnp.host:localhost}</property>
-</bean></programlisting>
- <note>
- <para>If you want your JNDI server to be available to non local clients make sure you
- change its bind address to something other than <literal
- >localhost</literal>!</para>
- </note>
- <note>
- <para>The JNDIServer bean must be defined <emphasis>only when ActiveMQ is running in
- stand-alone mode</emphasis>. When ActiveMQ is integrated to JBoss Application
- Server, JBoss AS will provide a ready-to-use JNDI server without any additional
- configuration.</para>
- </note>
- </section>
- <section>
- <title>The code</title>
- <para>Here's the code for the example:</para>
- <para>First we'll create a JNDI initial context from which to lookup our JMS objects:</para>
- <programlisting>InitialContext ic = new InitialContext();</programlisting>
- <para>Now we'll look up the connection factory:</para>
- <programlisting>ConnectionFactory cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");</programlisting>
- <para>And look up the Queue:</para>
- <programlisting>Queue orderQueue = (Queue)ic.lookup("/queues/OrderQueue");</programlisting>
- <para>Next we create a JMS connection using the connection factory:</para>
- <programlisting>Connection connection = cf.createConnection();</programlisting>
- <para>And we create a non transacted JMS Session, with AUTO_ACKNOWLEDGE acknowledge
- mode:</para>
- <programlisting>Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);</programlisting>
- <para>We create a MessageProducer that will send orders to the queue:</para>
- <programlisting>MessageProducer producer = session.createProducer(orderQueue);</programlisting>
- <para>And we create a MessageConsumer which will consume orders from the queue:</para>
- <programlisting>MessageConsumer consumer = session.createConsumer(orderQueue);</programlisting>
- <para>We make sure we start the connection, or delivery won't occur on it:</para>
- <programlisting>connection.start();</programlisting>
- <para>We create a simple TextMessage and send it:</para>
- <programlisting>TextMessage message = session.createTextMessage("This is an order");
+ </section>
+ <section>
+ <title>Destination JNDI</title>
+ <para>JMS destinations are also typically looked up via JNDI. As with connection factories, destinations can
+ be configured using special properties in the JNDI context environment. The property
+ <emphasis>name</emphasis> should follow the pattern: <literal>queue.<jndi-binding></literal> or
+ <literal>topic.<jndi-binding></literal>. The property <emphasis>value</emphasis> should be the name
+ of the queue hosted by the ActiveMQ server. For example, if the server had a JMS queue configured like
+ so:</para>
+ <programlisting>
+<queue name="OrderQueue"/></programlisting>
+ <para>And if the client wanted to bind this queue to "queues/OrderQueue" then the JNDI properties would be
+ configured like so:</para>
+ <programlisting>
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://myhost:5445
+queue.queues/OrderQueue=OrderQueue</programlisting>
+ <para>It is also possible to look-up JMS destinations which haven't been configured explicitly in the JNDI
+ context environment. This is possible using <literal>dynamicQueues/</literal> or
+ <literal>dynamicTopics/</literal> in the look-up string. For example, if the client wanted to look-up the
+ aforementioned "OrderQueue" it could do so simply by using the string "dynamicQueues/OrderQueue". Note,
+ the text that follows <literal>dynamicQueues/</literal> or <literal>dynamicTopics/</literal> must
+ correspond <emphasis>exactly</emphasis> to the name of the destination on the server.</para>
+ </section>
+ <section>
+ <title>The code</title>
+ <para>Here's the code for the example:</para>
+ <para>First we'll create a JNDI initial context from which to lookup our JMS objects. If the above
+ properties are set in <literal>jndi.properties</literal> and it is on the classpath then any new, empty
+ <literal>InitialContext</literal> will be initialized using those properties:</para>
+ <programlisting>InitialContext ic = new InitialContext();</programlisting>
+ <para>Now we'll look up the connection factory from which we can create connections to myhost:5445:</para>
+ <programlisting>ConnectionFactory cf = (ConnectionFactory)ic.lookup("ConnectionFactory");</programlisting>
+ <para>And look up the Queue:</para>
+ <programlisting>Queue orderQueue = (Queue)ic.lookup("queues/OrderQueue");</programlisting>
+ <para>Next we create a JMS connection using the connection factory:</para>
+ <programlisting>Connection connection = cf.createConnection();</programlisting>
+ <para>And we create a non transacted JMS Session, with AUTO_ACKNOWLEDGE acknowledge
+ mode:</para>
+ <programlisting>Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);</programlisting>
+ <para>We create a MessageProducer that will send orders to the queue:</para>
+ <programlisting>MessageProducer producer = session.createProducer(orderQueue);</programlisting>
+ <para>And we create a MessageConsumer which will consume orders from the queue:</para>
+ <programlisting>MessageConsumer consumer = session.createConsumer(orderQueue);</programlisting>
+ <para>We make sure we start the connection, or delivery won't occur on it:</para>
+ <programlisting>connection.start();</programlisting>
+ <para>We create a simple TextMessage and send it:</para>
+ <programlisting>TextMessage message = session.createTextMessage("This is an order");
producer.send(message);</programlisting>
- <para>And we consume the message:</para>
- <programlisting>TextMessage receivedMessage = (TextMessage)consumer.receive();
+ <para>And we consume the message:</para>
+ <programlisting>TextMessage receivedMessage = (TextMessage)consumer.receive();
System.out.println("Got order: " + receivedMessage.getText());</programlisting>
- <para>It is as simple as that. For a wide range of working JMS examples please see the
- examples directory in the distribution.</para>
- <warning>
- <para>Please note that JMS connections, sessions, producers and consumers are
- <emphasis>designed to be re-used</emphasis>.</para>
- <para>It is an anti-pattern to create new connections, sessions, producers and consumers
- for each message you produce or consume. If you do this, your application will
- perform very poorly. This is discussed further in the section on performance tuning
- <xref linkend="perf-tuning"/>.</para>
- </warning>
+ <para>It is as simple as that. For a wide range of working JMS examples please see the
+ examples directory in the distribution.</para>
+ <warning>
+ <para>Please note that JMS connections, sessions, producers and consumers are
+ <emphasis>designed to be re-used</emphasis>.</para>
+ <para>It is an anti-pattern to create new connections, sessions, producers and consumers
+ for each message you produce or consume. If you do this, your application will
+ perform very poorly. This is discussed further in the section on performance tuning
+ <xref linkend="perf-tuning"/>.</para>
+ </warning>
+ </section>
</section>
<section>
<title>Directly instantiating JMS Resources without using JNDI</title>
<para>Although it is a very common JMS usage pattern to lookup JMS <emphasis>Administered
- Objects</emphasis> (that's JMS Queue, Topic and ConnectionFactory instances) from
- JNDI, in some cases a JNDI server is not available and you still want to use JMS, or you
- just think "Why do I need JNDI? Why can't I just instantiate these objects
- directly?"</para>
+ Objects</emphasis> (that's JMS Queue, Topic and ConnectionFactory instances) from JNDI,
+ in some cases you just think "Why do I need JNDI? Why can't I just instantiate these
+ objects directly?"</para>
<para>With ActiveMQ you can do exactly that. ActiveMQ supports the direct instantiation of JMS
Queue, Topic and ConnectionFactory instances, so you don't have to use JNDI at
all.</para>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/core/embedded-remote/pom.xml
----------------------------------------------------------------------
diff --git a/examples/core/embedded-remote/pom.xml b/examples/core/embedded-remote/pom.xml
index d84c035..9c63c97 100644
--- a/examples/core/embedded-remote/pom.xml
+++ b/examples/core/embedded-remote/pom.xml
@@ -38,11 +38,6 @@
<version>1.1.0.GA</version>
</dependency>
<dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnp-client</artifactId>
- <version>5.0.5.Final</version>
- </dependency>
- <dependency>
<groupId>org.jboss.spec.javax.jms</groupId>
<artifactId>jboss-jms-api_2.0_spec</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/core/embedded/pom.xml
----------------------------------------------------------------------
diff --git a/examples/core/embedded/pom.xml b/examples/core/embedded/pom.xml
index c49ff57..ac01956 100644
--- a/examples/core/embedded/pom.xml
+++ b/examples/core/embedded/pom.xml
@@ -38,11 +38,6 @@
<version>1.1.0.GA</version>
</dependency>
<dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnp-client</artifactId>
- <version>5.0.5.Final</version>
- </dependency>
- <dependency>
<groupId>org.jboss.spec.javax.jms</groupId>
<artifactId>jboss-jms-api_2.0_spec</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/core/perf/pom.xml
----------------------------------------------------------------------
diff --git a/examples/core/perf/pom.xml b/examples/core/perf/pom.xml
index 5f56bbc..6db15e9 100644
--- a/examples/core/perf/pom.xml
+++ b/examples/core/perf/pom.xml
@@ -34,11 +34,6 @@
<version>1.1.0.GA</version>
</dependency>
<dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnp-client</artifactId>
- <version>5.0.5.Final</version>
- </dependency>
- <dependency>
<groupId>org.apache.activemq.examples.jms</groupId>
<artifactId>activemq-jms-examples-common</artifactId>
<version>${project.version}</version>
@@ -118,11 +113,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
</plugin>
</plugins>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/core/vertx-connector/pom.xml
----------------------------------------------------------------------
diff --git a/examples/core/vertx-connector/pom.xml b/examples/core/vertx-connector/pom.xml
index 79e83f9..c12f66a 100644
--- a/examples/core/vertx-connector/pom.xml
+++ b/examples/core/vertx-connector/pom.xml
@@ -42,11 +42,6 @@
<version>1.1.0.GA</version>
</dependency>
<dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnp-client</artifactId>
- <version>5.0.5.Final</version>
- </dependency>
- <dependency>
<groupId>org.jboss.spec.javax.jms</groupId>
<artifactId>jboss-jms-api_2.0_spec</artifactId>
</dependency>
@@ -149,11 +144,6 @@
<version>1.1.0.GA</version>
</dependency>
<dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
- <dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-core</artifactId>
<version>${vertx.version}</version>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/core/vertx-connector/src/main/resources/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/core/vertx-connector/src/main/resources/server0/activemq-jms.xml b/examples/core/vertx-connector/src/main/resources/server0/activemq-jms.xml
index 452b958..847659f 100644
--- a/examples/core/vertx-connector/src/main/resources/server0/activemq-jms.xml
+++ b/examples/core/vertx-connector/src/main/resources/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/activemq-jms-examples-common/config/server.properties
----------------------------------------------------------------------
diff --git a/examples/jms/activemq-jms-examples-common/config/server.properties b/examples/jms/activemq-jms-examples-common/config/server.properties
index 0388e87..138f055 100644
--- a/examples/jms/activemq-jms-examples-common/config/server.properties
+++ b/examples/jms/activemq-jms-examples-common/config/server.properties
@@ -1 +1 @@
-server.args=-XX:+UseParallelGC -Xms256M -Xmx256M -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Dcom.sun.management.jmxremote -Djava.util.logging.config.file=${imported.basedir}/config/logging.properties -Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
\ No newline at end of file
+server.args=-XX:+UseParallelGC -Xms256M -Xmx256M -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Dcom.sun.management.jmxremote -Djava.util.logging.config.file=${imported.basedir}/config/logging.properties -Djava.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/activemq-jms-examples-common/src/main/java/org/apache/activemq/common/example/ActiveMQExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/activemq-jms-examples-common/src/main/java/org/apache/activemq/common/example/ActiveMQExample.java b/examples/jms/activemq-jms-examples-common/src/main/java/org/apache/activemq/common/example/ActiveMQExample.java
index 7c19bc3..86059b6 100644
--- a/examples/jms/activemq-jms-examples-common/src/main/java/org/apache/activemq/common/example/ActiveMQExample.java
+++ b/examples/jms/activemq-jms-examples-common/src/main/java/org/apache/activemq/common/example/ActiveMQExample.java
@@ -180,9 +180,10 @@ public abstract class ActiveMQExample
{
ActiveMQExample.log.info("using " + args[serverId] + " for jndi");
Properties props = new Properties();
- props.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
+ props.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
props.put("java.naming.provider.url", args[serverId]);
- props.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
+ props.put("queue.queue/exampleQueue", "exampleQueue");
+ props.put("topic.topic/exampleTopic", "exampleTopic");
return new InitialContext(props);
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/aerogear/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/aerogear/pom.xml b/examples/jms/aerogear/pom.xml
index 4ae12ea..516d13f 100644
--- a/examples/jms/aerogear/pom.xml
+++ b/examples/jms/aerogear/pom.xml
@@ -70,7 +70,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.AerogearExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -122,11 +122,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/aerogear/src/main/java/org/apache/activemq/jms/example/AerogearExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/aerogear/src/main/java/org/apache/activemq/jms/example/AerogearExample.java b/examples/jms/aerogear/src/main/java/org/apache/activemq/jms/example/AerogearExample.java
index b9f10b1..1c4ec67 100644
--- a/examples/jms/aerogear/src/main/java/org/apache/activemq/jms/example/AerogearExample.java
+++ b/examples/jms/aerogear/src/main/java/org/apache/activemq/jms/example/AerogearExample.java
@@ -51,10 +51,10 @@ public class AerogearExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perfom a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/aerogearQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4.Create a JMS Connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/aerogear/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/aerogear/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/aerogear/src/main/resources/hornetq/server0/activemq-jms.xml
index edc985f..2483255 100644
--- a/examples/jms/aerogear/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/aerogear/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="aerogearQueue">
- <entry name="/queue/aerogearQueue"/>
- </queue>
+ <queue name="aerogearQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/applet/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/applet/pom.xml b/examples/jms/applet/pom.xml
index c99b2c7..4a2a261 100644
--- a/examples/jms/applet/pom.xml
+++ b/examples/jms/applet/pom.xml
@@ -51,7 +51,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.AppletExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
<systemProperties>
<property>
@@ -107,11 +107,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/applet/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/applet/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/applet/src/main/resources/hornetq/server0/activemq-jms.xml
index 1dd09a6..ab4841d 100644
--- a/examples/jms/applet/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/applet/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the topic used by the example-->
- <topic name="exampleTopic">
- <entry name="/topic/exampleTopic"/>
- </topic>
+ <topic name="exampleTopic"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/application-layer-failover/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/application-layer-failover/pom.xml b/examples/jms/application-layer-failover/pom.xml
index 0cfa2f7..c9cfb1a 100644
--- a/examples/jms/application-layer-failover/pom.xml
+++ b/examples/jms/application-layer-failover/pom.xml
@@ -60,8 +60,8 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ApplicationLayerFailoverExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
</args>
<systemProperties>
<property>
@@ -126,11 +126,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/application-layer-failover/src/main/java/org/apache/activemq/jms/example/ApplicationLayerFailoverExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/application-layer-failover/src/main/java/org/apache/activemq/jms/example/ApplicationLayerFailoverExample.java b/examples/jms/application-layer-failover/src/main/java/org/apache/activemq/jms/example/ApplicationLayerFailoverExample.java
index 0b7c3a8..2887e4c 100644
--- a/examples/jms/application-layer-failover/src/main/java/org/apache/activemq/jms/example/ApplicationLayerFailoverExample.java
+++ b/examples/jms/application-layer-failover/src/main/java/org/apache/activemq/jms/example/ApplicationLayerFailoverExample.java
@@ -152,10 +152,10 @@ public class ApplicationLayerFailoverExample extends ActiveMQExample
initialContext = getContext(server);
// Step 2. Look-up the JMS Queue object from JNDI
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Look-up a JMS Connection Factory object from JNDI on server 1
- ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. We create a JMS Connection connection
connection = connectionFactory.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/application-layer-failover/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/application-layer-failover/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/application-layer-failover/src/main/resources/hornetq/server0/activemq-jms.xml
index 3058fc8..0d5c953 100644
--- a/examples/jms/application-layer-failover/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/application-layer-failover/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/application-layer-failover/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/application-layer-failover/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/application-layer-failover/src/main/resources/hornetq/server1/activemq-jms.xml
index 3058fc8..0d5c953 100644
--- a/examples/jms/application-layer-failover/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/application-layer-failover/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/bridge/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/bridge/pom.xml b/examples/jms/bridge/pom.xml
index f57adef..0c7b49c 100644
--- a/examples/jms/bridge/pom.xml
+++ b/examples/jms/bridge/pom.xml
@@ -64,8 +64,8 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.BridgeExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
</args>
<systemProperties>
<property>
@@ -130,11 +130,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/bridge/src/main/java/org/apache/activemq/jms/example/BridgeExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/bridge/src/main/java/org/apache/activemq/jms/example/BridgeExample.java b/examples/jms/bridge/src/main/java/org/apache/activemq/jms/example/BridgeExample.java
index 4cbe94c..fcf8719 100644
--- a/examples/jms/bridge/src/main/java/org/apache/activemq/jms/example/BridgeExample.java
+++ b/examples/jms/bridge/src/main/java/org/apache/activemq/jms/example/BridgeExample.java
@@ -59,11 +59,11 @@ public class BridgeExample extends ActiveMQExample
// Step 2 - we look up the sausage-factory queue from node 0
- Queue sausageFactory = (Queue)ic0.lookup("/queue/sausage-factory");
+ Queue sausageFactory = (Queue)ic0.lookup("queue/exampleQueue");
// Step 3 - we look up a JMS ConnectionFactory object from node 0
- ConnectionFactory cf0 = (ConnectionFactory)ic0.lookup("/ConnectionFactory");
+ ConnectionFactory cf0 = (ConnectionFactory)ic0.lookup("ConnectionFactory");
// Step 4 - we create an initial context for looking up JNDI on node 1
@@ -71,11 +71,11 @@ public class BridgeExample extends ActiveMQExample
// Step 5 - we look up the mincing-machine queue on node 1
- Queue mincingMachine = (Queue)ic1.lookup("/queue/mincing-machine");
+ Queue mincingMachine = (Queue)ic1.lookup("queue/exampleQueue1");
// Step 6 - we look up a JMS ConnectionFactory object from node 1
- ConnectionFactory cf1 = (ConnectionFactory)ic1.lookup("/ConnectionFactory");
+ ConnectionFactory cf1 = (ConnectionFactory)ic1.lookup("ConnectionFactory");
// Step 7. We create a JMS Connection connection0 which is a connection to server 0
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/bridge/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/bridge/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/bridge/src/main/resources/hornetq/server0/activemq-jms.xml
index 2ec4406..3f96251 100644
--- a/examples/jms/bridge/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/bridge/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="sausage-factory">
- <entry name="/queue/sausage-factory"/>
- </queue>
+ <queue name="sausage-factory"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/bridge/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/bridge/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/bridge/src/main/resources/hornetq/server1/activemq-jms.xml
index 0165bf1..e4fe85a 100644
--- a/examples/jms/bridge/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/bridge/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="mincing-machine">
- <entry name="/queue/mincing-machine"/>
- </queue>
+ <queue name="mincing-machine"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/browser/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/browser/pom.xml b/examples/jms/browser/pom.xml
index 19d4284..ffcd947 100644
--- a/examples/jms/browser/pom.xml
+++ b/examples/jms/browser/pom.xml
@@ -44,7 +44,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.QueueBrowserExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -91,11 +91,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/browser/src/main/java/org/apache/activemq/jms/example/QueueBrowserExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/browser/src/main/java/org/apache/activemq/jms/example/QueueBrowserExample.java b/examples/jms/browser/src/main/java/org/apache/activemq/jms/example/QueueBrowserExample.java
index bf2093b..52e7fe1 100644
--- a/examples/jms/browser/src/main/java/org/apache/activemq/jms/example/QueueBrowserExample.java
+++ b/examples/jms/browser/src/main/java/org/apache/activemq/jms/example/QueueBrowserExample.java
@@ -55,10 +55,10 @@ public class QueueBrowserExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perfom a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. Create a JMS Connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/browser/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/browser/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/browser/src/main/resources/hornetq/server0/activemq-jms.xml
index 452b958..847659f 100644
--- a/examples/jms/browser/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/browser/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/client-kickoff/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/client-kickoff/pom.xml b/examples/jms/client-kickoff/pom.xml
index c254db9..3e0a2ed 100644
--- a/examples/jms/client-kickoff/pom.xml
+++ b/examples/jms/client-kickoff/pom.xml
@@ -75,7 +75,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ClientKickoffExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -122,11 +122,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/client-kickoff/src/main/java/org/apache/activemq/jms/example/ClientKickoffExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/client-kickoff/src/main/java/org/apache/activemq/jms/example/ClientKickoffExample.java b/examples/jms/client-kickoff/src/main/java/org/apache/activemq/jms/example/ClientKickoffExample.java
index afd6083..80957f7 100644
--- a/examples/jms/client-kickoff/src/main/java/org/apache/activemq/jms/example/ClientKickoffExample.java
+++ b/examples/jms/client-kickoff/src/main/java/org/apache/activemq/jms/example/ClientKickoffExample.java
@@ -60,7 +60,7 @@ public class ClientKickoffExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perform a lookup on the Connection Factory
- QueueConnectionFactory cf = (QueueConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ QueueConnectionFactory cf = (QueueConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 3.Create a JMS Connection
connection = cf.createQueueConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/client-kickoff/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/client-kickoff/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/client-kickoff/src/main/resources/hornetq/server0/activemq-jms.xml
index 3de4046..10a6dba 100644
--- a/examples/jms/client-kickoff/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/client-kickoff/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,14 +1,5 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory" signature="queue">
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/client-side-failoverlistener/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/client-side-failoverlistener/pom.xml b/examples/jms/client-side-failoverlistener/pom.xml
index 37ffe90..402cced 100644
--- a/examples/jms/client-side-failoverlistener/pom.xml
+++ b/examples/jms/client-side-failoverlistener/pom.xml
@@ -80,8 +80,8 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ClientSideFailoverListerExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
</args>
<systemProperties>
<property>
@@ -146,11 +146,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/client-side-failoverlistener/src/main/java/org/apache/activemq/jms/example/ClientSideFailoverListerExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/client-side-failoverlistener/src/main/java/org/apache/activemq/jms/example/ClientSideFailoverListerExample.java b/examples/jms/client-side-failoverlistener/src/main/java/org/apache/activemq/jms/example/ClientSideFailoverListerExample.java
index 0114786..46b7b63 100644
--- a/examples/jms/client-side-failoverlistener/src/main/java/org/apache/activemq/jms/example/ClientSideFailoverListerExample.java
+++ b/examples/jms/client-side-failoverlistener/src/main/java/org/apache/activemq/jms/example/ClientSideFailoverListerExample.java
@@ -58,10 +58,10 @@ public class ClientSideFailoverListerExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Look-up the JMS Queue object from JNDI
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Look-up a JMS Connection Factory object from JNDI on server 0
- ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. We create 1 JMS connections from the same connection factory.
// Wait a little while to make sure broadcasts from all nodes have reached the client
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/client-side-failoverlistener/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/client-side-failoverlistener/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/client-side-failoverlistener/src/main/resources/hornetq/server0/activemq-jms.xml
index 889b59d..0d5c953 100644
--- a/examples/jms/client-side-failoverlistener/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/client-side-failoverlistener/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,33 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
-
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
-
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/client-side-failoverlistener/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/client-side-failoverlistener/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/client-side-failoverlistener/src/main/resources/hornetq/server1/activemq-jms.xml
index c3b0393..0d5c953 100644
--- a/examples/jms/client-side-failoverlistener/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/client-side-failoverlistener/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,32 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
-
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/client-side-load-balancing/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/client-side-load-balancing/pom.xml b/examples/jms/client-side-load-balancing/pom.xml
index 2e4f24a..9ce2b28 100644
--- a/examples/jms/client-side-load-balancing/pom.xml
+++ b/examples/jms/client-side-load-balancing/pom.xml
@@ -101,8 +101,8 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ClientSideLoadBalancingExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
</args>
<systemProperties>
<property>
@@ -176,11 +176,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/client-side-load-balancing/src/main/java/org/apache/activemq/jms/example/ClientSideLoadBalancingExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/client-side-load-balancing/src/main/java/org/apache/activemq/jms/example/ClientSideLoadBalancingExample.java b/examples/jms/client-side-load-balancing/src/main/java/org/apache/activemq/jms/example/ClientSideLoadBalancingExample.java
index da73900..be1895a 100644
--- a/examples/jms/client-side-load-balancing/src/main/java/org/apache/activemq/jms/example/ClientSideLoadBalancingExample.java
+++ b/examples/jms/client-side-load-balancing/src/main/java/org/apache/activemq/jms/example/ClientSideLoadBalancingExample.java
@@ -59,10 +59,10 @@ public class ClientSideLoadBalancingExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Look-up the JMS Queue object from JNDI
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Look-up a JMS Connection Factory object from JNDI on server 0
- ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. We create 3 JMS connections from the same connection factory. Since we are using round-robin
// load-balancing this should result in each sessions being connected to a different node of the cluster
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/client-side-load-balancing/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/client-side-load-balancing/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/client-side-load-balancing/src/main/resources/hornetq/server0/activemq-jms.xml
index 1ecf1f7..847659f 100644
--- a/examples/jms/client-side-load-balancing/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/client-side-load-balancing/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,17 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <discovery-group-ref discovery-group-name="my-discovery-group"/>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/client-side-load-balancing/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/client-side-load-balancing/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/client-side-load-balancing/src/main/resources/hornetq/server1/activemq-jms.xml
index 1ecf1f7..847659f 100644
--- a/examples/jms/client-side-load-balancing/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/client-side-load-balancing/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,17 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <discovery-group-ref discovery-group-name="my-discovery-group"/>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/client-side-load-balancing/src/main/resources/hornetq/server2/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/client-side-load-balancing/src/main/resources/hornetq/server2/activemq-jms.xml b/examples/jms/client-side-load-balancing/src/main/resources/hornetq/server2/activemq-jms.xml
index 1ecf1f7..847659f 100644
--- a/examples/jms/client-side-load-balancing/src/main/resources/hornetq/server2/activemq-jms.xml
+++ b/examples/jms/client-side-load-balancing/src/main/resources/hornetq/server2/activemq-jms.xml
@@ -1,17 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <discovery-group-ref discovery-group-name="my-discovery-group"/>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-durable-subscription/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-durable-subscription/pom.xml b/examples/jms/clustered-durable-subscription/pom.xml
index 5ff2e28..73d6727 100644
--- a/examples/jms/clustered-durable-subscription/pom.xml
+++ b/examples/jms/clustered-durable-subscription/pom.xml
@@ -79,8 +79,8 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ClusteredDurableSubscriptionExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
</args>
<systemProperties>
<property>
@@ -145,11 +145,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-durable-subscription/src/main/java/org/apache/activemq/jms/example/ClusteredDurableSubscriptionExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-durable-subscription/src/main/java/org/apache/activemq/jms/example/ClusteredDurableSubscriptionExample.java b/examples/jms/clustered-durable-subscription/src/main/java/org/apache/activemq/jms/example/ClusteredDurableSubscriptionExample.java
index 5ca0f0d..01d1c47 100644
--- a/examples/jms/clustered-durable-subscription/src/main/java/org/apache/activemq/jms/example/ClusteredDurableSubscriptionExample.java
+++ b/examples/jms/clustered-durable-subscription/src/main/java/org/apache/activemq/jms/example/ClusteredDurableSubscriptionExample.java
@@ -59,16 +59,16 @@ public class ClusteredDurableSubscriptionExample extends ActiveMQExample
ic0 = getContext(0);
// Step 2. Look-up the JMS Topic object from JNDI
- Topic topic = (Topic)ic0.lookup("/topic/exampleTopic");
+ Topic topic = (Topic)ic0.lookup("topic/exampleTopic");
// Step 3. Look-up a JMS Connection Factory object from JNDI on server 0
- ConnectionFactory cf0 = (ConnectionFactory)ic0.lookup("/ConnectionFactory");
+ ConnectionFactory cf0 = (ConnectionFactory)ic0.lookup("ConnectionFactory");
// Step 4. Get an initial context for looking up JNDI from server 1
ic1 = getContext(1);
// Step 5. Look-up a JMS Connection Factory object from JNDI on server 1
- ConnectionFactory cf1 = (ConnectionFactory)ic1.lookup("/ConnectionFactory");
+ ConnectionFactory cf1 = (ConnectionFactory)ic1.lookup("ConnectionFactory");
// Step 6. We create a JMS Connection connection0 which is a connection to server 0
// and set the client-id
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-durable-subscription/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-durable-subscription/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/clustered-durable-subscription/src/main/resources/hornetq/server0/activemq-jms.xml
index 1dd09a6..ab4841d 100644
--- a/examples/jms/clustered-durable-subscription/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/clustered-durable-subscription/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the topic used by the example-->
- <topic name="exampleTopic">
- <entry name="/topic/exampleTopic"/>
- </topic>
+ <topic name="exampleTopic"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-durable-subscription/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-durable-subscription/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/clustered-durable-subscription/src/main/resources/hornetq/server1/activemq-jms.xml
index 1dd09a6..ab4841d 100644
--- a/examples/jms/clustered-durable-subscription/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/clustered-durable-subscription/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the topic used by the example-->
- <topic name="exampleTopic">
- <entry name="/topic/exampleTopic"/>
- </topic>
+ <topic name="exampleTopic"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-grouping/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-grouping/pom.xml b/examples/jms/clustered-grouping/pom.xml
index 0e55226..f3a3fa6 100644
--- a/examples/jms/clustered-grouping/pom.xml
+++ b/examples/jms/clustered-grouping/pom.xml
@@ -101,9 +101,9 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ClusteredGroupingExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
- <param>jnp://localhost:1299</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
+ <param>tcp://localhost:5447</param>
</args>
<systemProperties>
<property>
@@ -177,11 +177,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-grouping/src/main/java/org/apache/activemq/jms/example/ClusteredGroupingExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-grouping/src/main/java/org/apache/activemq/jms/example/ClusteredGroupingExample.java b/examples/jms/clustered-grouping/src/main/java/org/apache/activemq/jms/example/ClusteredGroupingExample.java
index 0561d88..91421cf 100644
--- a/examples/jms/clustered-grouping/src/main/java/org/apache/activemq/jms/example/ClusteredGroupingExample.java
+++ b/examples/jms/clustered-grouping/src/main/java/org/apache/activemq/jms/example/ClusteredGroupingExample.java
@@ -61,22 +61,22 @@ public class ClusteredGroupingExample extends ActiveMQExample
ic0 = getContext(0);
// Step 2. Look-up the JMS Queue object from JNDI
- Queue queue = (Queue)ic0.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)ic0.lookup("queue/exampleQueue");
// Step 3. Look-up a JMS Connection Factory object from JNDI on server 0
- ConnectionFactory cf0 = (ConnectionFactory)ic0.lookup("/ConnectionFactory");
+ ConnectionFactory cf0 = (ConnectionFactory)ic0.lookup("ConnectionFactory");
// Step 4. Get an initial context for looking up JNDI from server 1
ic1 = getContext(1);
// Step 5. Look-up a JMS Connection Factory object from JNDI on server 1
- ConnectionFactory cf1 = (ConnectionFactory)ic1.lookup("/ConnectionFactory");
+ ConnectionFactory cf1 = (ConnectionFactory)ic1.lookup("ConnectionFactory");
// Step 4. Get an initial context for looking up JNDI from server 1
ic2 = getContext(2);
// Step 5. Look-up a JMS Connection Factory object from JNDI on server 1
- ConnectionFactory cf2 = (ConnectionFactory)ic2.lookup("/ConnectionFactory");
+ ConnectionFactory cf2 = (ConnectionFactory)ic2.lookup("ConnectionFactory");
// Step 6. We create a JMS Connection connection0 which is a connection to server 0
connection0 = cf0.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/clustered-grouping/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/clustered-grouping/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/clustered-grouping/src/main/resources/hornetq/server0/activemq-jms.xml
index 452b958..847659f 100644
--- a/examples/jms/clustered-grouping/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/clustered-grouping/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
[09/13] activemq-6 git commit: ACTIVEMQ6-14 Replace JNDI server with
client impl
Posted by cl...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/docs/user-manual/en/appserver-integration.xml
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/appserver-integration.xml b/docs/user-manual/en/appserver-integration.xml
index a22d95e..897de10 100644
--- a/docs/user-manual/en/appserver-integration.xml
+++ b/docs/user-manual/en/appserver-integration.xml
@@ -494,38 +494,35 @@ public class MyMDB implements MessageListener
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.discovery-initial-wait-timeout">
- DiscoveryInitialWaitTimeout
- </link>
+ DiscoveryInitialWaitTimeout
</entry>
<entry>Long</entry>
<entry>The initial time to wait for discovery.</entry>
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.connection-load-balancing-policy-class-name">
- ConnectionLoadBalancingPolicyClassName</link>
+ ConnectionLoadBalancingPolicyClassName
</entry>
<entry>String</entry>
<entry>The load balancing policy class to use.</entry>
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.connection-ttl">ConnectionTTL</link>
+ ConnectionTTL
</entry>
<entry>Long</entry>
<entry>The time to live (in milliseconds) for the connection.</entry>
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.call-timeout">CallTimeout</link>
+ CallTimeout
</entry>
<entry>Long</entry>
<entry>the call timeout (in milliseconds) for each packet sent.</entry>
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.dups-ok-batch-size">DupsOKBatchSize</link>
+ DupsOKBatchSize
</entry>
<entry>Integer</entry>
<entry>the batch size (in bytes) between acknowledgements when using
@@ -533,7 +530,7 @@ public class MyMDB implements MessageListener
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.transaction-batch-size">TransactionBatchSize</link>
+ TransactionBatchSize
</entry>
<entry>Integer</entry>
<entry>the batch size (in bytes) between acknowledgements when using a
@@ -541,70 +538,70 @@ public class MyMDB implements MessageListener
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.consumer-window-size">ConsumerWindowSize</link>
+ ConsumerWindowSize
</entry>
<entry>Integer</entry>
<entry>the window size (in bytes) for consumer flow control</entry>
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.consumer-max-rate">ConsumerMaxRate</link>
+ ConsumerMaxRate
</entry>
<entry>Integer</entry>
<entry>the fastest rate a consumer may consume messages per second</entry>
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.confirmation-window-size">ConfirmationWindowSize</link>
+ ConfirmationWindowSize
</entry>
<entry>Integer</entry>
<entry>the window size (in bytes) for reattachment confirmations</entry>
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.producer-max-rate">ProducerMaxRate</link>
+ ProducerMaxRate
</entry>
<entry>Integer</entry>
<entry>the maximum rate of messages per second that can be sent</entry>
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.min-large-message-size">MinLargeMessageSize</link>
+ MinLargeMessageSize
</entry>
<entry>Integer</entry>
<entry>the size (in bytes) before a message is treated as large </entry>
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.block-on-acknowledge">BlockOnAcknowledge</link>
+ BlockOnAcknowledge
</entry>
<entry>Boolean</entry>
<entry>whether or not messages are acknowledged synchronously</entry>
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.block-on-non-durable-send">BlockOnNonDurableSend</link>
+ BlockOnNonDurableSend
</entry>
<entry>Boolean</entry>
<entry>whether or not non-durable messages are sent synchronously</entry>
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.block-on-durable-send">BlockOnDurableSend</link>
+ BlockOnDurableSend
</entry>
<entry>Boolean</entry>
<entry>whether or not durable messages are sent synchronously</entry>
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.auto-group">AutoGroup</link>
+ AutoGroup
</entry>
<entry>Boolean</entry>
<entry>whether or not message grouping is automatically used</entry>
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.pre-acknowledge">PreAcknowledge</link>
+ PreAcknowledge
</entry>
<entry>Boolean</entry>
<entry>whether messages are pre acknowledged by the server before
@@ -612,28 +609,28 @@ public class MyMDB implements MessageListener
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.reconnect-attempts">ReconnectAttempts</link>
+ ReconnectAttempts
</entry>
<entry>Integer</entry>
<entry>maximum number of retry attempts, default for the resource adapter is -1 (infinite attempts)</entry>
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.retry-interval">RetryInterval</link>
+ RetryInterval
</entry>
<entry>Long</entry>
<entry>the time (in milliseconds) to retry a connection after failing</entry>
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.retry-interval-multiplier">RetryIntervalMultiplier</link>
+ RetryIntervalMultiplier
</entry>
<entry>Double</entry>
<entry>multiplier to apply to successive retry intervals</entry>
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.failover-on-server-shutdown">FailoverOnServerShutdown</link>
+ FailoverOnServerShutdown
</entry>
<entry>Boolean</entry>
<entry>If true client will reconnect to another server if
@@ -641,14 +638,14 @@ public class MyMDB implements MessageListener
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.client-id">ClientID</link>
+ ClientID
</entry>
<entry>String</entry>
<entry>the pre-configured client ID for the connection factory</entry>
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.client-failure-check-period">ClientFailureCheckPeriod</link>
+ ClientFailureCheckPeriod
</entry>
<entry>Long</entry>
<entry>the period (in ms) after which the client will consider the
@@ -657,21 +654,21 @@ public class MyMDB implements MessageListener
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.use-global-pools">UseGlobalPools</link>
+ UseGlobalPools
</entry>
<entry>Boolean</entry>
<entry>whether or not to use a global thread pool for threads</entry>
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.scheduled-thread-pool-max-size">ScheduledThreadPoolMaxSize</link>
+ ScheduledThreadPoolMaxSize
</entry>
<entry>Integer</entry>
<entry>the size of the <emphasis>scheduled thread</emphasis> pool</entry>
</row>
<row>
<entry>
- <link linkend="configuration.connection-factory.thread-pool-max-size">ThreadPoolMaxSize</link>
+ ThreadPoolMaxSize
</entry>
<entry>Integer</entry>
<entry>the size of the thread pool</entry>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/docs/user-manual/en/client-classpath.xml
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/client-classpath.xml b/docs/user-manual/en/client-classpath.xml
index 0115770..2baafbd 100644
--- a/docs/user-manual/en/client-classpath.xml
+++ b/docs/user-manual/en/client-classpath.xml
@@ -47,12 +47,5 @@
needed for the <literal>javax.jms.*</literal> classes. If you already have a jar
with these interface classes on your classpath, you will not need it.</para>
</note>
-
- </section>
- <section>
- <title>JMS Client with JNDI</title>
- <para>If you are looking up JMS resources from the JNDI server co-located with the ActiveMQ
- standalone server, you will also need the jar <literal>jnp-client.jar</literal> jar on
- your client classpath as well as any other jars mentioned previously.</para>
</section>
</chapter>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/docs/user-manual/en/client-reconnection.xml
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/client-reconnection.xml b/docs/user-manual/en/client-reconnection.xml
index 29a4266..96a4534 100644
--- a/docs/user-manual/en/client-reconnection.xml
+++ b/docs/user-manual/en/client-reconnection.xml
@@ -115,23 +115,16 @@
default value is <literal>0</literal>.</para>
</listitem>
</itemizedlist>
- <para>If you're using JMS, and you're using the JMS Service on the server to load your JMS
- connection factory instances directly into JNDI, then you can specify these parameters
- in the xml configuration in <literal>activemq-jms.xml</literal>, for example:</para>
+ <para>If you're using JMS and you're using JNDI on the client to look up your JMS
+ connection factory instances then you can specify these parameters
+ in the JNDI context environment in, e.g. <literal>jndi.properties</literal>:</para>
<programlisting>
-<connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- <entry name="XAConnectionFactory"/>
- </entries>
- <retry-interval>1000</retry-interval>
- <retry-interval-multiplier>1.5</retry-interval-multiplier>
- <max-retry-interval>60000</max-retry-interval>
- <reconnect-attempts>1000</reconnect-attempts>
-</connection-factory></programlisting>
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url = tcp://localhost:5445
+connection.ConnectionFactory.retryInterval=1000
+connection.ConnectionFactory.retryIntervalMultiplier=1.5
+connection.ConnectionFactory.maxRetryInterval=60000
+connection.ConnectionFactory.reconnectAttempts=1000</programlisting>
<para>If you're using JMS, but instantiating your JMS connection factory directly, you can
specify the parameters using the appropriate setter methods on the <literal
>ActiveMQConnectionFactory</literal> immediately after creating it.</para>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/docs/user-manual/en/clusters.xml
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/clusters.xml b/docs/user-manual/en/clusters.xml
index 6d4227e..2b4aad1 100644
--- a/docs/user-manual/en/clusters.xml
+++ b/docs/user-manual/en/clusters.xml
@@ -378,18 +378,15 @@
whether you're using JMS or the core API.</para>
<section>
<title>Configuring client discovery using JMS</title>
- <para>If you're using JMS and you're also using the JMS Service on the server to
- load your JMS connection factory instances into JNDI, then you can specify which
- discovery group to use for your JMS connection factory in the server side xml
- configuration <literal>activemq-jms.xml</literal>. Let's take a look at an
+ <para>If you're using JMS and you're using JNDI on the client to look up your JMS
+ connection factory instances then you can specify these parameters in the JNDI
+ context environment. e.g. in <literal>jndi.properties</literal>. Simply ensure the
+ host:port combination matches the group-address and group-port from the corresponding
+ <literal>broadcast-group</literal> on the server. Let's take a look at an
example:</para>
<programlisting>
-<connection-factory name="ConnectionFactory">
- <discovery-group-ref discovery-group-name="my-discovery-group"/>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-</connection-factory></programlisting>
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url = udp://231.7.7.7:9876</programlisting>
<para>The element <literal>discovery-group-ref</literal> specifies the name of a
discovery group defined in <literal>activemq-configuration.xml</literal>.</para>
<para>When this connection factory is downloaded from JNDI by a client application
@@ -471,27 +468,17 @@ ClientSession session2 = factory.createSession();</programlisting>
<para>A static list of possible servers can also be used by a normal client.</para>
<section>
<title>Configuring client discovery using JMS</title>
- <para>If you're using JMS and you're also using the JMS Service on the server to
- load your JMS connection factory instances into JNDI, then you can specify which
- connectors to use for your JMS connection factory in the server side xml
- configuration <literal>activemq-jms.xml</literal>. Let's take a look at an
- example:</para>
+ <para>If you're using JMS and you're using JNDI on the client to look up your JMS
+ connection factory instances then you can specify these parameters
+ in the JNDI context environment in, e.g. <literal>jndi.properties</literal>:</para>
<programlisting>
-<connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- <connector-ref connector-name="netty-connector2"/>
- <connector-ref connector-name="netty-connector3"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-</connection-factory></programlisting>
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://myhost:5445,myhost2:5445</programlisting>
<para>
- The element <literal>connectors</literal> contains a list of pre defined connectors in the
- <literal>activemq-configuration.xml</literal> file. When this connection factory is downloaded
- from JNDI by a client application and JMS connections are created from it, those connections will
- be load-balanced across the list of servers defined by these connectors.
+ The <literal>java.naming.provider.url</literal> contains a list of servers to use for the
+ connection factory. When this connection factory used client application and JMS connections
+ are created from it, those connections will be load-balanced across the list of servers defined
+ by the <literal>java.naming.provider.url</literal>.
</para>
<para>
If you're using JMS, but you're not using JNDI to lookup a connection factory - you're instantiating
@@ -830,20 +817,14 @@ ClientSession session = factory.createSession();</programlisting>
<para>Specifying which load balancing policy to use differs whether you are using JMS or the
core API. If you don't specify a policy then the default will be used which is <literal
>org.apache.activemq.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy</literal>.</para>
- <para>If you're using JMS, and you're using JNDI on the server to put your JMS connection
- factories into JNDI, then you can specify the load balancing policy directly in the
- <literal>activemq-jms.xml</literal> configuration file on the server as follows:</para>
+ <para>If you're using JMS and you're using JNDI on the client to look up your JMS connection factory instances
+ then you can specify these parameters in the JNDI context environment in, e.g.
+ <literal>jndi.properties</literal>, to specify the load balancing policy directly:</para>
<programlisting>
-<connection-factory name="ConnectionFactory">
- <discovery-group-ref discovery-group-name="my-discovery-group"/>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- <connection-load-balancing-policy-class-name>
- org.apache.activemq.api.core.client.loadbalance.RandomConnectionLoadBalancingPolicy
- </connection-load-balancing-policy-class-name>
-</connection-factory></programlisting>
- <para>The above example would deploy a JMS connection factory that uses the random connection load
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
+connection.ConnectionFactory.loadBalancingPolicyClassName=org.apache.activemq.api.core.client.loadbalance.RandomConnectionLoadBalancingPolicy</programlisting>
+ <para>The above example would instantiate a JMS connection factory that uses the random connection load
balancing policy. </para>
<para>If you're using JMS but you're instantiating your connection factory directly on the
client side then you can set the load balancing policy using the setter on the
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/docs/user-manual/en/configuration-index.xml
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/configuration-index.xml b/docs/user-manual/en/configuration-index.xml
index db63a1b..8307d99 100644
--- a/docs/user-manual/en/configuration-index.xml
+++ b/docs/user-manual/en/configuration-index.xml
@@ -73,364 +73,56 @@
</thead>
<tbody>
<row>
- <entry>
- <link linkend="using-jms.server.configuration">connection-factory</link>
- </entry>
- <entry>ConnectionFactory</entry>
- <entry>a list of connection factories to create and add to JNDI</entry>
- <entry/>
- </row>
- </tbody>
- </tgroup>
- </table>
- <para></para>
- <para></para>
- <para>Continued..</para>
- <informaltable frame="topbot">
- <tgroup cols="4">
- <colspec colname="c1" colnum="1"/>
- <colspec colname="c2" colnum="2"/>
- <colspec colname="c3" colnum="3"/>
- <colspec colname="c4" colnum="4"/>
- <tbody>
- <row>
- <entry id="configuration.connection-factory.signature">
- <link linkend="using-jms.configure.factory.types">connection-factory.signature (attribute)</link>
- </entry>
- <entry>String</entry>
- <entry>Type of connection factory</entry>
- <entry>generic</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.signature.xa">
- <link linkend="using-jms.configure.factory.types">connection-factory.xa</link>
- </entry>
- <entry>Boolean</entry>
- <entry>If it is a XA connection factory</entry>
- <entry>false</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.auto-group">
- <link linkend="message-grouping.jmsconfigure">connection-factory.auto-group</link>
- </entry>
- <entry>Boolean</entry>
- <entry>whether or not message grouping is automatically used</entry>
- <entry>false</entry>
- </row>
- <row>
- <entry><link linkend="clusters">connection-factory.connectors</link>
- </entry>
- <entry>String</entry>
- <entry>A list of connectors used by the connection factory</entry>
- <entry />
- </row>
- <row>
- <entry><link linkend="clusters"
- >connection-factory.connectors.connector-ref.connector-name (attribute)</link>
- </entry>
- <entry>String</entry>
- <entry>Name of the connector to connect to the live server</entry>
- <entry />
- </row>
- <row>
- <entry><link linkend="clusters"
- >connection-factory.discovery-group-ref.discovery-group-name (attribute)</link>
- </entry>
- <entry>String</entry>
- <entry>Name of discovery group used by this connection factory</entry>
- <entry />
- </row>
- <row>
- <!-- FIXME documented but does not exist? -->
- <entry id="configuration.connection-factory.discovery-initial-wait-timeout">
- <link linkend="clusters"
- >connection-factory.discovery-initial-wait-timeout</link>
- </entry>
- <entry>Long</entry>
- <entry>the initial time to wait (in ms) for discovery groups to wait for
- broadcasts</entry>
- <entry>10000</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.block-on-acknowledge">
- <link linkend="send-guarantees.nontrans.acks">connection-factory.block-on-acknowledge</link>
- </entry>
- <entry>Boolean</entry>
- <entry>whether or not messages are acknowledged synchronously</entry>
- <entry>false</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.block-on-non-durable-send">
- <link linkend="non-transactional-sends">connection-factory.block-on-non-durable-send</link>
- </entry>
- <entry>Boolean</entry>
- <entry>whether or not non-durable messages are sent synchronously</entry>
- <entry>false</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.block-on-durable-send">
- <link linkend="non-transactional-sends">connection-factory.block-on-durable-send</link>
- </entry>
- <entry>Boolean</entry>
- <entry>whether or not durable messages are sent synchronously</entry>
- <entry>true</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.call-timeout">connection-factory.call-timeout</entry>
- <entry>Long</entry>
- <entry>the timeout (in ms) for remote calls</entry>
- <entry>30000</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.client-failure-check-period">
- <link linkend="dead.connections">connection-factory.client-failure-check-period</link>
- </entry>
- <entry>Long</entry>
- <entry>the period (in ms) after which the client will consider the
- connection failed after not receiving packets from the
- server</entry>
- <entry>30000</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.client-id">
- <link linkend="using-jms.clientid">connection-factory.client-id</link>
- </entry>
- <entry>String</entry>
- <entry>the pre-configured client ID for the connection factory</entry>
- <entry>null</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.connection-load-balancing-policy-class-name">
- <link linkend="clusters">
- connection-factory.connection-load-balancing-policy-class-name</link>
- </entry>
- <entry>String</entry>
- <entry>the name of the load balancing class</entry>
- <entry>org.apache.activemq.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.connection-ttl">
- <link linkend="dead.connections">connection-factory.connection-ttl</link>
- </entry>
- <entry>Long</entry>
- <entry>the time to live (in ms) for connections</entry>
- <entry>1 * 60000</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.consumer-max-rate">
- <link linkend="flow-control.rate.core.api">connection-factory.consumer-max-rate</link></entry>
- <entry>Integer</entry>
- <entry>the fastest rate a consumer may consume messages per
- second</entry>
- <entry>-1</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.consumer-window-size">
- <link linkend="flow-control.core.api">connection-factory.consumer-window-size</link></entry>
- <entry>Integer</entry>
- <entry>the window size (in bytes) for consumer flow control</entry>
- <entry>1024 * 1024</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.dups-ok-batch-size">
- <link linkend="using-jms.dupsokbatchsize">connection-factory.dups-ok-batch-size</link></entry>
- <entry>Integer</entry>
- <entry>the batch size (in bytes) between acknowledgements when using
- DUPS_OK_ACKNOWLEDGE mode</entry>
- <entry>1024 * 1024</entry>
- </row>
- <row>
- <entry><link linkend="ha.automatic.failover"
- >connection-factory.failover-on-initial-connection</link></entry>
- <entry>Boolean</entry>
- <entry>whether or not to failover to backup on event that initial connection to live server fails</entry>
- <entry>false</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.failover-on-server-shutdown">
- <link linkend="ha.automatic.failover">connection-factory.failover-on-server-shutdown</link></entry>
- <entry>Boolean</entry>
- <entry>whether or not to failover on server shutdown</entry>
- <entry>false</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.min-large-message-size">
- <link linkend="large-messages.core.config">connection-factory.min-large-message-size</link></entry>
- <entry>Integer</entry>
- <entry>the size (in bytes) before a message is treated as large</entry>
- <entry>100 * 1024</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.avoid-large-messages">
- <link linkend="large.message.configuring">connection-factory.avoid-large-messages</link></entry>
- <entry>Boolean</entry>
- <entry>If compress large messages and send them as regular messages if possible</entry>
- <entry>false</entry>
- </row>
- <row>
- <entry><link linkend="clusters"
- >connection-factory.cache-large-message-client</link></entry>
- <entry>Boolean</entry>
- <entry>If true clients using this connection factory will hold the large
- message body on temporary files.</entry>
- <entry>false</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.pre-acknowledge">
- <link linkend="pre-acknowledge.configure">connection-factory.pre-acknowledge</link></entry>
- <entry>Boolean</entry>
- <entry>whether messages are pre acknowledged by the server before
- sending</entry>
- <entry>false</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.producer-max-rate">
- <link linkend="flow-control.producer.rate.core.api">connection-factory.producer-max-rate</link></entry>
- <entry>Integer</entry>
- <entry>the maximum rate of messages per second that can be sent</entry>
- <entry>-1</entry>
- </row>
- <row>
- <entry><link linkend="client-reconnection"
- >connection-factory.producer-window-size</link></entry>
- <entry>Integer</entry>
- <entry>the window size in bytes for producers sending messages</entry>
- <entry>1024 * 1024</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.confirmation-window-size">
- <link linkend="client-reconnection">connection-factory.confirmation-window-size</link>
- </entry>
- <entry>Integer</entry>
- <entry>the window size (in bytes) for reattachment confirmations</entry>
- <entry>1024 * 1024</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.reconnect-attempts">
- <link linkend="client-reconnection">connection-factory.reconnect-attempts</link>
- </entry>
- <entry>Integer</entry>
- <entry>maximum number of retry attempts, -1 signifies infinite</entry>
- <entry>0</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.retry-interval">
- <link linkend="client-reconnection">connection-factory.retry-interval</link>
- </entry>
- <entry>Long</entry>
- <entry>the time (in ms) to retry a connection after failing</entry>
- <entry>2000</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.retry-interval-multiplier">
- <link linkend="client-reconnection">connection-factory.retry-interval-multiplier</link>
- </entry>
- <entry>Double</entry>
- <entry>multiplier to apply to successive retry intervals</entry>
- <entry>1.0</entry>
- </row>
- <row>
- <entry><link linkend="client-reconnection"
- >connection-factory.max-retry-interval</link></entry>
- <entry>Integer</entry>
- <entry>The maximum retry interval in the case a retry-interval-multiplier has been specified</entry>
- <entry>2000</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.scheduled-thread-pool-max-size">
- <link linkend="thread-pooling.client.side">connection-factory.scheduled-thread-pool-max-size</link>
- </entry>
- <entry>Integer</entry>
- <entry>the size of the <emphasis>scheduled thread</emphasis> pool</entry>
- <entry>5</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.thread-pool-max-size">
- <link linkend="thread-pooling.client.side">connection-factory.thread-pool-max-size</link>
- </entry>
- <entry>Integer</entry>
- <entry>the size of the thread pool</entry>
- <entry>-1</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.transaction-batch-size">
- <link linkend="using-jms.txbatchsize">
- connection-factory.transaction-batch-size</link>
- </entry>
- <entry>Integer</entry>
- <entry>the batch size (in bytes) between acknowledgements when using a
- transactional session</entry>
- <entry>1024 * 1024</entry>
- </row>
- <row>
- <entry id="configuration.connection-factory.use-global-pools">
- <link linkend="thread-pooling.client.side">connection-factory.use-global-pools</link>
- </entry>
- <entry>Boolean</entry>
- <entry>whether or not to use a global thread pool for threads</entry>
- <entry>true</entry>
- </row>
- <row>
- <entry><link linkend="using-jms.server.configuration"
- >queue</link></entry>
+ <entry><link linkend="using-jms.server.configuration">queue</link></entry>
<entry>Queue</entry>
<entry>a queue to create and add to JNDI</entry>
<entry/>
</row>
<row>
- <entry><link linkend="using-jms.server.configuration">queue.name
- (attribute)</link></entry>
+ <entry><link linkend="using-jms.server.configuration">queue.name (attribute)</link></entry>
<entry>String</entry>
<entry>unique name of the queue</entry>
<entry/>
</row>
<row>
- <entry><link linkend="using-jms.server.configuration"
- >queue.entry</link></entry>
+ <entry><link linkend="using-jms.server.configuration">queue.entry</link></entry>
<entry>String</entry>
- <entry>context where the queue will be bound in JNDI (there can be
- many)</entry>
+ <entry>context where the queue will be bound in JNDI (there can be many)</entry>
<entry/>
</row>
<row>
- <entry><link linkend="using-jms.server.configuration"
- >queue.durable</link></entry>
+ <entry><link linkend="using-jms.server.configuration">queue.durable</link></entry>
<entry>Boolean</entry>
<entry>is the queue durable?</entry>
<entry>true</entry>
</row>
<row>
- <entry><link linkend="using-jms.server.configuration"
- >queue.filter</link></entry>
+ <entry><link linkend="using-jms.server.configuration">queue.filter</link></entry>
<entry>String</entry>
<entry>optional filter expression for the queue</entry>
<entry/>
</row>
<row>
- <entry><link linkend="using-jms.server.configuration"
- >topic</link></entry>
+ <entry><link linkend="using-jms.server.configuration">topic</link></entry>
<entry>Topic</entry>
<entry>a topic to create and add to JNDI</entry>
<entry/>
</row>
<row>
- <entry><link linkend="using-jms.server.configuration">topic.name
- (attribute)</link></entry>
+ <entry><link linkend="using-jms.server.configuration">topic.name (attribute)</link></entry>
<entry>String</entry>
<entry>unique name of the topic</entry>
<entry/>
</row>
<row>
- <entry><link linkend="using-jms.server.configuration"
- >topic.entry</link></entry>
+ <entry><link linkend="using-jms.server.configuration">topic.entry</link></entry>
<entry>String</entry>
- <entry>context where the topic will be bound in JNDI (there can be
- many)</entry>
+ <entry>context where the topic will be bound in JNDI (there can be many)</entry>
<entry/>
</row>
</tbody>
</tgroup>
- </informaltable>
+ </table>
</section>
<section id="configuration.masked-password">
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/docs/user-manual/en/configuring-transports.xml
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/configuring-transports.xml b/docs/user-manual/en/configuring-transports.xml
index 7ee6c00..7e61d50 100644
--- a/docs/user-manual/en/configuring-transports.xml
+++ b/docs/user-manual/en/configuring-transports.xml
@@ -96,25 +96,16 @@
to other servers. That's defined by <emphasis>connectors</emphasis>.</para>
</listitem>
<listitem>
- <para>If you're using JMS and the server side JMS service to instantiate JMS
- ConnectionFactory instances and bind them in JNDI, then when creating the
- <literal>ActiveMQConnectionFactory</literal> it needs to know what server
- that connection factory will create connections to.</para>
- <para>That's defined by the <literal>connector-ref</literal> element in the <literal
- >activemq-jms.xml</literal> file on the server side. Let's take a look at a
- snipped from a <literal>activemq-jms.xml</literal> file that shows a JMS
- connection factory that references our netty connector defined in our <literal
- >activemq-configuration.xml</literal> file:</para>
+ <para>If you're using JMS and you're using JNDI on the client to look up your JMS connection factory
+ instances then when creating the <literal>ActiveMQConnectionFactory</literal> it needs to know what
+ server that connection factory will create connections to.</para>
+ <para>That's defined by the <literal>java.naming.provider.url</literal> element in the JNDI context
+ environment, e.g. <literal>jndi.properties</literal>. Behind the scenes, the
+ <literal>org.apache.activemq.jndi.ActiveMQInitialContextFactory</literal> uses the
+ <literal>java.naming.provider.url</literal> to construct the transport. Here's a simple example:</para>
<programlisting>
-<connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- <entry name="XAConnectionFactory"/>
- </entries>
-</connection-factory></programlisting>
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://myhost:5445</programlisting>
</listitem>
</itemizedlist>
</section>
@@ -168,7 +159,7 @@ Connection jmsConnection = connectionFactory.createConnection();
etc</programlisting>
</section>
- <section>
+ <section id="configuring-transports.netty">
<title>Configuring the Netty transport</title>
<para>Out of the box, ActiveMQ currently uses <ulink url="http://www.jboss.org/netty/"
>Netty</ulink>, a high performance low level network library.</para>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/docs/user-manual/en/flow-control.xml
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/flow-control.xml b/docs/user-manual/en/flow-control.xml
index 5853f9c..70ab4e2 100644
--- a/docs/user-manual/en/flow-control.xml
+++ b/docs/user-manual/en/flow-control.xml
@@ -111,20 +111,14 @@
</section>
<section>
<title>Using JMS</title>
- <para>if JNDI is used to look up the connection factory, the consumer window size is
- configured in <literal>activemq-jms.xml</literal>:</para>
+ <para>If JNDI is used on the client to instantiate and look up the connection factory the consumer window
+ size is configured in the JNDI context environment, e.g. <literal>jndi.properties</literal>. Here's a
+ simple example using the "ConnectionFactory" connection factory which is available in the context by
+ default:</para>
<programlisting>
-<connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <!-- Set the consumer window size to 0 to have *no* buffer on the client side -->
- <consumer-window-size>0</consumer-window-size>
-</connection-factory></programlisting>
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
+connection.ConnectionFactory.consumerWindowSize=0</programlisting>
<para>If the connection factory is directly instantiated, the consumer window size is
specified by <literal>ActiveMQConnectionFactory.setConsumerWindowSize()</literal>
method.</para>
@@ -153,20 +147,13 @@
</section>
<section>
<title>Using JMS</title>
- <para>If JNDI is used to look up the connection factory, the max rate can be configured
- in <literal>activemq-jms.xml</literal>:</para>
+ <para>If JNDI is used to instantiate and look up the connection factory, the max rate can be configured in
+ the JNDI context environment, e.g. <literal>jndi.properties</literal>. Here's a simple example using the
+ "ConnectionFactory" connection factory which is available in the context by default:</para>
<programlisting>
-<connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- <!-- We limit consumers created on this connection factory to consume messages at a maximum rate
- of 10 messages per sec -->
- <consumer-max-rate>10</consumer-max-rate>
-</connection-factory></programlisting>
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
+connection.ConnectionFactory.consumerMaxRate=10</programlisting>
<para>If the connection factory is directly instantiated, the max rate size can be set
via the <literal>ActiveMQConnectionFactory.setConsumerMaxRate(int
consumerMaxRate)</literal> method.</para>
@@ -208,18 +195,13 @@
</section>
<section>
<title>Using JMS</title>
- <para>If JNDI is used to look up the connection factory, the producer window size can be
- configured in <literal>activemq-jms.xml</literal>:</para>
+ <para>If JNDI is used to instantiate and look up the connection factory, the producer window size can be
+ configured in the JNDI context environment, e.g. <literal>jndi.properties</literal>. Here's a simple
+ example using the "ConnectionFactory" connection factory which is available in the context by default:</para>
<programlisting>
-<connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- <producer-window-size>10</producer-window-size>
-</connection-factory></programlisting>
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
+connection.ConnectionFactory.producerWindowSize=10</programlisting>
<para>If the connection factory is directly instantiated, the producer window size can
be set via the <literal>ActiveMQConnectionFactory.setProducerWindowSize(int
producerWindowSize)</literal> method.</para>
@@ -286,29 +268,22 @@
<section id="flow-control.producer.rate.core.api">
<title>Using Core API</title>
<para>If the ActiveMQ core API is being used the rate can be set via the <literal
- >ServerLocator.setProducerMaxRate(int consumerMaxRate)</literal> method or
+ >ServerLocator.setProducerMaxRate(int producerMaxRate)</literal> method or
alternatively via some of the <literal>ClientSession.createProducer()</literal>
methods. </para>
</section>
<section>
<title>Using JMS</title>
- <para>If JNDI is used to look up the connection factory, the max rate can be configured
- in <literal>activemq-jms.xml</literal>:</para>
+ <para>If JNDI is used to instantiate and look up the connection factory, the max rate size can be
+ configured in the JNDI context environment, e.g. <literal>jndi.properties</literal>. Here's a simple
+ example using the "ConnectionFactory" connection factory which is available in the context by default:</para>
<programlisting>
-<connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- <!-- We limit producers created on this connection factory to produce messages at a maximum rate
- of 10 messages per sec -->
- <producer-max-rate>10</producer-max-rate>
-</connection-factory></programlisting>
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
+connection.ConnectionFactory.producerMaxRate=10</programlisting>
<para>If the connection factory is directly instantiated, the max rate size can be set
via the <literal>ActiveMQConnectionFactory.setProducerMaxRate(int
- consumerMaxRate)</literal> method.</para>
+ producerMaxRate)</literal> method.</para>
</section>
</section>
</section>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/docs/user-manual/en/interoperability.xml
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/interoperability.xml b/docs/user-manual/en/interoperability.xml
index 3c9ceec..f3f3bdd 100644
--- a/docs/user-manual/en/interoperability.xml
+++ b/docs/user-manual/en/interoperability.xml
@@ -229,9 +229,8 @@ hq-message-id : STOMP12345</programlisting>
<para>Stomp requires the file <literal>jndi.properties</literal> to be available on the
classpath. This should look something like:</para>
<programlisting>
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces</programlisting>
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory</programlisting>
+ <para>Configure any required JNDI resources in this file according to the documentation.</para>
<para>Make sure this file is in the classpath along with the StompConnect jar and the
ActiveMQ jars and simply run <literal>java org.codehaus.stomp.jms.Main</literal>.</para>
</section>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/docs/user-manual/en/large-messages.xml
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/large-messages.xml b/docs/user-manual/en/large-messages.xml
index 42b18d2..43bc2a8 100644
--- a/docs/user-manual/en/large-messages.xml
+++ b/docs/user-manual/en/large-messages.xml
@@ -83,21 +83,14 @@ ClientSessionFactory factory = ActiveMQClient.createClientSessionFactory();</pro
</section>
<section>
<title>Using JMS</title>
- <para>If JNDI is used to look up the connection factory, the minimum large message size
- is specified in <literal>activemq-jms.xml</literal></para>
- <programlisting>...
-<connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- <entry name="XAConnectionFactory"/>
- </entries>
-
- <min-large-message-size>250000</min-large-message-size>
-</connection-factory>
-...</programlisting>
+ <para>If JNDI is used to instantiate and look up the connection factory, the minimum large message size
+ is configured in the JNDI context environment, e.g. <literal>jndi.properties</literal>. Here's a simple
+ example using the "ConnectionFactory" connection factory which is available in the context by default:</para>
+ <programlisting>
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
+connection.ConnectionFactory.minLargeMessageSize=250000
+ </programlisting>
<para>If the connection factory is being instantiated directly, the minimum large
message size is specified by <literal
>ActiveMQConnectionFactory.setMinLargeMessageSize</literal>.</para>
@@ -121,17 +114,13 @@ ClientSessionFactory factory = ActiveMQClient.createClientSessionFactory();</pro
data directory, thus reducing the disk I/O.</para>
</section>
<section>
- <para>If you use JMS, you can achieve large messages compression by configuring your
- connection factories. For example,</para>
- <programlisting>...
-<connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
-...
- <compress-large-messages>true</compress-large-messages>
-</connection-factory>
-...</programlisting>
+ <para>If JNDI is used to instantiate and look up the connection factory, large message compression can be
+ configured in the JNDI context environment, e.g. <literal>jndi.properties</literal>. Here's a simple
+ example using the "ConnectionFactory" connection factory which is available in the context by default:</para>
+ <programlisting>
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
+connection.ConnectionFactory.compressLargeMessages=true</programlisting>
</section>
</section>
</section>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/docs/user-manual/en/logging.xml
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/logging.xml b/docs/user-manual/en/logging.xml
index 27b4bfa..8277b55 100644
--- a/docs/user-manual/en/logging.xml
+++ b/docs/user-manual/en/logging.xml
@@ -69,22 +69,10 @@
<section>
<title>Logging in a client or with an Embedded server</title>
<para>
- Firstly, if you want to enable logging on the client side you need to include the jboss logging jars in your library.
- If you are using the distribution make sure the jnp-client.jar is included or if you are using maven add the following
- dependencies.
+ Firstly, if you want to enable logging on the client side you need to include the JBoss logging jars in your library.
+ If you are using maven add the following dependencies.
<programlisting>
<dependency>
-<groupId>org.jboss.naming</groupId>
-<artifactId>jnp-client</artifactId>
-<version>5.0.5.Final</version>
- <exclusions>
- <exclusion>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- </exclusion>
- </exclusions>
-</dependency>
-<dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>jboss-logmanager</artifactId>
<version>1.3.1.Final</version>
@@ -94,8 +82,6 @@
<artifactId>activemq-core-client</artifactId>
<version>2.3.0.Final</version>
</dependency></programlisting>
- The first dependency <literal>jnp-client</literal> is not actually needed for logging, however this is needed for
- using JNDI and imports a previous version JBoss logging which needs to be excluded
</para>
<para>
There are 2 properties you need to set when starting your java program, the first is to set the Log Manager to use
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/docs/user-manual/en/message-grouping.xml
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/message-grouping.xml b/docs/user-manual/en/message-grouping.xml
index b371897..6ed962b 100644
--- a/docs/user-manual/en/message-grouping.xml
+++ b/docs/user-manual/en/message-grouping.xml
@@ -77,34 +77,23 @@
message = ...
message.setStringProperty("JMSXGroupID", "Group-0");
producer.send(message);</programlisting>
- <para>Alternatively, you can set <literal>autogroup</literal> to true on the <literal
- >ActiveMQConnectonFactory</literal> which will pick a random unique id. This can also be
- set in the <literal>activemq-jms.xml</literal> file like this:</para>
+ <para>Alternatively, you can set <literal>autogroup</literal> to true on the
+ <literal>ActiveMQConnectonFactory</literal> which will pick a random unique id. This can also be set in the
+ JNDI context environment, e.g. <literal>jndi.properties</literal>. Here's a simple example using the
+ "ConnectionFactory" connection factory which is available in the context by default</para>
<programlisting>
-<connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- <autogroup>true</autogroup>
-</connection-factory></programlisting>
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
+connection.ConnectionFactory.autoGroup=true</programlisting>
<para>Alternatively you can set the group id via the connection factory. All messages sent
with producers created via this connection factory will set the <literal
- >JMSXGroupID</literal> to the specified value on all messages sent. To configure the
- group id set it on the connection factory in the <literal>activemq-jms.xml</literal> config
- file as follows
+ >JMSXGroupID</literal> to the specified value on all messages sent. This can also be set in the
+ JNDI context environment, e.g. <literal>jndi.properties</literal>. Here's a simple example using the
+ "ConnectionFactory" connection factory which is available in the context by default:</para>
<programlisting>
-<connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- <group-id>Group-0</group-id>
-</connection-factory></programlisting></para>
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
+connection.ConnectionFactory.groupID=Group-0</programlisting>
</section>
<section>
<title>Example</title>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/docs/user-manual/en/pre-acknowledge.xml
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/pre-acknowledge.xml b/docs/user-manual/en/pre-acknowledge.xml
index 77e2128..d8eec48 100644
--- a/docs/user-manual/en/pre-acknowledge.xml
+++ b/docs/user-manual/en/pre-acknowledge.xml
@@ -57,18 +57,12 @@
</note>
<section id="pre-acknowledge.configure">
<title>Using PRE_ACKNOWLEDGE</title>
- <para>This can be configured in the <literal>activemq-jms.xml</literal> file on the <literal
- >connection factory</literal> like this:</para>
+ <para>This can be configured in a client's JNDI context environment, e.g. <literal>jndi.properties</literal>,
+ like this:</para>
<programlisting>
-<connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- <pre-acknowledge>true</pre-acknowledge>
-</connection-factory></programlisting>
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
+connection.ConnectionFactory.preAcknowledge=true</programlisting>
<para>Alternatively, to use pre-acknowledgement mode using the JMS API, create a JMS Session
with the <literal>ActiveMQSession.PRE_ACKNOWLEDGE</literal> constant.</para>
<programlisting>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/docs/user-manual/en/spring-integration.xml
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/spring-integration.xml b/docs/user-manual/en/spring-integration.xml
index a929a67..b516871 100644
--- a/docs/user-manual/en/spring-integration.xml
+++ b/docs/user-manual/en/spring-integration.xml
@@ -40,20 +40,9 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="in-vm"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration></programlisting>
<para>Here we've specified a
<literal>javax.jms.ConnectionFactory</literal> we want bound to a
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/docs/user-manual/en/thread-pooling.xml
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/thread-pooling.xml b/docs/user-manual/en/thread-pooling.xml
index 074fa22..85a3189 100644
--- a/docs/user-manual/en/thread-pooling.xml
+++ b/docs/user-manual/en/thread-pooling.xml
@@ -137,20 +137,14 @@ myFactory.setThreadPoolMaxSize(-1); </programlisting>
<programlisting>
ConnectionFactory myConnectionFactory = ActiveMQJMSClient.createConnectionFactory(myFactory);</programlisting>
<para>If you're using JNDI to instantiate <literal>ActiveMQConnectionFactory</literal>
- instances, you can also set these parameters in the <literal>activemq-jms.xml</literal>
- file where you describe your connection factory, for example:</para>
+ instances, you can also set these parameters in the JNDI context environment, e.g.
+ <literal>jndi.properties</literal>. Here's a simple example using the "ConnectionFactory" connection
+ factory which is available in the context by default:</para>
<programlisting>
-<connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- <entry name="XAConnectionFactory"/>
- </entries>
- <use-global-pools>false</use-global-pools>
- <scheduled-thread-pool-max-size>10</scheduled-thread-pool-max-size>
- <thread-pool-max-size>-1</thread-pool-max-size>
-</connection-factory></programlisting>
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
+connection.ConnectionFactory.useGlobalPools=false
+connection.ConnectionFactory.scheduledThreadPoolMaxSize=10
+connection.ConnectionFactory.threadPoolMaxSize=-1</programlisting>
</section>
</chapter>
[04/13] activemq-6 git commit: ACTIVEMQ6-14 Replace JNDI server with
client impl
Posted by cl...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/reattach-node/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/reattach-node/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/reattach-node/src/main/resources/hornetq/server0/activemq-jms.xml
index c24e03b..847659f 100644
--- a/examples/jms/reattach-node/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/reattach-node/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,51 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
-
- <!--the connection factories used by the example-->
-
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
-
- <!-- When the server is cleanly shutdown we don't want to give up, we want to continue
- to try to reconnect -->
- <failover-on-server-shutdown>true</failover-on-server-shutdown>
-
- <!-- We need to specify a confirmation-window-size to enable re-attachment, default is -1 which
- means no re-attachment -->
- <confirmation-window-size>1048576</confirmation-window-size>
-
- </connection-factory>
-
- <!-- This is used by the example to send the management operations, it's not central to the example -->
- <connection-factory name="ConnectionFactory2">
- <connectors>
- <connector-ref connector-name="netty-connector2"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory2"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/replicated-failback-static/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback-static/pom.xml b/examples/jms/replicated-failback-static/pom.xml
index 6617de1..631b40f 100644
--- a/examples/jms/replicated-failback-static/pom.xml
+++ b/examples/jms/replicated-failback-static/pom.xml
@@ -79,8 +79,8 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ReplicatedFailbackStaticExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
</args>
<systemProperties>
<property>
@@ -145,11 +145,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/replicated-failback-static/src/main/java/org/apache/activemq/jms/example/ReplicatedFailbackStaticExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback-static/src/main/java/org/apache/activemq/jms/example/ReplicatedFailbackStaticExample.java b/examples/jms/replicated-failback-static/src/main/java/org/apache/activemq/jms/example/ReplicatedFailbackStaticExample.java
index d9220b9..73edb7e 100644
--- a/examples/jms/replicated-failback-static/src/main/java/org/apache/activemq/jms/example/ReplicatedFailbackStaticExample.java
+++ b/examples/jms/replicated-failback-static/src/main/java/org/apache/activemq/jms/example/ReplicatedFailbackStaticExample.java
@@ -58,8 +58,8 @@ public class ReplicatedFailbackStaticExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Look up the JMS resources from JNDI
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
- ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
+ ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 3. Create a JMS Connection
connection = connectionFactory.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/replicated-failback-static/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback-static/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/replicated-failback-static/src/main/resources/hornetq/server0/activemq-jms.xml
index 889b59d..0d5c953 100644
--- a/examples/jms/replicated-failback-static/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/replicated-failback-static/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,33 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
-
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
-
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/replicated-failback-static/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback-static/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/replicated-failback-static/src/main/resources/hornetq/server1/activemq-jms.xml
index c3b0393..0d5c953 100644
--- a/examples/jms/replicated-failback-static/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/replicated-failback-static/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,32 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
-
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/replicated-failback/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/pom.xml b/examples/jms/replicated-failback/pom.xml
index 570e4d8..1aa611d 100644
--- a/examples/jms/replicated-failback/pom.xml
+++ b/examples/jms/replicated-failback/pom.xml
@@ -79,8 +79,8 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ReplicatedFailbackExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
</args>
<systemProperties>
<property>
@@ -145,11 +145,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/replicated-failback/src/main/java/org/apache/activemq/jms/example/ReplicatedFailbackExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/java/org/apache/activemq/jms/example/ReplicatedFailbackExample.java b/examples/jms/replicated-failback/src/main/java/org/apache/activemq/jms/example/ReplicatedFailbackExample.java
index 7105a35..d216f0f 100644
--- a/examples/jms/replicated-failback/src/main/java/org/apache/activemq/jms/example/ReplicatedFailbackExample.java
+++ b/examples/jms/replicated-failback/src/main/java/org/apache/activemq/jms/example/ReplicatedFailbackExample.java
@@ -58,8 +58,8 @@ public class ReplicatedFailbackExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Look up the JMS resources from JNDI
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
- ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
+ ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 3. Create a JMS Connection
connection = connectionFactory.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/replicated-failback/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/replicated-failback/src/main/resources/hornetq/server0/activemq-jms.xml
index 889b59d..0d5c953 100644
--- a/examples/jms/replicated-failback/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/replicated-failback/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,33 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
-
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
-
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/replicated-failback/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-failback/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/replicated-failback/src/main/resources/hornetq/server1/activemq-jms.xml
index c3b0393..0d5c953 100644
--- a/examples/jms/replicated-failback/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/replicated-failback/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,32 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
-
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/replicated-multiple-failover/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/pom.xml b/examples/jms/replicated-multiple-failover/pom.xml
index e6c503a..1afd8ab 100644
--- a/examples/jms/replicated-multiple-failover/pom.xml
+++ b/examples/jms/replicated-multiple-failover/pom.xml
@@ -101,9 +101,9 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ReplicatedMultipleFailoverExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
- <param>jnp://localhost:1299</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
+ <param>tcp://localhost:5447</param>
</args>
<systemProperties>
<property>
@@ -177,11 +177,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/replicated-multiple-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedMultipleFailoverExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedMultipleFailoverExample.java b/examples/jms/replicated-multiple-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedMultipleFailoverExample.java
index 0512690..5ca8ffb 100644
--- a/examples/jms/replicated-multiple-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedMultipleFailoverExample.java
+++ b/examples/jms/replicated-multiple-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedMultipleFailoverExample.java
@@ -55,8 +55,8 @@ public class ReplicatedMultipleFailoverExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Look up the JMS resources from JNDI
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
- ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
+ ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 3. Create a JMS Connection
connection = connectionFactory.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server0/activemq-jms.xml
index 889b59d..0d5c953 100644
--- a/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,33 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
-
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
-
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server1/activemq-jms.xml
index c3b0393..0d5c953 100644
--- a/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,32 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
-
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server2/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server2/activemq-jms.xml b/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server2/activemq-jms.xml
index 41d711b..0d5c953 100644
--- a/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server2/activemq-jms.xml
+++ b/examples/jms/replicated-multiple-failover/src/main/resources/hornetq/server2/activemq-jms.xml
@@ -1,32 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
-
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/replicated-transaction-failover/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-transaction-failover/pom.xml b/examples/jms/replicated-transaction-failover/pom.xml
index 02f9ea8..5d1dc03 100644
--- a/examples/jms/replicated-transaction-failover/pom.xml
+++ b/examples/jms/replicated-transaction-failover/pom.xml
@@ -79,8 +79,8 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ReplicatedTransactionFailoverExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
</args>
<systemProperties>
<property>
@@ -145,11 +145,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/replicated-transaction-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedTransactionFailoverExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-transaction-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedTransactionFailoverExample.java b/examples/jms/replicated-transaction-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedTransactionFailoverExample.java
index 3d2912e..fe0e9d1 100644
--- a/examples/jms/replicated-transaction-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedTransactionFailoverExample.java
+++ b/examples/jms/replicated-transaction-failover/src/main/java/org/apache/activemq/jms/example/ReplicatedTransactionFailoverExample.java
@@ -57,8 +57,8 @@ public class ReplicatedTransactionFailoverExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Look-up the JMS resources from JNDI
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
- ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
+ ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 3. We create a JMS Connection
connection = connectionFactory.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server0/activemq-jms.xml
index a4c9e68..0d5c953 100644
--- a/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,31 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server1/activemq-jms.xml
index a4c9e68..0d5c953 100644
--- a/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/replicated-transaction-failover/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,31 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/request-reply/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/request-reply/pom.xml b/examples/jms/request-reply/pom.xml
index 3c50986..72fcd0a 100644
--- a/examples/jms/request-reply/pom.xml
+++ b/examples/jms/request-reply/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.RequestReplyExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/request-reply/src/main/java/org/apache/activemq/jms/example/RequestReplyExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/request-reply/src/main/java/org/apache/activemq/jms/example/RequestReplyExample.java b/examples/jms/request-reply/src/main/java/org/apache/activemq/jms/example/RequestReplyExample.java
index a020f00..cd73411 100644
--- a/examples/jms/request-reply/src/main/java/org/apache/activemq/jms/example/RequestReplyExample.java
+++ b/examples/jms/request-reply/src/main/java/org/apache/activemq/jms/example/RequestReplyExample.java
@@ -70,10 +70,10 @@ public class RequestReplyExample extends ActiveMQExample
initialContext = getContext(0);
// Step 3. Lookup the queue for sending the request message
- Queue requestQueue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue requestQueue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 4. Lookup for the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 5. Create a JMS Connection
connection = cf.createConnection();
@@ -165,10 +165,10 @@ public class RequestReplyExample extends ActiveMQExample
InitialContext initialContext = getContext(0);
// Lookup the queue to receive the request message
- Queue requestQueue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue requestQueue = (Queue)initialContext.lookup("queue/exampleQueue");
// Lookup for the Connection Factory
- ConnectionFactory cfact = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cfact = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Create a connection
connection = cfact.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/request-reply/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/request-reply/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/request-reply/src/main/resources/hornetq/server0/activemq-jms.xml
index 452b958..847659f 100644
--- a/examples/jms/request-reply/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/request-reply/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/rest/dup-send/src/main/resources/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/rest/dup-send/src/main/resources/activemq-jms.xml b/examples/jms/rest/dup-send/src/main/resources/activemq-jms.xml
index 873f44c..1dd3114 100644
--- a/examples/jms/rest/dup-send/src/main/resources/activemq-jms.xml
+++ b/examples/jms/rest/dup-send/src/main/resources/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="in-vm"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="orders">
- <entry name="/queues/orders"/>
- </queue>
+ <queue name="orders"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/rest/javascript-chat/src/main/resources/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/rest/javascript-chat/src/main/resources/activemq-jms.xml b/examples/jms/rest/javascript-chat/src/main/resources/activemq-jms.xml
index 03f0a97..b19f027 100644
--- a/examples/jms/rest/javascript-chat/src/main/resources/activemq-jms.xml
+++ b/examples/jms/rest/javascript-chat/src/main/resources/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="in-vm"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <topic name="chat">
- <entry name="/topic/chat"/>
- </topic>
+ <topic name="chat"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/rest/jms-to-rest/src/main/resources/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/rest/jms-to-rest/src/main/resources/activemq-jms.xml b/examples/jms/rest/jms-to-rest/src/main/resources/activemq-jms.xml
index 873f44c..1dd3114 100644
--- a/examples/jms/rest/jms-to-rest/src/main/resources/activemq-jms.xml
+++ b/examples/jms/rest/jms-to-rest/src/main/resources/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="in-vm"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="orders">
- <entry name="/queues/orders"/>
- </queue>
+ <queue name="orders"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/rest/push/src/main/resources/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/rest/push/src/main/resources/activemq-jms.xml b/examples/jms/rest/push/src/main/resources/activemq-jms.xml
index e4ade20..1814447 100644
--- a/examples/jms/rest/push/src/main/resources/activemq-jms.xml
+++ b/examples/jms/rest/push/src/main/resources/activemq-jms.xml
@@ -1,22 +1,9 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="in-vm"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
- <!--the queue used by the example-->
- <queue name="orders">
- <entry name="/queues/orders"/>
- </queue>
- <queue name="shipping">
- <entry name="/queues/shipping"/>
- </queue>
+ <!--the queues used by the example-->
+ <queue name="orders"/>
+ <queue name="shipping"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/scale-down/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scale-down/pom.xml b/examples/jms/scale-down/pom.xml
index 4264551..f9a23af 100644
--- a/examples/jms/scale-down/pom.xml
+++ b/examples/jms/scale-down/pom.xml
@@ -71,8 +71,8 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ScaleDownExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
</args>
<systemProperties>
<property>
@@ -137,11 +137,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/scale-down/src/main/java/org/apache/activemq/jms/example/ScaleDownExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/scale-down/src/main/java/org/apache/activemq/jms/example/ScaleDownExample.java b/examples/jms/scale-down/src/main/java/org/apache/activemq/jms/example/ScaleDownExample.java
index ad9f48e..d942b79 100644
--- a/examples/jms/scale-down/src/main/java/org/apache/activemq/jms/example/ScaleDownExample.java
+++ b/examples/jms/scale-down/src/main/java/org/apache/activemq/jms/example/ScaleDownExample.java
@@ -56,9 +56,9 @@ public class ScaleDownExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Look up the JMS resources from JNDI
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
- ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
- ConnectionFactory connectionFactory1 = (ConnectionFactory)initialContext1.lookup("/ConnectionFactory");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
+ ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
+ ConnectionFactory connectionFactory1 = (ConnectionFactory)initialContext1.lookup("ConnectionFactory");
// Step 3. Create a JMS Connections
connection = connectionFactory.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/scale-down/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scale-down/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/scale-down/src/main/resources/hornetq/server0/activemq-jms.xml
index 2bf8233..847659f 100644
--- a/examples/jms/scale-down/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/scale-down/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,30 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/scale-down/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scale-down/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/scale-down/src/main/resources/hornetq/server1/activemq-jms.xml
index 2bf8233..847659f 100644
--- a/examples/jms/scale-down/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/scale-down/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,30 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/scheduled-message/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scheduled-message/pom.xml b/examples/jms/scheduled-message/pom.xml
index ba480a8..83f1a67 100644
--- a/examples/jms/scheduled-message/pom.xml
+++ b/examples/jms/scheduled-message/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ScheduledMessageExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/scheduled-message/src/main/java/org/apache/activemq/jms/example/ScheduledMessageExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/scheduled-message/src/main/java/org/apache/activemq/jms/example/ScheduledMessageExample.java b/examples/jms/scheduled-message/src/main/java/org/apache/activemq/jms/example/ScheduledMessageExample.java
index 2211aad..92ece47 100644
--- a/examples/jms/scheduled-message/src/main/java/org/apache/activemq/jms/example/ScheduledMessageExample.java
+++ b/examples/jms/scheduled-message/src/main/java/org/apache/activemq/jms/example/ScheduledMessageExample.java
@@ -54,10 +54,10 @@ public class ScheduledMessageExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perfom a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4.Create a JMS Connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/scheduled-message/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scheduled-message/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/scheduled-message/src/main/resources/hornetq/server0/activemq-jms.xml
index 452b958..847659f 100644
--- a/examples/jms/scheduled-message/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/scheduled-message/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/security/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/security/pom.xml b/examples/jms/security/pom.xml
index d943938..8eb47f8 100644
--- a/examples/jms/security/pom.xml
+++ b/examples/jms/security/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.SecurityExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/security/src/main/java/org/apache/activemq/jms/example/SecurityExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/security/src/main/java/org/apache/activemq/jms/example/SecurityExample.java b/examples/jms/security/src/main/java/org/apache/activemq/jms/example/SecurityExample.java
index 45375e0..9a699fb 100644
--- a/examples/jms/security/src/main/java/org/apache/activemq/jms/example/SecurityExample.java
+++ b/examples/jms/security/src/main/java/org/apache/activemq/jms/example/SecurityExample.java
@@ -58,12 +58,12 @@ public class SecurityExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. perform lookup on the topics
- Topic genericTopic = (Topic)initialContext.lookup("/topic/genericTopic");
- Topic europeTopic = (Topic)initialContext.lookup("/topic/europeTopic");
- Topic usTopic = (Topic)initialContext.lookup("/topic/usTopic");
+ Topic genericTopic = (Topic)initialContext.lookup("topic/genericTopic");
+ Topic europeTopic = (Topic)initialContext.lookup("topic/europeTopic");
+ Topic usTopic = (Topic)initialContext.lookup("topic/usTopic");
// Step 3. perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. Try to create a JMS Connection without user/password. It will fail.
try
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/security/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/security/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/security/src/main/resources/hornetq/server0/activemq-jms.xml
index d2d6100..74a9f79 100644
--- a/examples/jms/security/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/security/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,28 +1,11 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <block-on-durable-send>true</block-on-durable-send>
- <block-on-non-durable-send>true</block-on-non-durable-send>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
- <topic name="genericTopic">
- <entry name="/topic/genericTopic"/>
- </topic>
+ <topic name="genericTopic"/>
- <topic name="news.europe.europeTopic">
- <entry name="/topic/europeTopic"/>
- </topic>
+ <topic name="news.europe.europeTopic"/>
- <topic name="news.us.usTopic">
- <entry name="/topic/usTopic"/>
- </topic>
+ <topic name="news.us.usTopic"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/send-acknowledgements/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/send-acknowledgements/pom.xml b/examples/jms/send-acknowledgements/pom.xml
index 07485c6..9a766ca 100644
--- a/examples/jms/send-acknowledgements/pom.xml
+++ b/examples/jms/send-acknowledgements/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.SendAcknowledgementsExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/send-acknowledgements/src/main/java/org/apache/activemq/jms/example/SendAcknowledgementsExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/send-acknowledgements/src/main/java/org/apache/activemq/jms/example/SendAcknowledgementsExample.java b/examples/jms/send-acknowledgements/src/main/java/org/apache/activemq/jms/example/SendAcknowledgementsExample.java
index a0dc06b..31c284e 100644
--- a/examples/jms/send-acknowledgements/src/main/java/org/apache/activemq/jms/example/SendAcknowledgementsExample.java
+++ b/examples/jms/send-acknowledgements/src/main/java/org/apache/activemq/jms/example/SendAcknowledgementsExample.java
@@ -58,10 +58,10 @@ public class SendAcknowledgementsExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perfom a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. Create a JMS Connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/send-acknowledgements/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/send-acknowledgements/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/send-acknowledgements/src/main/resources/hornetq/server0/activemq-jms.xml
index 6bbe84e..0d5c953 100644
--- a/examples/jms/send-acknowledgements/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/send-acknowledgements/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,20 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- <confirmation-window-size>1048576</confirmation-window-size>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/spring-integration/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/spring-integration/pom.xml b/examples/jms/spring-integration/pom.xml
index b0ec32c..22db0f2 100644
--- a/examples/jms/spring-integration/pom.xml
+++ b/examples/jms/spring-integration/pom.xml
@@ -47,7 +47,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.SpringExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -88,11 +88,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/spring-integration/src/main/resources/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/spring-integration/src/main/resources/activemq-jms.xml b/examples/jms/spring-integration/src/main/resources/activemq-jms.xml
index bce97ab..3758989 100644
--- a/examples/jms/spring-integration/src/main/resources/activemq-jms.xml
+++ b/examples/jms/spring-integration/src/main/resources/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="in-vm"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/ssl-enabled/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ssl-enabled/pom.xml b/examples/jms/ssl-enabled/pom.xml
index 8ff5d64..8fe2534 100644
--- a/examples/jms/ssl-enabled/pom.xml
+++ b/examples/jms/ssl-enabled/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.SSLExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/ssl-enabled/src/main/java/org/apache/activemq/jms/example/SSLExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/ssl-enabled/src/main/java/org/apache/activemq/jms/example/SSLExample.java b/examples/jms/ssl-enabled/src/main/java/org/apache/activemq/jms/example/SSLExample.java
index 520ba7f..e025afd 100644
--- a/examples/jms/ssl-enabled/src/main/java/org/apache/activemq/jms/example/SSLExample.java
+++ b/examples/jms/ssl-enabled/src/main/java/org/apache/activemq/jms/example/SSLExample.java
@@ -50,10 +50,10 @@ public class SSLExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perfom a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4.Create a JMS Connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/ssl-enabled/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ssl-enabled/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/ssl-enabled/src/main/resources/hornetq/server0/activemq-jms.xml
index cc01481..0d5c953 100644
--- a/examples/jms/ssl-enabled/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/ssl-enabled/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-ssl-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/static-selector-jms/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector-jms/pom.xml b/examples/jms/static-selector-jms/pom.xml
index f687e76..ba5cd8a 100644
--- a/examples/jms/static-selector-jms/pom.xml
+++ b/examples/jms/static-selector-jms/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.StaticSelectorJMSExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/static-selector-jms/src/main/java/org/apache/activemq/jms/example/StaticSelectorJMSExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector-jms/src/main/java/org/apache/activemq/jms/example/StaticSelectorJMSExample.java b/examples/jms/static-selector-jms/src/main/java/org/apache/activemq/jms/example/StaticSelectorJMSExample.java
index cba4367..7b976e4 100644
--- a/examples/jms/static-selector-jms/src/main/java/org/apache/activemq/jms/example/StaticSelectorJMSExample.java
+++ b/examples/jms/static-selector-jms/src/main/java/org/apache/activemq/jms/example/StaticSelectorJMSExample.java
@@ -55,10 +55,10 @@ public class StaticSelectorJMSExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. look-up the JMS queue object from JNDI, this is the queue that has filter configured with it.
- Queue queue = (Queue)initialContext.lookup("/queue/selectorQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. look-up the JMS connection factory object from JNDI
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. Create a JMS Connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/static-selector-jms/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector-jms/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/static-selector-jms/src/main/resources/hornetq/server0/activemq-jms.xml
index aa9dbf4..c618cfb 100644
--- a/examples/jms/static-selector-jms/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/static-selector-jms/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,9 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="selectorQueue">
- <entry name="/queue/selectorQueue"/>
+ <queue name="exampleQueue">
<selector string="color='red'"/>
</queue>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/static-selector/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector/pom.xml b/examples/jms/static-selector/pom.xml
index b8019cf..a8a3f37 100644
--- a/examples/jms/static-selector/pom.xml
+++ b/examples/jms/static-selector/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.StaticSelectorExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/static-selector/src/main/java/org/apache/activemq/jms/example/StaticSelectorExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector/src/main/java/org/apache/activemq/jms/example/StaticSelectorExample.java b/examples/jms/static-selector/src/main/java/org/apache/activemq/jms/example/StaticSelectorExample.java
index cc23297..11cc7b3 100644
--- a/examples/jms/static-selector/src/main/java/org/apache/activemq/jms/example/StaticSelectorExample.java
+++ b/examples/jms/static-selector/src/main/java/org/apache/activemq/jms/example/StaticSelectorExample.java
@@ -55,10 +55,10 @@ public class StaticSelectorExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. look-up the JMS queue object from JNDI, this is the queue that has filter configured with it.
- Queue queue = (Queue)initialContext.lookup("/queue/selectorQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. look-up the JMS connection factory object from JNDI
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. Create a JMS Connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/static-selector/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/static-selector/src/main/resources/hornetq/server0/activemq-jms.xml
index 1bf18ff..847659f 100644
--- a/examples/jms/static-selector/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/static-selector/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="selectorQueue">
- <entry name="/queue/selectorQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/stomp-websockets/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp-websockets/pom.xml b/examples/jms/stomp-websockets/pom.xml
index cae3206..3d56027 100644
--- a/examples/jms/stomp-websockets/pom.xml
+++ b/examples/jms/stomp-websockets/pom.xml
@@ -47,7 +47,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.StompWebSocketExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
<systemProperties>
<property>
@@ -108,11 +108,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/stomp-websockets/src/main/java/org/apache/activemq/jms/example/StompWebSocketExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/stomp-websockets/src/main/java/org/apache/activemq/jms/example/StompWebSocketExample.java b/examples/jms/stomp-websockets/src/main/java/org/apache/activemq/jms/example/StompWebSocketExample.java
index 51bdb82..dac21d9 100644
--- a/examples/jms/stomp-websockets/src/main/java/org/apache/activemq/jms/example/StompWebSocketExample.java
+++ b/examples/jms/stomp-websockets/src/main/java/org/apache/activemq/jms/example/StompWebSocketExample.java
@@ -50,8 +50,8 @@ public class StompWebSocketExample extends ActiveMQExample
try
{
initialContext = getContext(0);
- Topic topic = (Topic)initialContext.lookup("/topic/chat");
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ Topic topic = (Topic)initialContext.lookup("topic/chat");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
connection = cf.createConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/stomp-websockets/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp-websockets/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/stomp-websockets/src/main/resources/hornetq/server0/activemq-jms.xml
index c872ad6..048f5d2 100644
--- a/examples/jms/stomp-websockets/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/stomp-websockets/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the topic used by the example-->
- <topic name="chat">
- <entry name="/topic/chat"/>
- </topic>
+ <topic name="chat"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/stomp/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp/pom.xml b/examples/jms/stomp/pom.xml
index 61e4535..ebf7049 100644
--- a/examples/jms/stomp/pom.xml
+++ b/examples/jms/stomp/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.StompExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -104,11 +104,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/stomp/src/main/java/org/apache/activemq/jms/example/StompExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/stomp/src/main/java/org/apache/activemq/jms/example/StompExample.java b/examples/jms/stomp/src/main/java/org/apache/activemq/jms/example/StompExample.java
index 0b2c59a..a27ae30 100644
--- a/examples/jms/stomp/src/main/java/org/apache/activemq/jms/example/StompExample.java
+++ b/examples/jms/stomp/src/main/java/org/apache/activemq/jms/example/StompExample.java
@@ -91,8 +91,8 @@ public class StompExample extends ActiveMQExample
initialContext = getContext(0);
// Step 7. Perform a lookup on the queue and the connection factory
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 8.Create a JMS Connection, Session and a MessageConsumer on the queue
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/stomp/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/stomp/src/main/resources/hornetq/server0/activemq-jms.xml
index 3058fc8..0d5c953 100644
--- a/examples/jms/stomp/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/stomp/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/stomp1.1/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.1/pom.xml b/examples/jms/stomp1.1/pom.xml
index 71ace4a..251f5c8 100644
--- a/examples/jms/stomp1.1/pom.xml
+++ b/examples/jms/stomp1.1/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.StompExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -104,11 +104,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/stomp1.1/src/main/java/org/apache/activemq/jms/example/StompExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.1/src/main/java/org/apache/activemq/jms/example/StompExample.java b/examples/jms/stomp1.1/src/main/java/org/apache/activemq/jms/example/StompExample.java
index 06f6bff..35309c0 100644
--- a/examples/jms/stomp1.1/src/main/java/org/apache/activemq/jms/example/StompExample.java
+++ b/examples/jms/stomp1.1/src/main/java/org/apache/activemq/jms/example/StompExample.java
@@ -98,8 +98,8 @@ public class StompExample extends ActiveMQExample
initialContext = getContext(0);
// Step 7. Perform a lookup on the queue and the connection factory
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 8.Create a JMS Connection, Session and a MessageConsumer on the queue
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/stomp1.1/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.1/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/stomp1.1/src/main/resources/hornetq/server0/activemq-jms.xml
index 3058fc8..0d5c953 100644
--- a/examples/jms/stomp1.1/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/stomp1.1/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/stomp1.2/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.2/pom.xml b/examples/jms/stomp1.2/pom.xml
index 8e658eb..1876e38 100644
--- a/examples/jms/stomp1.2/pom.xml
+++ b/examples/jms/stomp1.2/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.StompExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -104,11 +104,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/stomp1.2/src/main/java/org/apache/activemq/jms/example/StompExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.2/src/main/java/org/apache/activemq/jms/example/StompExample.java b/examples/jms/stomp1.2/src/main/java/org/apache/activemq/jms/example/StompExample.java
index 8885328..7b21107 100644
--- a/examples/jms/stomp1.2/src/main/java/org/apache/activemq/jms/example/StompExample.java
+++ b/examples/jms/stomp1.2/src/main/java/org/apache/activemq/jms/example/StompExample.java
@@ -97,8 +97,8 @@ public class StompExample extends ActiveMQExample
initialContext = getContext(0);
// Step 7. Perform a lookup on the queue and the connection factory
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 8.Create a JMS Connection, Session and a MessageConsumer on the queue
connection = cf.createConnection();
[03/13] activemq-6 git commit: ACTIVEMQ6-14 Replace JNDI server with
client impl
Posted by cl...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/stomp1.2/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.2/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/stomp1.2/src/main/resources/hornetq/server0/activemq-jms.xml
index 3058fc8..0d5c953 100644
--- a/examples/jms/stomp1.2/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/stomp1.2/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/stop-server-failover/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stop-server-failover/pom.xml b/examples/jms/stop-server-failover/pom.xml
index 776da95..366ebfc 100644
--- a/examples/jms/stop-server-failover/pom.xml
+++ b/examples/jms/stop-server-failover/pom.xml
@@ -79,8 +79,8 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.StopServerFailoverExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
</args>
<systemProperties>
<property>
@@ -145,11 +145,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/stop-server-failover/src/main/java/org/apache/activemq/jms/example/StopServerFailoverExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/stop-server-failover/src/main/java/org/apache/activemq/jms/example/StopServerFailoverExample.java b/examples/jms/stop-server-failover/src/main/java/org/apache/activemq/jms/example/StopServerFailoverExample.java
index 4a90ee3..e5e6691 100644
--- a/examples/jms/stop-server-failover/src/main/java/org/apache/activemq/jms/example/StopServerFailoverExample.java
+++ b/examples/jms/stop-server-failover/src/main/java/org/apache/activemq/jms/example/StopServerFailoverExample.java
@@ -56,8 +56,8 @@ public class StopServerFailoverExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Look up the JMS resources from JNDI
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
- ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
+ ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 3. Create a JMS Connection
connection = connectionFactory.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/stop-server-failover/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stop-server-failover/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/stop-server-failover/src/main/resources/hornetq/server0/activemq-jms.xml
index c3b0393..0d5c953 100644
--- a/examples/jms/stop-server-failover/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/stop-server-failover/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,32 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
-
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/stop-server-failover/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stop-server-failover/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/stop-server-failover/src/main/resources/hornetq/server1/activemq-jms.xml
index a5ea085..0d5c953 100644
--- a/examples/jms/stop-server-failover/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/stop-server-failover/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,32 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
-
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/symmetric-cluster/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/pom.xml b/examples/jms/symmetric-cluster/pom.xml
index b1de2cf..585c5c4 100644
--- a/examples/jms/symmetric-cluster/pom.xml
+++ b/examples/jms/symmetric-cluster/pom.xml
@@ -167,12 +167,12 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.SymmetricClusterExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
- <param>jnp://localhost:1299</param>
- <param>jnp://localhost:1399</param>
- <param>jnp://localhost:1499</param>
- <param>jnp://localhost:1599</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
+ <param>tcp://localhost:5447</param>
+ <param>tcp://localhost:5448</param>
+ <param>tcp://localhost:5449</param>
+ <param>tcp://localhost:5450</param>
</args>
<systemProperties>
<property>
@@ -273,11 +273,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/symmetric-cluster/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/symmetric-cluster/src/main/resources/hornetq/server0/activemq-jms.xml
index d51eab9..6e79642 100644
--- a/examples/jms/symmetric-cluster/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/symmetric-cluster/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,22 +1,9 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
-
- <!--This connection factory is not actually used in the example, but we keep it here for good
- measure -->
- <connection-factory name="ConnectionFactory">
- <discovery-group-ref discovery-group-name="my-discovery-group"/>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
- <topic name="exampleTopic">
- <entry name="/topic/exampleTopic"/>
- </topic>
+ <topic name="exampleTopic"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/symmetric-cluster/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/symmetric-cluster/src/main/resources/hornetq/server1/activemq-jms.xml
index c857e18..7b26f36 100644
--- a/examples/jms/symmetric-cluster/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/symmetric-cluster/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,22 +1,9 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
-
- <!--This connection factory is not actually used in the example, but we keep it here for good
- measure -->
- <connection-factory name="ConnectionFactory">
- <discovery-group-ref discovery-group-name="my-discovery-group"/>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
- <topic name="exampleTopic">
- <entry name="/topic/exampleTopic"/>
- </topic>
+ <topic name="exampleTopic"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/symmetric-cluster/src/main/resources/hornetq/server2/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/hornetq/server2/activemq-jms.xml b/examples/jms/symmetric-cluster/src/main/resources/hornetq/server2/activemq-jms.xml
index defe6e0..7b26f36 100644
--- a/examples/jms/symmetric-cluster/src/main/resources/hornetq/server2/activemq-jms.xml
+++ b/examples/jms/symmetric-cluster/src/main/resources/hornetq/server2/activemq-jms.xml
@@ -1,22 +1,9 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
-
- <!--This connection factory is not actually used in the example, but we keep it here for good
- measure -->
- <connection-factory name="ConnectionFactory">
- <discovery-group-ref discovery-group-name="my-discovery-group"/>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
- <topic name="exampleTopic">
- <entry name="/topic/exampleTopic"/>
- </topic>
+ <topic name="exampleTopic"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/symmetric-cluster/src/main/resources/hornetq/server3/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/hornetq/server3/activemq-jms.xml b/examples/jms/symmetric-cluster/src/main/resources/hornetq/server3/activemq-jms.xml
index c857e18..7b26f36 100644
--- a/examples/jms/symmetric-cluster/src/main/resources/hornetq/server3/activemq-jms.xml
+++ b/examples/jms/symmetric-cluster/src/main/resources/hornetq/server3/activemq-jms.xml
@@ -1,22 +1,9 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
-
- <!--This connection factory is not actually used in the example, but we keep it here for good
- measure -->
- <connection-factory name="ConnectionFactory">
- <discovery-group-ref discovery-group-name="my-discovery-group"/>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
- <topic name="exampleTopic">
- <entry name="/topic/exampleTopic"/>
- </topic>
+ <topic name="exampleTopic"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/symmetric-cluster/src/main/resources/hornetq/server4/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/hornetq/server4/activemq-jms.xml b/examples/jms/symmetric-cluster/src/main/resources/hornetq/server4/activemq-jms.xml
index 7d1c771..7b26f36 100644
--- a/examples/jms/symmetric-cluster/src/main/resources/hornetq/server4/activemq-jms.xml
+++ b/examples/jms/symmetric-cluster/src/main/resources/hornetq/server4/activemq-jms.xml
@@ -2,21 +2,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--This connection factory is not actually used in the example, but we keep it here for good
- measure -->
- <connection-factory name="ConnectionFactory">
- <discovery-group-ref discovery-group-name="my-discovery-group"/>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
- <topic name="exampleTopic">
- <entry name="/topic/exampleTopic"/>
- </topic>
+ <topic name="exampleTopic"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/symmetric-cluster/src/main/resources/hornetq/server5/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/resources/hornetq/server5/activemq-jms.xml b/examples/jms/symmetric-cluster/src/main/resources/hornetq/server5/activemq-jms.xml
index 7d1c771..7b26f36 100644
--- a/examples/jms/symmetric-cluster/src/main/resources/hornetq/server5/activemq-jms.xml
+++ b/examples/jms/symmetric-cluster/src/main/resources/hornetq/server5/activemq-jms.xml
@@ -2,21 +2,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--This connection factory is not actually used in the example, but we keep it here for good
- measure -->
- <connection-factory name="ConnectionFactory">
- <discovery-group-ref discovery-group-name="my-discovery-group"/>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
- <topic name="exampleTopic">
- <entry name="/topic/exampleTopic"/>
- </topic>
+ <topic name="exampleTopic"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/temp-queue/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/temp-queue/pom.xml b/examples/jms/temp-queue/pom.xml
index 88ed4b9..c1649f1 100644
--- a/examples/jms/temp-queue/pom.xml
+++ b/examples/jms/temp-queue/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.TemporaryQueueExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/temp-queue/src/main/java/org/apache/activemq/jms/example/TemporaryQueueExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/temp-queue/src/main/java/org/apache/activemq/jms/example/TemporaryQueueExample.java b/examples/jms/temp-queue/src/main/java/org/apache/activemq/jms/example/TemporaryQueueExample.java
index 18f2cdd..55b6438 100644
--- a/examples/jms/temp-queue/src/main/java/org/apache/activemq/jms/example/TemporaryQueueExample.java
+++ b/examples/jms/temp-queue/src/main/java/org/apache/activemq/jms/example/TemporaryQueueExample.java
@@ -51,7 +51,7 @@ public class TemporaryQueueExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Look-up the JMS connection factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 3. Create a JMS Connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/temp-queue/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/temp-queue/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/temp-queue/src/main/resources/hornetq/server0/activemq-jms.xml
index 6c89891..0baa197 100644
--- a/examples/jms/temp-queue/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/temp-queue/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the topic used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/topic-hierarchies/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/topic-hierarchies/pom.xml b/examples/jms/topic-hierarchies/pom.xml
index 301caf3..dd1b6d9 100644
--- a/examples/jms/topic-hierarchies/pom.xml
+++ b/examples/jms/topic-hierarchies/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.TopicHierarchyExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/topic-hierarchies/src/main/java/org/apache/activemq/jms/example/TopicHierarchyExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/topic-hierarchies/src/main/java/org/apache/activemq/jms/example/TopicHierarchyExample.java b/examples/jms/topic-hierarchies/src/main/java/org/apache/activemq/jms/example/TopicHierarchyExample.java
index df5067a..8fff159 100644
--- a/examples/jms/topic-hierarchies/src/main/java/org/apache/activemq/jms/example/TopicHierarchyExample.java
+++ b/examples/jms/topic-hierarchies/src/main/java/org/apache/activemq/jms/example/TopicHierarchyExample.java
@@ -54,7 +54,7 @@ public class TopicHierarchyExample extends ActiveMQExample
initialContext = getContext(0);
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. Create a JMS Connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/topic-hierarchies/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/topic-hierarchies/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/topic-hierarchies/src/main/resources/hornetq/server0/activemq-jms.xml
index e0a778e..dc498cc 100644
--- a/examples/jms/topic-hierarchies/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/topic-hierarchies/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,40 +1,19 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the topics used by the example-->
- <topic name="news">
- <entry name="/topic/news"/>
- </topic>
+ <topic name="news"/>
- <topic name="news.usa">
- <entry name="/topic/news.usa"/>
- </topic>
+ <topic name="news.usa"/>
- <topic name="news.usa.wrestling">
- <entry name="/topic/news.wrestling"/>
- </topic>
+ <topic name="news.usa.wrestling"/>
- <topic name="news.europe">
- <entry name="/topic/news.europe"/>
- </topic>
+ <topic name="news.europe"/>
- <topic name="news.europe.sport">
- <entry name="/topic/news.europe.sport"/>
- </topic>
+ <topic name="news.europe.sport"/>
- <topic name="news.europe.entertainment">
- <entry name="/topic/news.europe.entertainment"/>
- </topic>
+ <topic name="news.europe.entertainment"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/topic-selector-example1/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/topic-selector-example1/pom.xml b/examples/jms/topic-selector-example1/pom.xml
index 73782ab..1779b3b 100644
--- a/examples/jms/topic-selector-example1/pom.xml
+++ b/examples/jms/topic-selector-example1/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.TopicSelectorExample1</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/topic-selector-example1/src/main/java/org/apache/activemq/jms/example/TopicSelectorExample1.java
----------------------------------------------------------------------
diff --git a/examples/jms/topic-selector-example1/src/main/java/org/apache/activemq/jms/example/TopicSelectorExample1.java b/examples/jms/topic-selector-example1/src/main/java/org/apache/activemq/jms/example/TopicSelectorExample1.java
index 475d50f..9cda2da 100644
--- a/examples/jms/topic-selector-example1/src/main/java/org/apache/activemq/jms/example/TopicSelectorExample1.java
+++ b/examples/jms/topic-selector-example1/src/main/java/org/apache/activemq/jms/example/TopicSelectorExample1.java
@@ -52,10 +52,10 @@ public class TopicSelectorExample1 extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Look-up the JMS topic
- Topic topic = (Topic)initialContext.lookup("/topic/exampleTopic");
+ Topic topic = (Topic)initialContext.lookup("topic/exampleTopic");
// Step 3. Look-up the JMS connection factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. Create a JMS connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/topic-selector-example1/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/topic-selector-example1/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/topic-selector-example1/src/main/resources/hornetq/server0/activemq-jms.xml
index 1dd09a6..ab4841d 100644
--- a/examples/jms/topic-selector-example1/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/topic-selector-example1/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the topic used by the example-->
- <topic name="exampleTopic">
- <entry name="/topic/exampleTopic"/>
- </topic>
+ <topic name="exampleTopic"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/topic-selector-example2/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/topic-selector-example2/pom.xml b/examples/jms/topic-selector-example2/pom.xml
index 7e9c9a1..8f43b60 100644
--- a/examples/jms/topic-selector-example2/pom.xml
+++ b/examples/jms/topic-selector-example2/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.TopicSelectorExample2</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/topic-selector-example2/src/main/java/org/apache/activemq/jms/example/TopicSelectorExample2.java
----------------------------------------------------------------------
diff --git a/examples/jms/topic-selector-example2/src/main/java/org/apache/activemq/jms/example/TopicSelectorExample2.java b/examples/jms/topic-selector-example2/src/main/java/org/apache/activemq/jms/example/TopicSelectorExample2.java
index 3ba729d..e322ea1 100644
--- a/examples/jms/topic-selector-example2/src/main/java/org/apache/activemq/jms/example/TopicSelectorExample2.java
+++ b/examples/jms/topic-selector-example2/src/main/java/org/apache/activemq/jms/example/TopicSelectorExample2.java
@@ -55,10 +55,10 @@ public class TopicSelectorExample2 extends ActiveMQExample
initialContext = getContext(0);
// Step 2. perform a lookup on the topic
- Topic topic = (Topic)initialContext.lookup("/topic/exampleTopic");
+ Topic topic = (Topic)initialContext.lookup("topic/exampleTopic");
// Step 3. perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. Create a JMS Connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/topic-selector-example2/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/topic-selector-example2/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/topic-selector-example2/src/main/resources/hornetq/server0/activemq-jms.xml
index 1dd09a6..ab4841d 100644
--- a/examples/jms/topic-selector-example2/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/topic-selector-example2/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the topic used by the example-->
- <topic name="exampleTopic">
- <entry name="/topic/exampleTopic"/>
- </topic>
+ <topic name="exampleTopic"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/topic/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/topic/pom.xml b/examples/jms/topic/pom.xml
index 51368c8..f7b8486 100644
--- a/examples/jms/topic/pom.xml
+++ b/examples/jms/topic/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.TopicExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/topic/src/main/java/org/apache/activemq/jms/example/TopicExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/topic/src/main/java/org/apache/activemq/jms/example/TopicExample.java b/examples/jms/topic/src/main/java/org/apache/activemq/jms/example/TopicExample.java
index 761a5fa..c729638 100644
--- a/examples/jms/topic/src/main/java/org/apache/activemq/jms/example/TopicExample.java
+++ b/examples/jms/topic/src/main/java/org/apache/activemq/jms/example/TopicExample.java
@@ -50,10 +50,10 @@ public class TopicExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. perform a lookup on the topic
- Topic topic = (Topic)initialContext.lookup("/topic/exampleTopic");
+ Topic topic = (Topic)initialContext.lookup("topic/exampleTopic");
// Step 3. perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. Create a JMS Connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/topic/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/topic/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/topic/src/main/resources/hornetq/server0/activemq-jms.xml
index 1dd09a6..ab4841d 100644
--- a/examples/jms/topic/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/topic/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the topic used by the example-->
- <topic name="exampleTopic">
- <entry name="/topic/exampleTopic"/>
- </topic>
+ <topic name="exampleTopic"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/topic/src/main/resources/hornetq/server0/client-jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/topic/src/main/resources/hornetq/server0/client-jndi.properties b/examples/jms/topic/src/main/resources/hornetq/server0/client-jndi.properties
index 080524f..6940f75 100644
--- a/examples/jms/topic/src/main/resources/hornetq/server0/client-jndi.properties
+++ b/examples/jms/topic/src/main/resources/hornetq/server0/client-jndi.properties
@@ -1,3 +1,2 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/transaction-failover/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/transaction-failover/pom.xml b/examples/jms/transaction-failover/pom.xml
index 1e72729..177667e 100644
--- a/examples/jms/transaction-failover/pom.xml
+++ b/examples/jms/transaction-failover/pom.xml
@@ -79,8 +79,8 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.TransactionFailoverExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
</args>
<systemProperties>
<property>
@@ -145,11 +145,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/transaction-failover/src/main/java/org/apache/activemq/jms/example/TransactionFailoverExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/transaction-failover/src/main/java/org/apache/activemq/jms/example/TransactionFailoverExample.java b/examples/jms/transaction-failover/src/main/java/org/apache/activemq/jms/example/TransactionFailoverExample.java
index 5321f38..3f31b6e 100644
--- a/examples/jms/transaction-failover/src/main/java/org/apache/activemq/jms/example/TransactionFailoverExample.java
+++ b/examples/jms/transaction-failover/src/main/java/org/apache/activemq/jms/example/TransactionFailoverExample.java
@@ -57,8 +57,8 @@ public class TransactionFailoverExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Look-up the JMS resources from JNDI
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
- ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
+ ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 3. We create a JMS Connection
connection = connectionFactory.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/transaction-failover/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/transaction-failover/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/transaction-failover/src/main/resources/hornetq/server0/activemq-jms.xml
index a4c9e68..0d5c953 100644
--- a/examples/jms/transaction-failover/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/transaction-failover/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,31 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/transaction-failover/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/transaction-failover/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/transaction-failover/src/main/resources/hornetq/server1/activemq-jms.xml
index a4c9e68..0d5c953 100644
--- a/examples/jms/transaction-failover/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/transaction-failover/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,31 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/transactional/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/transactional/pom.xml b/examples/jms/transactional/pom.xml
index f0925e0..fd165b6 100644
--- a/examples/jms/transactional/pom.xml
+++ b/examples/jms/transactional/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.TransactionalExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/transactional/src/main/java/org/apache/activemq/jms/example/TransactionalExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/transactional/src/main/java/org/apache/activemq/jms/example/TransactionalExample.java b/examples/jms/transactional/src/main/java/org/apache/activemq/jms/example/TransactionalExample.java
index 1a31cc6..d23f6b1 100644
--- a/examples/jms/transactional/src/main/java/org/apache/activemq/jms/example/TransactionalExample.java
+++ b/examples/jms/transactional/src/main/java/org/apache/activemq/jms/example/TransactionalExample.java
@@ -50,10 +50,10 @@ public class TransactionalExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Look-up the JMS topic
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Look-up the JMS connection factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. Create a JMS connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/transactional/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/transactional/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/transactional/src/main/resources/hornetq/server0/activemq-jms.xml
index 452b958..847659f 100644
--- a/examples/jms/transactional/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/transactional/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/xa-heuristic/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/xa-heuristic/pom.xml b/examples/jms/xa-heuristic/pom.xml
index 64bb8a8..38e545e 100644
--- a/examples/jms/xa-heuristic/pom.xml
+++ b/examples/jms/xa-heuristic/pom.xml
@@ -75,7 +75,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.XAHeuristicExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -122,11 +122,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/xa-heuristic/src/main/java/org/apache/activemq/jms/example/XAHeuristicExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/xa-heuristic/src/main/java/org/apache/activemq/jms/example/XAHeuristicExample.java b/examples/jms/xa-heuristic/src/main/java/org/apache/activemq/jms/example/XAHeuristicExample.java
index 2766aa5..3a70346 100644
--- a/examples/jms/xa-heuristic/src/main/java/org/apache/activemq/jms/example/XAHeuristicExample.java
+++ b/examples/jms/xa-heuristic/src/main/java/org/apache/activemq/jms/example/XAHeuristicExample.java
@@ -74,10 +74,10 @@ public class XAHeuristicExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the XA Connection Factory
- XAConnectionFactory cf = (XAConnectionFactory)initialContext.lookup("/XAConnectionFactory");
+ XAConnectionFactory cf = (XAConnectionFactory)initialContext.lookup("XAConnectionFactory");
// Step 4.Create a JMS XAConnection
connection = cf.createXAConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/xa-heuristic/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/xa-heuristic/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/xa-heuristic/src/main/resources/hornetq/server0/activemq-jms.xml
index a0cf7b1..0d5c953 100644
--- a/examples/jms/xa-heuristic/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/xa-heuristic/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,20 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <xa>true</xa>
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="XAConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/xa-receive/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/xa-receive/pom.xml b/examples/jms/xa-receive/pom.xml
index a5e45be..0fddd12 100644
--- a/examples/jms/xa-receive/pom.xml
+++ b/examples/jms/xa-receive/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.XAReceiveExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/xa-receive/src/main/java/org/apache/activemq/jms/example/XAReceiveExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/xa-receive/src/main/java/org/apache/activemq/jms/example/XAReceiveExample.java b/examples/jms/xa-receive/src/main/java/org/apache/activemq/jms/example/XAReceiveExample.java
index 65c02d2..87e92f5 100644
--- a/examples/jms/xa-receive/src/main/java/org/apache/activemq/jms/example/XAReceiveExample.java
+++ b/examples/jms/xa-receive/src/main/java/org/apache/activemq/jms/example/XAReceiveExample.java
@@ -59,10 +59,10 @@ public class XAReceiveExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the XA Connection Factory
- XAConnectionFactory cf = (XAConnectionFactory)initialContext.lookup("/XAConnectionFactory");
+ XAConnectionFactory cf = (XAConnectionFactory)initialContext.lookup("XAConnectionFactory");
// Step 4.Create a JMS XAConnection
connection = cf.createXAConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/xa-receive/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/xa-receive/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/xa-receive/src/main/resources/hornetq/server0/activemq-jms.xml
index a0cf7b1..0d5c953 100644
--- a/examples/jms/xa-receive/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/xa-receive/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,20 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <xa>true</xa>
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="XAConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/xa-send/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/xa-send/pom.xml b/examples/jms/xa-send/pom.xml
index 48e12eb..2e4fadb 100644
--- a/examples/jms/xa-send/pom.xml
+++ b/examples/jms/xa-send/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.XASendExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/xa-send/src/main/java/org/apache/activemq/jms/example/XASendExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/xa-send/src/main/java/org/apache/activemq/jms/example/XASendExample.java b/examples/jms/xa-send/src/main/java/org/apache/activemq/jms/example/XASendExample.java
index b99c312..b592826 100644
--- a/examples/jms/xa-send/src/main/java/org/apache/activemq/jms/example/XASendExample.java
+++ b/examples/jms/xa-send/src/main/java/org/apache/activemq/jms/example/XASendExample.java
@@ -65,10 +65,10 @@ public class XASendExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the XA Connection Factory
- XAConnectionFactory cf = (XAConnectionFactory)initialContext.lookup("/XAConnectionFactory");
+ XAConnectionFactory cf = (XAConnectionFactory)initialContext.lookup("XAConnectionFactory");
// Step 4.Create a JMS XAConnection
connection = cf.createXAConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/xa-send/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/xa-send/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/xa-send/src/main/resources/hornetq/server0/activemq-jms.xml
index a0cf7b1..0d5c953 100644
--- a/examples/jms/xa-send/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/xa-send/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,20 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <xa>true</xa>
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="XAConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/xa-with-jta/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/xa-with-jta/pom.xml b/examples/jms/xa-with-jta/pom.xml
index 08c7f11..9410de3 100644
--- a/examples/jms/xa-with-jta/pom.xml
+++ b/examples/jms/xa-with-jta/pom.xml
@@ -61,7 +61,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.XAwithJTAExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -108,11 +108,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/xa-with-jta/src/main/java/org/apache/activemq/jms/example/XAwithJTAExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/xa-with-jta/src/main/java/org/apache/activemq/jms/example/XAwithJTAExample.java b/examples/jms/xa-with-jta/src/main/java/org/apache/activemq/jms/example/XAwithJTAExample.java
index 5940667..1ec8b40 100644
--- a/examples/jms/xa-with-jta/src/main/java/org/apache/activemq/jms/example/XAwithJTAExample.java
+++ b/examples/jms/xa-with-jta/src/main/java/org/apache/activemq/jms/example/XAwithJTAExample.java
@@ -59,10 +59,10 @@ public class XAwithJTAExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the XA Connection Factory
- XAConnectionFactory cf = (XAConnectionFactory)initialContext.lookup("/XAConnectionFactory");
+ XAConnectionFactory cf = (XAConnectionFactory)initialContext.lookup("XAConnectionFactory");
// Step 4.Create a JMS XAConnection
connection = cf.createXAConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/xa-with-jta/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/xa-with-jta/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/xa-with-jta/src/main/resources/hornetq/server0/activemq-jms.xml
index a0cf7b1..0d5c953 100644
--- a/examples/jms/xa-with-jta/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/xa-with-jta/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,20 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <xa>true</xa>
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="XAConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/soak/normal/pom.xml
----------------------------------------------------------------------
diff --git a/examples/soak/normal/pom.xml b/examples/soak/normal/pom.xml
index d8b8ea0..a33fdfe 100644
--- a/examples/soak/normal/pom.xml
+++ b/examples/soak/normal/pom.xml
@@ -50,11 +50,6 @@
<artifactId>netty-all</artifactId>
<version>${netty.version}</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
@@ -99,7 +94,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.soak.example.SoakReceiver</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -111,7 +106,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.soak.example.SoakSender</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -145,7 +140,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.soak.example.SoakReceiver</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -157,7 +152,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.soak.example.SoakSender</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/soak/normal/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/soak/normal/server0/activemq-jms.xml b/examples/soak/normal/server0/activemq-jms.xml
index d84281b..5e29c13 100644
--- a/examples/soak/normal/server0/activemq-jms.xml
+++ b/examples/soak/normal/server0/activemq-jms.xml
@@ -1,23 +1,7 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- <retry-interval>1000</retry-interval>
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
- <reconnect-attempts>-1</reconnect-attempts>
- <failover-on-server-shutdown>true</failover-on-server-shutdown>
- <call-timeout>5000</call-timeout>
- </connection-factory>
- <queue name="soakQueue">
- <entry name="soakQueue"/>
- </queue>
+ <queue name="soakQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/soak/normal/src/main/java/org/apache/activemq/jms/soak/example/SoakReceiver.java
----------------------------------------------------------------------
diff --git a/examples/soak/normal/src/main/java/org/apache/activemq/jms/soak/example/SoakReceiver.java b/examples/soak/normal/src/main/java/org/apache/activemq/jms/soak/example/SoakReceiver.java
index 270d3cc..bc890b8 100644
--- a/examples/soak/normal/src/main/java/org/apache/activemq/jms/soak/example/SoakReceiver.java
+++ b/examples/soak/normal/src/main/java/org/apache/activemq/jms/soak/example/SoakReceiver.java
@@ -52,7 +52,7 @@ public class SoakReceiver
String jndiURL = System.getProperty("jndi.address");
if(jndiURL == null)
{
- jndiURL = args.length > 0 ? args[0] : "jnp://localhost:1099";
+ jndiURL = args.length > 0 ? args[0] : "tcp://localhost:5445";
}
System.out.println("Connecting to JNDI at " + jndiURL);
@@ -65,8 +65,7 @@ public class SoakReceiver
Hashtable<String, String> jndiProps = new Hashtable<String, String>();
jndiProps.put("java.naming.provider.url", jndiURL);
- jndiProps.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
- jndiProps.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
+ jndiProps.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
final SoakReceiver receiver = new SoakReceiver(jndiProps, params);
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/soak/normal/src/main/java/org/apache/activemq/jms/soak/example/SoakSender.java
----------------------------------------------------------------------
diff --git a/examples/soak/normal/src/main/java/org/apache/activemq/jms/soak/example/SoakSender.java b/examples/soak/normal/src/main/java/org/apache/activemq/jms/soak/example/SoakSender.java
index ad0351c..360f88f 100644
--- a/examples/soak/normal/src/main/java/org/apache/activemq/jms/soak/example/SoakSender.java
+++ b/examples/soak/normal/src/main/java/org/apache/activemq/jms/soak/example/SoakSender.java
@@ -44,7 +44,7 @@ public class SoakSender
String jndiURL = System.getProperty("jndi.address");
if(jndiURL == null)
{
- jndiURL = args.length > 0 ? args[0] : "jnp://localhost:1099";
+ jndiURL = args.length > 0 ? args[0] : "tcp://localhost:5445";
}
System.out.println("Connecting to JNDI at " + jndiURL);
@@ -56,8 +56,7 @@ public class SoakSender
Hashtable<String, String> jndiProps = new Hashtable<String, String>();
jndiProps.put("java.naming.provider.url", jndiURL);
- jndiProps.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
- jndiProps.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
+ jndiProps.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
final SoakSender sender = new SoakSender(jndiProps, params);
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 55dafc6..c868686 100644
--- a/pom.xml
+++ b/pom.xml
@@ -382,17 +382,6 @@
<!--needed to run the jms tests -->
<dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- <exclusions>
- <exclusion>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
<groupId>apache-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.0.jboss</version>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/byteman-tests/pom.xml
----------------------------------------------------------------------
diff --git a/tests/byteman-tests/pom.xml b/tests/byteman-tests/pom.xml
index f6b848f..02e9d1b 100644
--- a/tests/byteman-tests/pom.xml
+++ b/tests/byteman-tests/pom.xml
@@ -119,10 +119,6 @@
<artifactId>jbosssx</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- </dependency>
- <dependency>
<groupId>apache-logging</groupId>
<artifactId>commons-logging</artifactId>
</dependency>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/config/server-start-stop-backup-jms-config1.xml
----------------------------------------------------------------------
diff --git a/tests/config/server-start-stop-backup-jms-config1.xml b/tests/config/server-start-stop-backup-jms-config1.xml
index 06291be..12b78ea 100644
--- a/tests/config/server-start-stop-backup-jms-config1.xml
+++ b/tests/config/server-start-stop-backup-jms-config1.xml
@@ -1,16 +1,7 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connector-ref connector-name="netty-connector"/>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
- <queue name="myJMSQueue">
- <entry name="myJMSQueue"/>
- </queue>
+ <queue name="myJMSQueue/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/config/server-start-stop-live-jms-config1.xml
----------------------------------------------------------------------
diff --git a/tests/config/server-start-stop-live-jms-config1.xml b/tests/config/server-start-stop-live-jms-config1.xml
index f2fb22c..5987e7e 100644
--- a/tests/config/server-start-stop-live-jms-config1.xml
+++ b/tests/config/server-start-stop-live-jms-config1.xml
@@ -1,18 +1,7 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
- <queue name="myJMSQueue">
- <entry name="myJMSQueue"/>
- </queue>
+ <queue name="myJMSQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/tests/integration-tests/pom.xml
----------------------------------------------------------------------
diff --git a/tests/integration-tests/pom.xml b/tests/integration-tests/pom.xml
index d09a575..83848d8 100644
--- a/tests/integration-tests/pom.xml
+++ b/tests/integration-tests/pom.xml
@@ -48,6 +48,13 @@
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-jms-server</artifactId>
<version>${project.version}</version>
+ <exclusions>
+ <exclusion>
+ <!-- exclude JCA 1.5 spec here so geronimo dependency will be used -->
+ <groupId>org.jboss.spec.javax.resource</groupId>
+ <artifactId>jboss-connector-api_1.5_spec</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
[06/13] activemq-6 git commit: ACTIVEMQ6-14 Replace JNDI server with
client impl
Posted by cl...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/divert/src/main/java/org/apache/activemq/jms/example/DivertExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/divert/src/main/java/org/apache/activemq/jms/example/DivertExample.java b/examples/jms/divert/src/main/java/org/apache/activemq/jms/example/DivertExample.java
index daa8507..94d69ef 100644
--- a/examples/jms/divert/src/main/java/org/apache/activemq/jms/example/DivertExample.java
+++ b/examples/jms/divert/src/main/java/org/apache/activemq/jms/example/DivertExample.java
@@ -60,14 +60,14 @@ public class DivertExample extends ActiveMQExample
initialContextLondon = getContext(0);
// Step 2. Look-up the queue orderQueue on the London server - this is the queue any orders are sent to
- Queue orderQueue = (Queue)initialContextLondon.lookup("/queue/orders");
+ Queue orderQueue = (Queue)initialContextLondon.lookup("queue/orders");
// Step 3. Look-up the topic priceUpdates on the London server- this is the topic that any price updates are
// sent to
- Topic priceUpdates = (Topic)initialContextLondon.lookup("/topic/priceUpdates");
+ Topic priceUpdates = (Topic)initialContextLondon.lookup("topic/priceUpdates");
// Step 4. Look-up the spy topic on the London server- this is what we will use to snoop on any orders
- Topic spyTopic = (Topic)initialContextLondon.lookup("/topic/spyTopic");
+ Topic spyTopic = (Topic)initialContextLondon.lookup("topic/spyTopic");
// Step 6. Create an initial context to perform the JNDI lookup on the New York server
initialContextNewYork = getContext(1);
@@ -79,13 +79,13 @@ public class DivertExample extends ActiveMQExample
// them to the address newYorkPriceUpdates on the New York server where they will be distributed to the topic
// subscribers on
// the New York server
- Topic newYorkPriceUpdates = (Topic)initialContextNewYork.lookup("/topic/newYorkPriceUpdates");
+ Topic newYorkPriceUpdates = (Topic)initialContextNewYork.lookup("topic/newYorkPriceUpdates");
// Step 8. Perform a lookup on the Connection Factory on the London server
- ConnectionFactory cfLondon = (ConnectionFactory)initialContextLondon.lookup("/ConnectionFactory");
+ ConnectionFactory cfLondon = (ConnectionFactory)initialContextLondon.lookup("ConnectionFactory");
// Step 9. Perform a lookup on the Connection Factory on the New York server
- ConnectionFactory cfNewYork = (ConnectionFactory)initialContextNewYork.lookup("/ConnectionFactory");
+ ConnectionFactory cfNewYork = (ConnectionFactory)initialContextNewYork.lookup("ConnectionFactory");
// Step 10. Create a JMS Connection on the London server
connectionLondon = cfLondon.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/divert/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/divert/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/divert/src/main/resources/hornetq/server0/activemq-jms.xml
index 8d78604..d82f40c 100644
--- a/examples/jms/divert/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/divert/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,38 +1,18 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
-
- <!-- the connection factory used by the example -->
-
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
-
<!-- Destinations used by the example -->
<!-- The order queue -->
- <queue name="orders">
- <entry name="/queue/orders"/>
- </queue>
+ <queue name="orders"/>
<!-- The queue that prices are forwarded to before being bridged to the New York server -->
- <queue name="priceForwarding">
- <entry name="/queue/priceForwarding"/>
- </queue>
+ <queue name="priceForwarding"/>
<!-- The topic for price updates -->
- <topic name="priceUpdates">
- <entry name="/topic/priceUpdates"/>
- </topic>
+ <topic name="priceUpdates"/>
<!-- The spy topic for snooping on orders -->
- <topic name="spyTopic">
- <entry name="/topic/spyTopic"/>
- </topic>
+ <topic name="spyTopic"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/divert/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/divert/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/divert/src/main/resources/hornetq/server1/activemq-jms.xml
index 97c9aab..8cb753a 100644
--- a/examples/jms/divert/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/divert/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,24 +1,11 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
-
- <!-- the connection factory used by the example -->
-
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!-- Destinations used by the example -->
<!-- The topic for New York price updates -->
- <topic name="newYorkPriceUpdates">
- <entry name="/topic/newYorkPriceUpdates"/>
- </topic>
+ <topic name="newYorkPriceUpdates"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/durable-subscription/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/durable-subscription/pom.xml b/examples/jms/durable-subscription/pom.xml
index 61c6f59..2149c87 100644
--- a/examples/jms/durable-subscription/pom.xml
+++ b/examples/jms/durable-subscription/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.DurableSubscriptionExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/durable-subscription/src/main/java/org/apache/activemq/jms/example/DurableSubscriptionExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/durable-subscription/src/main/java/org/apache/activemq/jms/example/DurableSubscriptionExample.java b/examples/jms/durable-subscription/src/main/java/org/apache/activemq/jms/example/DurableSubscriptionExample.java
index c33027e..792e82e 100644
--- a/examples/jms/durable-subscription/src/main/java/org/apache/activemq/jms/example/DurableSubscriptionExample.java
+++ b/examples/jms/durable-subscription/src/main/java/org/apache/activemq/jms/example/DurableSubscriptionExample.java
@@ -50,10 +50,10 @@ public class DurableSubscriptionExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Look-up the JMS topic
- Topic topic = (Topic)initialContext.lookup("/topic/exampleTopic");
+ Topic topic = (Topic)initialContext.lookup("topic/exampleTopic");
// Step 3. Look-up the JMS connection factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. Create a JMS connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/durable-subscription/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/durable-subscription/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/durable-subscription/src/main/resources/hornetq/server0/activemq-jms.xml
index 1dd09a6..ab4841d 100644
--- a/examples/jms/durable-subscription/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/durable-subscription/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the topic used by the example-->
- <topic name="exampleTopic">
- <entry name="/topic/exampleTopic"/>
- </topic>
+ <topic name="exampleTopic"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/durable-subscription/src/main/resources/hornetq/server0/client-jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/durable-subscription/src/main/resources/hornetq/server0/client-jndi.properties b/examples/jms/durable-subscription/src/main/resources/hornetq/server0/client-jndi.properties
index 080524f..f68e7f7 100644
--- a/examples/jms/durable-subscription/src/main/resources/hornetq/server0/client-jndi.properties
+++ b/examples/jms/durable-subscription/src/main/resources/hornetq/server0/client-jndi.properties
@@ -1,3 +1,2 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/embedded-simple/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/embedded-simple/pom.xml b/examples/jms/embedded-simple/pom.xml
index 251e5a9..1b01307 100644
--- a/examples/jms/embedded-simple/pom.xml
+++ b/examples/jms/embedded-simple/pom.xml
@@ -48,8 +48,8 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.EmbeddedExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5445</param>
</args>
<systemProperties>
<property>
@@ -96,11 +96,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/embedded-simple/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/embedded-simple/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java b/examples/jms/embedded-simple/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java
index 11103ec..e41a025 100644
--- a/examples/jms/embedded-simple/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java
+++ b/examples/jms/embedded-simple/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java
@@ -53,7 +53,7 @@ public class EmbeddedExample extends ActiveMQExample
System.out.println("Started Embedded JMS Server");
ConnectionFactory cf = (ConnectionFactory)jmsServer.lookup("ConnectionFactory");
- Queue queue = (Queue)jmsServer.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)jmsServer.lookup("queue/exampleQueue");
// Step 10. Send and receive a message using JMS API
Connection connection = null;
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/embedded-simple/src/main/resources/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/embedded-simple/src/main/resources/activemq-jms.xml b/examples/jms/embedded-simple/src/main/resources/activemq-jms.xml
index bce97ab..3758989 100644
--- a/examples/jms/embedded-simple/src/main/resources/activemq-jms.xml
+++ b/examples/jms/embedded-simple/src/main/resources/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="in-vm"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/embedded/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/embedded/pom.xml b/examples/jms/embedded/pom.xml
index 98d854c..c6441f0 100644
--- a/examples/jms/embedded/pom.xml
+++ b/examples/jms/embedded/pom.xml
@@ -48,8 +48,8 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.EmbeddedExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
</args>
<systemProperties>
<property>
@@ -100,11 +100,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
</plugin>
</plugins>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/embedded/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/embedded/readme.html b/examples/jms/embedded/readme.html
index 8964d14..195175e 100644
--- a/examples/jms/embedded/readme.html
+++ b/examples/jms/embedded/readme.html
@@ -30,36 +30,12 @@
<pre class="prettyprint">
<code>ActiveMQServer activemqServer = ActiveMQ.newActiveMQServer(configuration);</code>
</pre>
-
- <li>Create and start the JNDI server (using JBoss JNDI implementation)</li>
- <pre class="prettyprint">
- <code>System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
- NamingBeanImpl naming = new NamingBeanImpl();
- naming.start();
- Main jndiServer = new Main();
- jndiServer.setNamingInfo(naming);
- jndiServer.setPort(1099);
- jndiServer.setBindAddress("localhost");
- jndiServer.setRmiPort(1098);
- jndiServer.setRmiBindAddress("localhost");
- jndiServer.start();</code>
- </pre>
<li>Create the JMS configuration</li>
<pre class="prettyprint">
<code>JMSConfiguration jmsConfig = new JMSConfigurationImpl();</code>
</pre>
- <li>Configure context used to bind the JMS resources to JNDI</li>
- <pre class="prettyprint">
- <code>Hashtable<String, String> env = new Hashtable<String, String>();
- env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
- env.put("java.naming.provider.url", "jnp://localhost:1099");
- env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
- Context context = new InitialContext(env);
- jmsConfig.setContext(context);</code>
- </pre>
-
<li>Configure the JMS ConnectionFactory</li>
<pre class="prettyprint">
<code>TransportConfiguration connectorConfig = new TransportConfiguration(NettyConnectorFactory.class.getName());
@@ -101,8 +77,7 @@
<li>Stop the JNDI server</li>
<pre class="prettyprint">
- <code>naming.stop();
- jndiServer.stop();</code>
+ <code>naming.stop();</code>
</pre>
</ol>
</body>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/embedded/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/embedded/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java b/examples/jms/embedded/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java
index 5c22d41..06fdb14 100644
--- a/examples/jms/embedded/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java
+++ b/examples/jms/embedded/src/main/java/org/apache/activemq/jms/example/EmbeddedExample.java
@@ -85,7 +85,7 @@ public final class EmbeddedExample extends ActiveMQExample
jmsConfig.getConnectionFactoryConfigurations().add(cfConfig);
// Step 4. Configure the JMS Queue
- JMSQueueConfiguration queueConfig = new JMSQueueConfigurationImpl("queue1", null, false, "/queue/queue1");
+ JMSQueueConfiguration queueConfig = new JMSQueueConfigurationImpl("queue1", null, false, "queue/queue1");
jmsConfig.getQueueConfigurations().add(queueConfig);
// Step 5. Start the JMS Server using the ActiveMQ core server and the JMS configuration
@@ -97,7 +97,7 @@ public final class EmbeddedExample extends ActiveMQExample
// Step 6. Lookup JMS resources defined in the configuration
ConnectionFactory cf = (ConnectionFactory)jmsServer.lookup("/cf");
- Queue queue = (Queue)jmsServer.lookup("/queue/queue1");
+ Queue queue = (Queue)jmsServer.lookup("queue/queue1");
// Step 7. Send and receive a message using JMS API
Connection connection = null;
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/expiry/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/expiry/pom.xml b/examples/jms/expiry/pom.xml
index ac0563c..70fc1ad 100644
--- a/examples/jms/expiry/pom.xml
+++ b/examples/jms/expiry/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ExpiryExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/expiry/src/main/java/org/apache/activemq/jms/example/ExpiryExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/expiry/src/main/java/org/apache/activemq/jms/example/ExpiryExample.java b/examples/jms/expiry/src/main/java/org/apache/activemq/jms/example/ExpiryExample.java
index c086593..a74467c 100644
--- a/examples/jms/expiry/src/main/java/org/apache/activemq/jms/example/ExpiryExample.java
+++ b/examples/jms/expiry/src/main/java/org/apache/activemq/jms/example/ExpiryExample.java
@@ -51,10 +51,10 @@ public class ExpiryExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perfom a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4.Create a JMS Connection
connection = cf.createConnection();
@@ -91,7 +91,7 @@ public class ExpiryExample extends ActiveMQExample
System.out.println("Received message from " + queue.getQueueName() + ": " + messageReceived);
// Step 14. Perfom a lookup on the expiry queue
- Queue expiryQueue = (Queue)initialContext.lookup("/queue/expiryQueue");
+ Queue expiryQueue = (Queue)initialContext.lookup("queue/expiryQueue");
// Step 15. Create a JMS Message Consumer for the expiry queue
MessageConsumer expiryConsumer = session.createConsumer(expiryQueue);
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/expiry/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/expiry/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/expiry/src/main/resources/hornetq/server0/activemq-jms.xml
index 96ae117..d41da70 100644
--- a/examples/jms/expiry/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/expiry/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,24 +1,11 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
<!--the expiry queue where expired messages will be sent-->
- <queue name="expiryQueue">
- <entry name="/queue/expiryQueue"/>
- </queue>
+ <queue name="expiryQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/ha-policy-autobackup/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ha-policy-autobackup/pom.xml b/examples/jms/ha-policy-autobackup/pom.xml
index 2b7fe80..86f5d47 100644
--- a/examples/jms/ha-policy-autobackup/pom.xml
+++ b/examples/jms/ha-policy-autobackup/pom.xml
@@ -71,8 +71,8 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.HAPolicyAutoBackupExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
</args>
<systemProperties>
<property>
@@ -137,11 +137,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/ha-policy-autobackup/src/main/java/org/apache/activemq/jms/example/HAPolicyAutoBackupExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/ha-policy-autobackup/src/main/java/org/apache/activemq/jms/example/HAPolicyAutoBackupExample.java b/examples/jms/ha-policy-autobackup/src/main/java/org/apache/activemq/jms/example/HAPolicyAutoBackupExample.java
index d3860d4..3eebb40 100644
--- a/examples/jms/ha-policy-autobackup/src/main/java/org/apache/activemq/jms/example/HAPolicyAutoBackupExample.java
+++ b/examples/jms/ha-policy-autobackup/src/main/java/org/apache/activemq/jms/example/HAPolicyAutoBackupExample.java
@@ -67,11 +67,11 @@ public class HAPolicyAutoBackupExample extends ActiveMQExample
ic1 = getContext(1);
// Step 2. Look-up the JMS Queue object from JNDI
- Queue queue = (Queue) ic0.lookup("/queue/exampleQueue");
+ Queue queue = (Queue) ic0.lookup("queue/exampleQueue");
// Step 3. Look-up a JMS Connection Factory object from JNDI on server 0 and 1
- ConnectionFactory cf0 = (ConnectionFactory) ic0.lookup("/ConnectionFactory");
- ConnectionFactory cf1 = (ConnectionFactory) ic1.lookup("/ConnectionFactory");
+ ConnectionFactory cf0 = (ConnectionFactory) ic0.lookup("ConnectionFactory");
+ ConnectionFactory cf1 = (ConnectionFactory) ic1.lookup("ConnectionFactory");
// Step 6. We create JMS Connections to server 0 and 1
connection0 = cf0.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server0/activemq-jms.xml
index 28e738b..847659f 100644
--- a/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/ha-policy-autobackup/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,30 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/http-transport/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/http-transport/pom.xml b/examples/jms/http-transport/pom.xml
index f136dbb..24a5f54 100644
--- a/examples/jms/http-transport/pom.xml
+++ b/examples/jms/http-transport/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.HttpTransportExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/http-transport/src/main/java/org/apache/activemq/jms/example/HttpTransportExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/http-transport/src/main/java/org/apache/activemq/jms/example/HttpTransportExample.java b/examples/jms/http-transport/src/main/java/org/apache/activemq/jms/example/HttpTransportExample.java
index 46c5c94..efba974 100644
--- a/examples/jms/http-transport/src/main/java/org/apache/activemq/jms/example/HttpTransportExample.java
+++ b/examples/jms/http-transport/src/main/java/org/apache/activemq/jms/example/HttpTransportExample.java
@@ -50,10 +50,10 @@ public class HttpTransportExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perfom a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4.Create a JMS Connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/http-transport/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/http-transport/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/http-transport/src/main/resources/hornetq/server0/activemq-jms.xml
index 452b958..847659f 100644
--- a/examples/jms/http-transport/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/http-transport/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/instantiate-connection-factory/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/instantiate-connection-factory/pom.xml b/examples/jms/instantiate-connection-factory/pom.xml
index a5fce8d..4b60d79 100644
--- a/examples/jms/instantiate-connection-factory/pom.xml
+++ b/examples/jms/instantiate-connection-factory/pom.xml
@@ -62,7 +62,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.InstantiateConnectionFactoryExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -109,11 +109,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/interceptor/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/interceptor/pom.xml b/examples/jms/interceptor/pom.xml
index 9e7b439..34dff8c 100644
--- a/examples/jms/interceptor/pom.xml
+++ b/examples/jms/interceptor/pom.xml
@@ -57,7 +57,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.InterceptorExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -104,11 +104,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/interceptor/src/main/java/org/apache/activemq/jms/example/InterceptorExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/interceptor/src/main/java/org/apache/activemq/jms/example/InterceptorExample.java b/examples/jms/interceptor/src/main/java/org/apache/activemq/jms/example/InterceptorExample.java
index 325b536..e2b2b40 100644
--- a/examples/jms/interceptor/src/main/java/org/apache/activemq/jms/example/InterceptorExample.java
+++ b/examples/jms/interceptor/src/main/java/org/apache/activemq/jms/example/InterceptorExample.java
@@ -50,10 +50,10 @@ public class InterceptorExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perform a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4.Create a JMS Connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/interceptor/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/interceptor/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/interceptor/src/main/resources/hornetq/server0/activemq-jms.xml
index 3058fc8..0d5c953 100644
--- a/examples/jms/interceptor/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/interceptor/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jaas/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jaas/pom.xml b/examples/jms/jaas/pom.xml
index f3bcb55..1ce345b 100644
--- a/examples/jms/jaas/pom.xml
+++ b/examples/jms/jaas/pom.xml
@@ -75,7 +75,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.JAASExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -122,11 +122,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jaas/src/main/java/org/apache/activemq/jms/example/JAASExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/jaas/src/main/java/org/apache/activemq/jms/example/JAASExample.java b/examples/jms/jaas/src/main/java/org/apache/activemq/jms/example/JAASExample.java
index 80307ac..7813924 100644
--- a/examples/jms/jaas/src/main/java/org/apache/activemq/jms/example/JAASExample.java
+++ b/examples/jms/jaas/src/main/java/org/apache/activemq/jms/example/JAASExample.java
@@ -51,10 +51,10 @@ public class JAASExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perfom a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4.Create a JMS Connection with user "jboss" and password "redhat"
connection = cf.createConnection("jboss", "redhat");
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jaas/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jaas/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/jaas/src/main/resources/hornetq/server0/activemq-jms.xml
index 3058fc8..0d5c953 100644
--- a/examples/jms/jaas/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/jaas/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-auto-closeable/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-auto-closeable/pom.xml b/examples/jms/jms-auto-closeable/pom.xml
index 8468aa4..d0c49da 100644
--- a/examples/jms/jms-auto-closeable/pom.xml
+++ b/examples/jms/jms-auto-closeable/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.JMSAutoCloseableExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-auto-closeable/src/main/java/org/apache/activemq/jms/example/JMSAutoCloseableExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/jms-auto-closeable/src/main/java/org/apache/activemq/jms/example/JMSAutoCloseableExample.java b/examples/jms/jms-auto-closeable/src/main/java/org/apache/activemq/jms/example/JMSAutoCloseableExample.java
index fa58f45..d832771 100644
--- a/examples/jms/jms-auto-closeable/src/main/java/org/apache/activemq/jms/example/JMSAutoCloseableExample.java
+++ b/examples/jms/jms-auto-closeable/src/main/java/org/apache/activemq/jms/example/JMSAutoCloseableExample.java
@@ -43,10 +43,10 @@ public class JMSAutoCloseableExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perfom a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4.Create a JMS Context using the try-with-resources statement
try
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-auto-closeable/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-auto-closeable/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/jms-auto-closeable/src/main/resources/hornetq/server0/activemq-jms.xml
index 3058fc8..0d5c953 100644
--- a/examples/jms/jms-auto-closeable/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/jms-auto-closeable/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-bridge/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-bridge/pom.xml b/examples/jms/jms-bridge/pom.xml
index fec058c..20231fc 100644
--- a/examples/jms/jms-bridge/pom.xml
+++ b/examples/jms/jms-bridge/pom.xml
@@ -77,8 +77,8 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.JMSBridgeExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5455</param>
</args>
<systemProperties>
<property>
@@ -143,11 +143,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-bridge/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/jms-bridge/readme.html b/examples/jms/jms-bridge/readme.html
index 6a5959b..827d173 100644
--- a/examples/jms/jms-bridge/readme.html
+++ b/examples/jms/jms-bridge/readme.html
@@ -11,8 +11,8 @@
<img src="jms-bridge.png" />
<p>The example will use two ActiveMQ servers:</p>
<ul>
- <li>Server #0 – the <em>Source</em> server. It will be configured with a JMS Topic bound to JNDI under <code>/source/topic</code>
- <li>Server #1 – the <em>Target</em> server. It will be configured with a JMS Queue bound to JNDI under <code>/target/queue</code><br />
+ <li>Server #0 – the <em>Source</em> server. It will be configured with a JMS Topic bound to JNDI under <code>source/topic</code>
+ <li>Server #1 – the <em>Target</em> server. It will be configured with a JMS Queue bound to JNDI under <code>target/queue</code><br />
</ul>
<p>Both ActiveMQ server will run their own JNDI server used by the JMS Bridge and the JMS Client to lookup JMS
resources (ConnectionFactory and Destination).</p>
@@ -102,10 +102,10 @@
<li>We then create a JMS Bridge and start it, Note, the Bridge needs a transaction manager, in this instance we will use the JBoss TM</li>
<pre class="prettyprint">
JMSBridge jmsBridge = new JMSBridgeImpl(
- new JNDIConnectionFactoryFactory(sourceJndiParams, "/source/ConnectionFactory"),
- new JNDIConnectionFactoryFactory(targetJndiParams, "/target/ConnectionFactory"),
- new JNDIDestinationFactory(sourceJndiParams, "/source/topic"),
- new JNDIDestinationFactory(targetJndiParams, "/target/queue"),
+ new JNDIConnectionFactoryFactory(sourceJndiParams, "source/ConnectionFactory"),
+ new JNDIConnectionFactoryFactory(targetJndiParams, "target/ConnectionFactory"),
+ new JNDIDestinationFactory(sourceJndiParams, "source/topic"),
+ new JNDIDestinationFactory(targetJndiParams, "target/queue"),
null,
null,
null,
@@ -125,8 +125,8 @@
</pre>
<li>We look up the JMS resources from the Source server</li>
<pre class="prettyprint">
- ConnectionFactory sourceConnectionFactory = (ConnectionFactory)sourceContext.lookup("/source/ConnectionFactory");
- Topic sourceTopic = (Topic)sourceContext.lookup("/source/topic");
+ ConnectionFactory sourceConnectionFactory = (ConnectionFactory)sourceContext.lookup("source/ConnectionFactory");
+ Topic sourceTopic = (Topic)sourceContext.lookup("source/topic");
</pre>
<li>We create JMS objects to send a message to the source destination</li>
@@ -153,8 +153,8 @@
<li>We look up the JMS resources from the target server</li>
<pre class="prettyprint">
- ConnectionFactory targetConnectionFactory = (ConnectionFactory)targetContext.lookup("/target/ConnectionFactory");
- Queue targetQueue = (Queue)targetContext.lookup("/target/queue");
+ ConnectionFactory targetConnectionFactory = (ConnectionFactory)targetContext.lookup("target/ConnectionFactory");
+ Queue targetQueue = (Queue)targetContext.lookup("target/queue");
</pre>
<li>We create JMS objects to receive a message from the target destination</li>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-bridge/src/main/java/org/apache/activemq/jms/example/JMSBridgeExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/jms-bridge/src/main/java/org/apache/activemq/jms/example/JMSBridgeExample.java b/examples/jms/jms-bridge/src/main/java/org/apache/activemq/jms/example/JMSBridgeExample.java
index 690deaf..0126251 100644
--- a/examples/jms/jms-bridge/src/main/java/org/apache/activemq/jms/example/JMSBridgeExample.java
+++ b/examples/jms/jms-bridge/src/main/java/org/apache/activemq/jms/example/JMSBridgeExample.java
@@ -66,10 +66,10 @@ public class JMSBridgeExample
// Step 2. Create and start a JMS Bridge
// Note, the Bridge needs a transaction manager, in this instance we will use the JBoss TM
JMSBridge jmsBridge = new JMSBridgeImpl(
- new JNDIConnectionFactoryFactory(sourceJndiParams, "/source/ConnectionFactory"),
- new JNDIConnectionFactoryFactory(targetJndiParams, "/target/ConnectionFactory"),
- new JNDIDestinationFactory(sourceJndiParams, "/source/topic"),
- new JNDIDestinationFactory(targetJndiParams, "/target/queue"),
+ new JNDIConnectionFactoryFactory(sourceJndiParams, "source/ConnectionFactory"),
+ new JNDIConnectionFactoryFactory(targetJndiParams, "target/ConnectionFactory"),
+ new JNDIDestinationFactory(sourceJndiParams, "source/topic"),
+ new JNDIDestinationFactory(targetJndiParams, "target/queue"),
null,
null,
null,
@@ -111,8 +111,8 @@ public class JMSBridgeExample
sourceConnection.close();
// Step 7. Lookup the *target* JMS resources
- ConnectionFactory targetConnectionFactory = (ConnectionFactory)targetContext.lookup("/client/ConnectionFactory");
- Queue targetQueue = (Queue)targetContext.lookup("/target/queue");
+ ConnectionFactory targetConnectionFactory = (ConnectionFactory)targetContext.lookup("client/ConnectionFactory");
+ Queue targetQueue = (Queue)targetContext.lookup("target/queue");
// Step 8. Create a connection, a session and a message consumer for the *target* queue
targetConnection = targetConnectionFactory.createConnection();
@@ -168,8 +168,7 @@ public class JMSBridgeExample
{
Hashtable<String, String> jndiProps = new Hashtable<String, String>();
jndiProps.put("java.naming.provider.url", server);
- jndiProps.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
- jndiProps.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
+ jndiProps.put("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
return jndiProps;
}
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-bridge/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-bridge/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/jms-bridge/src/main/resources/hornetq/server0/activemq-jms.xml
index c9beb0e..e2bb478 100644
--- a/examples/jms/jms-bridge/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/jms-bridge/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -2,26 +2,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <connection-factory name="ConnectionFactory">
- <xa>true</xa>
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="/source/ConnectionFactory"/>
- </entries>
- </connection-factory>
+ <topic name="topic"/>
- <connection-factory name="ClientConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="/client/ConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <topic name="topic">
- <entry name="/source/topic"/>
- </topic>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-bridge/src/main/resources/hornetq/server0/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/jms-bridge/src/main/resources/hornetq/server0/jndi.properties b/examples/jms/jms-bridge/src/main/resources/hornetq/server0/jndi.properties
deleted file mode 100644
index 66bc507..0000000
--- a/examples/jms/jms-bridge/src/main/resources/hornetq/server0/jndi.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-bridge/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-bridge/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/jms-bridge/src/main/resources/hornetq/server1/activemq-jms.xml
index d496c12..0f89939 100644
--- a/examples/jms/jms-bridge/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/jms-bridge/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -2,26 +2,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <connection-factory name="ConnectionFactory">
- <xa>true</xa>
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="/target/ConnectionFactory"/>
- </entries>
- </connection-factory>
+ <queue name="target"/>
- <connection-factory name="ClientConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="/client/ConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <queue name="target">
- <entry name="/target/queue"/>
- </queue>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-bridge/src/main/resources/hornetq/server1/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/jms-bridge/src/main/resources/hornetq/server1/jndi.properties b/examples/jms/jms-bridge/src/main/resources/hornetq/server1/jndi.properties
deleted file mode 100644
index 66bc507..0000000
--- a/examples/jms/jms-bridge/src/main/resources/hornetq/server1/jndi.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-completion-listener/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-completion-listener/pom.xml b/examples/jms/jms-completion-listener/pom.xml
index 302d535..c7909ab 100644
--- a/examples/jms/jms-completion-listener/pom.xml
+++ b/examples/jms/jms-completion-listener/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.JMSCompletionListenerExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-completion-listener/src/main/java/org/apache/activemq/jms/example/JMSCompletionListenerExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/jms-completion-listener/src/main/java/org/apache/activemq/jms/example/JMSCompletionListenerExample.java b/examples/jms/jms-completion-listener/src/main/java/org/apache/activemq/jms/example/JMSCompletionListenerExample.java
index 7be10ac..fdb66fe 100644
--- a/examples/jms/jms-completion-listener/src/main/java/org/apache/activemq/jms/example/JMSCompletionListenerExample.java
+++ b/examples/jms/jms-completion-listener/src/main/java/org/apache/activemq/jms/example/JMSCompletionListenerExample.java
@@ -52,10 +52,10 @@ public class JMSCompletionListenerExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perfom a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4.Create a JMS Context
jmsContext = cf.createContext();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-completion-listener/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-completion-listener/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/jms-completion-listener/src/main/resources/hornetq/server0/activemq-jms.xml
index 3058fc8..0d5c953 100644
--- a/examples/jms/jms-completion-listener/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/jms-completion-listener/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-context/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-context/pom.xml b/examples/jms/jms-context/pom.xml
index e2737e5..8371058 100644
--- a/examples/jms/jms-context/pom.xml
+++ b/examples/jms/jms-context/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.JMSContextExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-context/src/main/java/org/apache/activemq/jms/example/JMSContextExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/jms-context/src/main/java/org/apache/activemq/jms/example/JMSContextExample.java b/examples/jms/jms-context/src/main/java/org/apache/activemq/jms/example/JMSContextExample.java
index 16f7d42..9a78e7c 100644
--- a/examples/jms/jms-context/src/main/java/org/apache/activemq/jms/example/JMSContextExample.java
+++ b/examples/jms/jms-context/src/main/java/org/apache/activemq/jms/example/JMSContextExample.java
@@ -47,10 +47,10 @@ public class JMSContextExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perfom a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4.Create a JMS Context
jmsContext = cf.createContext();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-shared-consumer/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-shared-consumer/pom.xml b/examples/jms/jms-shared-consumer/pom.xml
index 7c2bd38..c59597a 100644
--- a/examples/jms/jms-shared-consumer/pom.xml
+++ b/examples/jms/jms-shared-consumer/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.JMSSharedConsumerExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-shared-consumer/src/main/java/org/apache/activemq/jms/example/JMSSharedConsumerExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/jms-shared-consumer/src/main/java/org/apache/activemq/jms/example/JMSSharedConsumerExample.java b/examples/jms/jms-shared-consumer/src/main/java/org/apache/activemq/jms/example/JMSSharedConsumerExample.java
index 524d8af..70c8ec5 100644
--- a/examples/jms/jms-shared-consumer/src/main/java/org/apache/activemq/jms/example/JMSSharedConsumerExample.java
+++ b/examples/jms/jms-shared-consumer/src/main/java/org/apache/activemq/jms/example/JMSSharedConsumerExample.java
@@ -55,10 +55,10 @@ public class JMSSharedConsumerExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perfom a lookup on the queue
- Topic topic = (Topic) initialContext.lookup("/topic/exampleTopic");
+ Topic topic = (Topic) initialContext.lookup("topic/exampleTopic");
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4.Create a JMS Context
jmsContext = cf.createContext();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jms-shared-consumer/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-shared-consumer/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/jms-shared-consumer/src/main/resources/hornetq/server0/activemq-jms.xml
index 8c54278..a053116 100644
--- a/examples/jms/jms-shared-consumer/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/jms-shared-consumer/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the topic used by the example-->
- <topic name="exampleTopic">
- <entry name="/topic/exampleTopic"/>
- </topic>
+ <topic name="exampleTopic"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jmx/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jmx/pom.xml b/examples/jms/jmx/pom.xml
index ede344e..88d0ae6 100644
--- a/examples/jms/jmx/pom.xml
+++ b/examples/jms/jmx/pom.xml
@@ -80,7 +80,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.JMXExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -127,11 +127,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jmx/src/main/java/org/apache/activemq/jms/example/JMXExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/jmx/src/main/java/org/apache/activemq/jms/example/JMXExample.java b/examples/jms/jmx/src/main/java/org/apache/activemq/jms/example/JMXExample.java
index 17a24b4..af7e21f 100644
--- a/examples/jms/jmx/src/main/java/org/apache/activemq/jms/example/JMXExample.java
+++ b/examples/jms/jmx/src/main/java/org/apache/activemq/jms/example/JMXExample.java
@@ -63,10 +63,10 @@ public class JMXExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perfom a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- QueueConnectionFactory cf = (QueueConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ QueueConnectionFactory cf = (QueueConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4.Create a JMS Connection
connection = cf.createQueueConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/jmx/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jmx/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/jmx/src/main/resources/hornetq/server0/activemq-jms.xml
index 2fa9178..b53cafe 100644
--- a/examples/jms/jmx/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/jmx/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,9 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory" signature="queue">
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
+ <queue name="exampleQueue"/>
</queue>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/large-message/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/large-message/pom.xml b/examples/jms/large-message/pom.xml
index b1db82f..312ca1a 100644
--- a/examples/jms/large-message/pom.xml
+++ b/examples/jms/large-message/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.LargeMessageExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
<systemProperties>
<property>
@@ -105,11 +105,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/large-message/src/main/java/org/apache/activemq/jms/example/LargeMessageExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/large-message/src/main/java/org/apache/activemq/jms/example/LargeMessageExample.java b/examples/jms/large-message/src/main/java/org/apache/activemq/jms/example/LargeMessageExample.java
index 9d3cddc..7ffc7b9 100644
--- a/examples/jms/large-message/src/main/java/org/apache/activemq/jms/example/LargeMessageExample.java
+++ b/examples/jms/large-message/src/main/java/org/apache/activemq/jms/example/LargeMessageExample.java
@@ -70,12 +70,12 @@ public class LargeMessageExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perfom a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory. This ConnectionFactory has a special attribute set on
// it.
// Messages with more than 10K are considered large
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. Create the JMS objects
connection = cf.createConnection();
@@ -139,9 +139,9 @@ public class LargeMessageExample extends ActiveMQExample
initialContext = getContext(0);
- queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ queue = (Queue)initialContext.lookup("queue/exampleQueue");
- cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/large-message/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/large-message/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/large-message/src/main/resources/hornetq/server0/activemq-jms.xml
index cfd7043..0d5c953 100644
--- a/examples/jms/large-message/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/large-message/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,20 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <min-large-message-size>10240</min-large-message-size>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/last-value-queue/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/last-value-queue/pom.xml b/examples/jms/last-value-queue/pom.xml
index b138e82..bfefd5f 100644
--- a/examples/jms/last-value-queue/pom.xml
+++ b/examples/jms/last-value-queue/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.LastValueQueueExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/last-value-queue/src/main/java/org/apache/activemq/jms/example/LastValueQueueExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/last-value-queue/src/main/java/org/apache/activemq/jms/example/LastValueQueueExample.java b/examples/jms/last-value-queue/src/main/java/org/apache/activemq/jms/example/LastValueQueueExample.java
index 73e2ff2..d62ea0b 100644
--- a/examples/jms/last-value-queue/src/main/java/org/apache/activemq/jms/example/LastValueQueueExample.java
+++ b/examples/jms/last-value-queue/src/main/java/org/apache/activemq/jms/example/LastValueQueueExample.java
@@ -55,10 +55,10 @@ public class LastValueQueueExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perfom a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/lastValueQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4.Create a JMS Connection, session and producer on the queue
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/last-value-queue/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/last-value-queue/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/last-value-queue/src/main/resources/hornetq/server0/activemq-jms.xml
index ad731a8..847659f 100644
--- a/examples/jms/last-value-queue/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/last-value-queue/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,18 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="lastValueQueue">
- <entry name="/queue/lastValueQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
+
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/management-notifications/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/management-notifications/pom.xml b/examples/jms/management-notifications/pom.xml
index 605b4eb..4afe1d4 100644
--- a/examples/jms/management-notifications/pom.xml
+++ b/examples/jms/management-notifications/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ManagementNotificationExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/management-notifications/src/main/java/org/apache/activemq/jms/example/ManagementNotificationExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/management-notifications/src/main/java/org/apache/activemq/jms/example/ManagementNotificationExample.java b/examples/jms/management-notifications/src/main/java/org/apache/activemq/jms/example/ManagementNotificationExample.java
index f33decd..b98f825 100644
--- a/examples/jms/management-notifications/src/main/java/org/apache/activemq/jms/example/ManagementNotificationExample.java
+++ b/examples/jms/management-notifications/src/main/java/org/apache/activemq/jms/example/ManagementNotificationExample.java
@@ -55,10 +55,10 @@ public class ManagementNotificationExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perform a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4.Create a JMS connection, a session and a producer for the queue
connection = cf.createConnection();
@@ -66,7 +66,7 @@ public class ManagementNotificationExample extends ActiveMQExample
MessageProducer producer = session.createProducer(queue);
// Step 5. Perform a lookup on the notifications topic
- Topic notificationsTopic = (Topic)initialContext.lookup("/topic/notificationsTopic");
+ Topic notificationsTopic = (Topic)initialContext.lookup("topic/notificationsTopic");
// Step 6. Create a JMS message consumer for the notification queue and set its message listener
// It will display all the properties of the JMS Message
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/management-notifications/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/management-notifications/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/management-notifications/src/main/resources/hornetq/server0/activemq-jms.xml
index 7b997ee..65e5a5c 100644
--- a/examples/jms/management-notifications/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/management-notifications/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,23 +1,11 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
<!--the notifications topic used by the example-->
- <topic name="notificationsTopic">
- <entry name="/topic/notificationsTopic"/>
- </topic>
+ <topic name="notificationsTopic"/>
+
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/management/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/management/pom.xml b/examples/jms/management/pom.xml
index 41192c6..8fecd6f 100644
--- a/examples/jms/management/pom.xml
+++ b/examples/jms/management/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ManagementExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/management/src/main/java/org/apache/activemq/jms/example/ManagementExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/management/src/main/java/org/apache/activemq/jms/example/ManagementExample.java b/examples/jms/management/src/main/java/org/apache/activemq/jms/example/ManagementExample.java
index e7af331..1ab1ac4 100644
--- a/examples/jms/management/src/main/java/org/apache/activemq/jms/example/ManagementExample.java
+++ b/examples/jms/management/src/main/java/org/apache/activemq/jms/example/ManagementExample.java
@@ -55,10 +55,10 @@ public class ManagementExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perfom a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- QueueConnectionFactory cf = (QueueConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ QueueConnectionFactory cf = (QueueConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4.Create a JMS Connection
connection = cf.createQueueConnection();
[11/13] activemq-6 git commit: ACTIVEMQ6-14 Replace JNDI server with
client impl
Posted by cl...@apache.org.
ACTIVEMQ6-14 Replace JNDI server with client impl
Project: http://git-wip-us.apache.org/repos/asf/activemq-6/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-6/commit/e6a3d3a0
Tree: http://git-wip-us.apache.org/repos/asf/activemq-6/tree/e6a3d3a0
Diff: http://git-wip-us.apache.org/repos/asf/activemq-6/diff/e6a3d3a0
Branch: refs/heads/master
Commit: e6a3d3a0c5962b7c83b2fa3693bc12cb3e5ed02e
Parents: e419feb
Author: jbertram <jb...@redhat.com>
Authored: Wed Dec 3 08:50:16 2014 -0600
Committer: jbertram <jb...@redhat.com>
Committed: Fri Dec 5 09:27:52 2014 -0600
----------------------------------------------------------------------
.gitignore | 5 -
.../org/apache/activemq/cli/commands/Run.java | 16 -
.../java/org/apache/activemq/dto/BrokerDTO.java | 3 -
.../java/org/apache/activemq/dto/NamingDTO.java | 39 -
.../org/apache/activemq/dto/jaxb.index | 1 -
.../jndi/ActiveMQInitialContextFactory.java | 496 +++++++++++++
.../apache/activemq/jndi/LazyCreateContext.java | 43 ++
.../apache/activemq/jndi/NameParserImpl.java | 30 +
.../apache/activemq/jndi/ReadOnlyContext.java | 534 ++++++++++++++
activemq-jms-server/pom.xml | 4 -
.../jms/server/JMSServerConfigParser.java | 9 -
.../jms/server/embedded/EmbeddedJMS.java | 6 +
.../server/impl/JMSServerConfigParserImpl.java | 339 +--------
.../jms/server/impl/JMSServerDeployer.java | 48 +-
.../jms/server/impl/JMSServerManagerImpl.java | 14 +-
.../jms/server/impl/StandaloneNamingServer.java | 170 -----
.../src/main/resources/schema/activemq-jms.xsd | 272 +------
activemq-ra/pom.xml | 7 +
.../integration/EmbeddedRestActiveMQJMS.java | 4 +
.../rest/queue/QueueDestinationsResource.java | 7 -
.../rest/topic/TopicDestinationsResource.java | 7 -
.../apache/activemq/rest/test/EmbeddedTest.java | 14 +-
.../src/test/resources/activemq-jms.xml | 13 +-
distribution/activemq/pom.xml | 5 -
distribution/activemq/src/main/assembly/dep.xml | 1 -
.../activemq/src/main/resources/bin/activemq | 4 +-
.../src/main/resources/bin/activemq.cmd | 2 +-
.../resources/config/clustered/activemq-jms.xml | 48 +-
.../resources/config/clustered/jndi.properties | 2 -
.../config/non-clustered/activemq-jms.xml | 48 +-
.../config/non-clustered/jndi.properties | 2 -
.../replicated/activemq-configuration.xml | 2 +-
.../config/replicated/activemq-jms.xml | 48 +-
.../resources/config/replicated/jndi.properties | 2 -
.../shared-store/activemq-configuration.xml | 2 +-
.../config/shared-store/activemq-jms.xml | 48 +-
.../config/shared-store/jndi.properties | 2 -
distribution/jnp-client/pom.xml | 75 --
distribution/pom.xml | 5 -
docs/user-manual/en/appserver-integration.xml | 53 +-
docs/user-manual/en/client-classpath.xml | 7 -
docs/user-manual/en/client-reconnection.xml | 25 +-
docs/user-manual/en/clusters.xml | 65 +-
docs/user-manual/en/configuration-index.xml | 330 +--------
docs/user-manual/en/configuring-transports.xml | 29 +-
docs/user-manual/en/flow-control.xml | 79 +-
docs/user-manual/en/interoperability.xml | 5 +-
docs/user-manual/en/large-messages.xml | 41 +-
docs/user-manual/en/logging.xml | 18 +-
docs/user-manual/en/message-grouping.xml | 37 +-
docs/user-manual/en/pre-acknowledge.xml | 16 +-
docs/user-manual/en/spring-integration.xml | 13 +-
docs/user-manual/en/thread-pooling.xml | 22 +-
docs/user-manual/en/using-jms.xml | 388 +++++-----
examples/core/embedded-remote/pom.xml | 5 -
examples/core/embedded/pom.xml | 5 -
examples/core/perf/pom.xml | 10 -
examples/core/vertx-connector/pom.xml | 10 -
.../src/main/resources/server0/activemq-jms.xml | 13 +-
.../config/server.properties | 2 +-
.../common/example/ActiveMQExample.java | 5 +-
examples/jms/aerogear/pom.xml | 7 +-
.../activemq/jms/example/AerogearExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/applet/pom.xml | 7 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/application-layer-failover/pom.xml | 9 +-
.../ApplicationLayerFailoverExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../resources/hornetq/server1/activemq-jms.xml | 13 +-
examples/jms/bridge/pom.xml | 9 +-
.../activemq/jms/example/BridgeExample.java | 8 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../resources/hornetq/server1/activemq-jms.xml | 13 +-
examples/jms/browser/pom.xml | 7 +-
.../jms/example/QueueBrowserExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/client-kickoff/pom.xml | 7 +-
.../jms/example/ClientKickoffExample.java | 2 +-
.../resources/hornetq/server0/activemq-jms.xml | 9 -
.../jms/client-side-failoverlistener/pom.xml | 9 +-
.../ClientSideFailoverListerExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 27 +-
.../resources/hornetq/server1/activemq-jms.xml | 26 +-
examples/jms/client-side-load-balancing/pom.xml | 9 +-
.../example/ClientSideLoadBalancingExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 11 +-
.../resources/hornetq/server1/activemq-jms.xml | 11 +-
.../resources/hornetq/server2/activemq-jms.xml | 11 +-
.../jms/clustered-durable-subscription/pom.xml | 9 +-
.../ClusteredDurableSubscriptionExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../resources/hornetq/server1/activemq-jms.xml | 13 +-
examples/jms/clustered-grouping/pom.xml | 11 +-
.../jms/example/ClusteredGroupingExample.java | 8 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../resources/hornetq/server1/activemq-jms.xml | 13 +-
.../resources/hornetq/server2/activemq-jms.xml | 13 +-
examples/jms/clustered-jgroups/pom.xml | 9 +-
.../jms/example/ClusteredJgroupsExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../hornetq/server0/client-jndi.properties | 5 +-
.../resources/hornetq/server1/activemq-jms.xml | 13 +-
.../hornetq/server1/client-jndi.properties | 5 +-
examples/jms/clustered-queue/pom.xml | 9 +-
.../jms/example/ClusteredQueueExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../resources/hornetq/server1/activemq-jms.xml | 13 +-
examples/jms/clustered-standalone/pom.xml | 11 +-
.../jms/example/ClusteredStandaloneExample.java | 8 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../resources/hornetq/server1/activemq-jms.xml | 12 +-
.../resources/hornetq/server2/activemq-jms.xml | 13 +-
examples/jms/clustered-static-discovery/pom.xml | 13 +-
.../example/StaticClusteredQueueExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 25 +-
.../resources/hornetq/server0/jndi.properties | 2 -
.../resources/hornetq/server1/activemq-jms.xml | 25 +-
.../resources/hornetq/server1/jndi.properties | 2 -
.../resources/hornetq/server2/activemq-jms.xml | 26 +-
.../resources/hornetq/server2/jndi.properties | 17 -
.../resources/hornetq/server3/activemq-jms.xml | 26 +-
.../resources/hornetq/server3/jndi.properties | 2 -
examples/jms/clustered-static-oneway/pom.xml | 11 +-
.../jms/example/ClusterStaticOnewayExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 25 +-
.../resources/hornetq/server0/jndi.properties | 2 -
.../resources/hornetq/server1/activemq-jms.xml | 25 +-
.../resources/hornetq/server1/jndi.properties | 2 -
.../resources/hornetq/server2/activemq-jms.xml | 26 +-
.../resources/hornetq/server2/jndi.properties | 18 -
examples/jms/clustered-topic/pom.xml | 9 +-
.../jms/example/ClusteredTopicExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../resources/hornetq/server1/activemq-jms.xml | 13 +-
.../jms/colocated-failover-scale-down/pom.xml | 9 +-
.../ColocatedFailoverScaleDownExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 24 +-
.../resources/hornetq/server1/activemq-jms.xml | 24 +-
examples/jms/colocated-failover/pom.xml | 9 +-
.../jms/example/ColocatedFailoverExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 24 +-
.../resources/hornetq/server1/activemq-jms.xml | 25 +-
examples/jms/consumer-rate-limit/pom.xml | 7 +-
.../jms/example/ConsumerRateLimitExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 18 +-
.../hornetq/server0/client-jndi.properties | 5 +-
examples/jms/dead-letter/pom.xml | 7 +-
.../activemq/jms/example/DeadLetterExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 17 +-
.../hornetq/server0/client-jndi.properties | 5 +-
examples/jms/delayed-redelivery/pom.xml | 7 +-
.../jms/example/DelayedRedeliveryExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 17 +-
.../hornetq/server0/client-jndi.properties | 5 +-
examples/jms/divert/pom.xml | 9 +-
.../activemq/jms/example/DivertExample.java | 12 +-
.../resources/hornetq/server0/activemq-jms.xml | 28 +-
.../resources/hornetq/server1/activemq-jms.xml | 15 +-
examples/jms/durable-subscription/pom.xml | 7 +-
.../jms/example/DurableSubscriptionExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../hornetq/server0/client-jndi.properties | 5 +-
examples/jms/embedded-simple/pom.xml | 9 +-
.../activemq/jms/example/EmbeddedExample.java | 2 +-
.../src/main/resources/activemq-jms.xml | 13 +-
examples/jms/embedded/pom.xml | 9 +-
examples/jms/embedded/readme.html | 27 +-
.../activemq/jms/example/EmbeddedExample.java | 4 +-
examples/jms/expiry/pom.xml | 7 +-
.../activemq/jms/example/ExpiryExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 17 +-
examples/jms/ha-policy-autobackup/pom.xml | 9 +-
.../jms/example/HAPolicyAutoBackupExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 24 +-
examples/jms/http-transport/pom.xml | 7 +-
.../jms/example/HttpTransportExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../jms/instantiate-connection-factory/pom.xml | 7 +-
examples/jms/interceptor/pom.xml | 7 +-
.../jms/example/InterceptorExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/jaas/pom.xml | 7 +-
.../activemq/jms/example/JAASExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/jms-auto-closeable/pom.xml | 7 +-
.../jms/example/JMSAutoCloseableExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/jms-bridge/pom.xml | 9 +-
examples/jms/jms-bridge/readme.html | 20 +-
.../activemq/jms/example/JMSBridgeExample.java | 15 +-
.../resources/hornetq/server0/activemq-jms.xml | 22 +-
.../resources/hornetq/server0/jndi.properties | 2 -
.../resources/hornetq/server1/activemq-jms.xml | 22 +-
.../resources/hornetq/server1/jndi.properties | 2 -
examples/jms/jms-completion-listener/pom.xml | 7 +-
.../example/JMSCompletionListenerExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/jms-context/pom.xml | 7 +-
.../activemq/jms/example/JMSContextExample.java | 4 +-
examples/jms/jms-shared-consumer/pom.xml | 7 +-
.../jms/example/JMSSharedConsumerExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/jmx/pom.xml | 7 +-
.../apache/activemq/jms/example/JMXExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 12 +-
examples/jms/large-message/pom.xml | 7 +-
.../jms/example/LargeMessageExample.java | 8 +-
.../resources/hornetq/server0/activemq-jms.xml | 14 +-
examples/jms/last-value-queue/pom.xml | 7 +-
.../jms/example/LastValueQueueExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 14 +-
examples/jms/management-notifications/pom.xml | 7 +-
.../example/ManagementNotificationExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 18 +-
examples/jms/management/pom.xml | 7 +-
.../activemq/jms/example/ManagementExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 14 +-
examples/jms/message-counters/pom.xml | 7 +-
.../jms/example/MessageCounterExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 17 +-
examples/jms/message-group/pom.xml | 7 +-
.../jms/example/MessageGroupExample.java | 4 +-
.../resources/hornetq/server0/hornetq-jms.xml | 13 +-
examples/jms/message-group2/pom.xml | 7 +-
.../jms/example/MessageGroup2Example.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 14 +-
examples/jms/message-priority/pom.xml | 7 +-
.../jms/example/MessagePriorityExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/multiple-failover-failback/pom.xml | 11 +-
.../MultipleFailoverFailbackExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 27 +-
.../resources/hornetq/server1/activemq-jms.xml | 26 +-
.../resources/hornetq/server2/activemq-jms.xml | 26 +-
examples/jms/multiple-failover/pom.xml | 11 +-
.../jms/example/MultipleFailoverExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 27 +-
.../resources/hornetq/server1/activemq-jms.xml | 26 +-
.../resources/hornetq/server2/activemq-jms.xml | 26 +-
examples/jms/no-consumer-buffering/pom.xml | 7 +-
.../jms/example/NoConsumerBufferingExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 18 +-
examples/jms/non-transaction-failover/pom.xml | 9 +-
.../example/NonTransactionFailoverExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 26 +-
.../resources/hornetq/server1/activemq-jms.xml | 26 +-
examples/jms/openwire/pom.xml | 7 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/paging/pom.xml | 7 +-
.../activemq/jms/example/PagingExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 17 +-
examples/jms/perf/pom.xml | 10 -
.../src/main/resources/client.jndi.properties | 5 +-
.../resources/hornetq/server0/activemq-jms.xml | 15 +-
examples/jms/pre-acknowledge/pom.xml | 7 +-
.../jms/example/PreacknowledgeExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/producer-rate-limit/pom.xml | 7 +-
.../jms/example/ProducerRateLimitExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 18 +-
examples/jms/proton-cpp/pom.xml | 10 -
examples/jms/proton-j/pom.xml | 7 +-
examples/jms/proton-ruby/pom.xml | 5 -
.../jms/queue-message-redistribution/pom.xml | 9 +-
.../QueueMessageRedistributionExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../resources/hornetq/server1/activemq-jms.xml | 13 +-
examples/jms/queue-requestor/pom.xml | 7 +-
.../jms/example/QueueRequestorExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/queue-selector/pom.xml | 7 +-
.../jms/example/QueueSelectorExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/queue/pom.xml | 7 +-
.../activemq/jms/example/QueueExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/reattach-node/pom.xml | 7 +-
.../activemq/jms/example/ReattachExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 45 +-
examples/jms/replicated-failback-static/pom.xml | 9 +-
.../ReplicatedFailbackStaticExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 27 +-
.../resources/hornetq/server1/activemq-jms.xml | 26 +-
examples/jms/replicated-failback/pom.xml | 9 +-
.../jms/example/ReplicatedFailbackExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 27 +-
.../resources/hornetq/server1/activemq-jms.xml | 26 +-
.../jms/replicated-multiple-failover/pom.xml | 11 +-
.../ReplicatedMultipleFailoverExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 27 +-
.../resources/hornetq/server1/activemq-jms.xml | 26 +-
.../resources/hornetq/server2/activemq-jms.xml | 26 +-
.../jms/replicated-transaction-failover/pom.xml | 9 +-
.../ReplicatedTransactionFailoverExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 25 +-
.../resources/hornetq/server1/activemq-jms.xml | 25 +-
examples/jms/request-reply/pom.xml | 7 +-
.../jms/example/RequestReplyExample.java | 8 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../src/main/resources/activemq-jms.xml | 13 +-
.../src/main/resources/activemq-jms.xml | 13 +-
.../src/main/resources/activemq-jms.xml | 13 +-
.../push/src/main/resources/activemq-jms.xml | 19 +-
examples/jms/scale-down/pom.xml | 9 +-
.../activemq/jms/example/ScaleDownExample.java | 6 +-
.../resources/hornetq/server0/activemq-jms.xml | 24 +-
.../resources/hornetq/server1/activemq-jms.xml | 24 +-
examples/jms/scheduled-message/pom.xml | 7 +-
.../jms/example/ScheduledMessageExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/security/pom.xml | 7 +-
.../activemq/jms/example/SecurityExample.java | 8 +-
.../resources/hornetq/server0/activemq-jms.xml | 23 +-
examples/jms/send-acknowledgements/pom.xml | 7 +-
.../example/SendAcknowledgementsExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 14 +-
examples/jms/spring-integration/pom.xml | 7 +-
.../src/main/resources/activemq-jms.xml | 13 +-
examples/jms/ssl-enabled/pom.xml | 7 +-
.../apache/activemq/jms/example/SSLExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/static-selector-jms/pom.xml | 7 +-
.../jms/example/StaticSelectorJMSExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 12 +-
examples/jms/static-selector/pom.xml | 7 +-
.../jms/example/StaticSelectorExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/stomp-websockets/pom.xml | 7 +-
.../jms/example/StompWebSocketExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/stomp/pom.xml | 7 +-
.../activemq/jms/example/StompExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/stomp1.1/pom.xml | 7 +-
.../activemq/jms/example/StompExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/stomp1.2/pom.xml | 7 +-
.../activemq/jms/example/StompExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/stop-server-failover/pom.xml | 9 +-
.../jms/example/StopServerFailoverExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 26 +-
.../resources/hornetq/server1/activemq-jms.xml | 26 +-
examples/jms/symmetric-cluster/pom.xml | 17 +-
.../resources/hornetq/server0/activemq-jms.xml | 17 +-
.../resources/hornetq/server1/activemq-jms.xml | 17 +-
.../resources/hornetq/server2/activemq-jms.xml | 17 +-
.../resources/hornetq/server3/activemq-jms.xml | 17 +-
.../resources/hornetq/server4/activemq-jms.xml | 17 +-
.../resources/hornetq/server5/activemq-jms.xml | 17 +-
examples/jms/temp-queue/pom.xml | 7 +-
.../jms/example/TemporaryQueueExample.java | 2 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/topic-hierarchies/pom.xml | 7 +-
.../jms/example/TopicHierarchyExample.java | 2 +-
.../resources/hornetq/server0/activemq-jms.xml | 33 +-
examples/jms/topic-selector-example1/pom.xml | 7 +-
.../jms/example/TopicSelectorExample1.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/topic-selector-example2/pom.xml | 7 +-
.../jms/example/TopicSelectorExample2.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/topic/pom.xml | 7 +-
.../activemq/jms/example/TopicExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
.../hornetq/server0/client-jndi.properties | 5 +-
examples/jms/transaction-failover/pom.xml | 9 +-
.../jms/example/TransactionFailoverExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 25 +-
.../resources/hornetq/server1/activemq-jms.xml | 25 +-
examples/jms/transactional/pom.xml | 7 +-
.../jms/example/TransactionalExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 13 +-
examples/jms/xa-heuristic/pom.xml | 7 +-
.../jms/example/XAHeuristicExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 14 +-
examples/jms/xa-receive/pom.xml | 7 +-
.../activemq/jms/example/XAReceiveExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 14 +-
examples/jms/xa-send/pom.xml | 7 +-
.../activemq/jms/example/XASendExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 14 +-
examples/jms/xa-with-jta/pom.xml | 7 +-
.../activemq/jms/example/XAwithJTAExample.java | 4 +-
.../resources/hornetq/server0/activemq-jms.xml | 14 +-
examples/soak/normal/pom.xml | 13 +-
examples/soak/normal/server0/activemq-jms.xml | 18 +-
.../activemq/jms/soak/example/SoakReceiver.java | 5 +-
.../activemq/jms/soak/example/SoakSender.java | 5 +-
pom.xml | 11 -
tests/byteman-tests/pom.xml | 4 -
.../server-start-stop-backup-jms-config1.xml | 11 +-
.../server-start-stop-live-jms-config1.xml | 13 +-
tests/integration-tests/pom.xml | 7 +
.../integration/jms/SimpleJNDIClientTest.java | 722 +++++++++++++++++++
.../jms/server/JMSServerDeployerTest.java | 207 +-----
.../config/JMSServerConfigParserTest.java | 35 -
.../integration/ra/ActiveMQRATestBase.java | 9 +
.../spring/SpringIntegrationTest.java | 17 +-
.../tests/util/NonSerializableFactory.java | 84 ++-
.../activemq-jms-for-JMSServerDeployerTest.xml | 48 +-
.../activemq-jms-for-JMSServerDeployerTest2.xml | 48 +-
.../colocated-server-start-stop-jms-config1.xml | 13 +-
.../colocated-server-start-stop-jms-config2.xml | 13 +-
.../resources/server-start-stop-jms-config1.xml | 13 +-
.../src/test/resources/spring-activemq-jms.xml | 13 +-
.../src/test/resources/spring-jms-beans.xml | 21 +-
tests/jms-tests/pom.xml | 4 -
.../jms/tests/ActiveMQServerTestCase.java | 14 +
.../jms/tests/ConnectionFactoryTest.java | 49 ++
.../apache/activemq/jms/tests/SessionTest.java | 2 +
.../tests/message/SimpleJMSStreamMessage.java | 4 +-
.../jms/tests/tools/WrappedJNDIServer.java | 92 ---
.../jms/tests/tools/container/InVMContext.java | 1 -
.../container/InVMInitialContextFactory.java | 2 -
.../tests/tools/container/LocalTestServer.java | 32 +-
.../tools/container/NonSerializableFactory.java | 85 ++-
.../jms/tests/tools/container/Server.java | 6 +
.../src/test/resources/activemq-jms.xml | 120 ---
.../src/test/resources/jndi.properties | 3 +-
tests/joram-tests/pom.xml | 4 -
.../org/apache/activemq/jms/AbstractAdmin.java | 13 +-
.../org/apache/activemq/jms/ActiveMQAdmin.java | 339 +++++++++
.../org/apache/activemq/jms/ActiveMQQAdmin.java | 340 ---------
.../apache/activemq/jms/SpawnedJMSServer.java | 25 -
.../jtests/jms/admin/AdminFactory.java | 8 +-
.../message/headers/MessageHeaderTest.java | 10 +-
.../jms/conform/queue/QueueBrowserTest.java | 3 +-
.../jms/conform/session/UnifiedSessionTest.java | 3 +-
.../jtests/jms/framework/PTPTestCase.java | 15 +-
.../jtests/jms/framework/PubSubTestCase.java | 15 +-
.../jtests/jms/framework/UnifiedTestCase.java | 17 +-
.../src/test/resources/provider.properties | 2 +-
tests/performance-tests/pom.xml | 4 -
tests/soak-tests/pom.xml | 4 -
tests/stress-tests/pom.xml | 4 -
tests/timing-tests/pom.xml | 4 -
.../activemq/tests/unit/util/InVMContext.java | 1 -
.../tests/unit/util/InVMNamingContext.java | 1 -
.../tests/unit/util/NonSerializableFactory.java | 81 +--
441 files changed, 3471 insertions(+), 6318 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 7af8f9f..015033e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -58,11 +58,6 @@ integration/activemq-*-integration/.project
# /distribution/activemq/
/distribution/activemq/.project
-# /distribution/jnp-client/
-/distribution/jnp-client/target
-/distribution/jnp-client/bin
-/distribution/jnp-client/.project
-
# /docs/
/docs/.project
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Run.java
----------------------------------------------------------------------
diff --git a/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Run.java b/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Run.java
index 8bab07e..a83be75 100644
--- a/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Run.java
+++ b/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Run.java
@@ -34,7 +34,6 @@ import org.apache.activemq.integration.bootstrap.ActiveMQBootstrapLogger;
import org.apache.activemq.jms.server.JMSServerManager;
import org.apache.activemq.jms.server.config.JMSConfiguration;
import org.apache.activemq.jms.server.impl.JMSServerManagerImpl;
-import org.apache.activemq.jms.server.impl.StandaloneNamingServer;
import org.apache.activemq.spi.core.security.ActiveMQSecurityManager;
import javax.management.MBeanServer;
@@ -51,7 +50,6 @@ public class Run implements Action
@Arguments(description = "Broker Configuration URI, default 'xml:${ACTIVEMQ_HOME}/config/non-clustered/bootstrap.xml'")
String configuration;
- private StandaloneNamingServer namingServer;
private JMSServerManager jmsServerManager;
private ArrayList<ActiveMQComponent> components = new ArrayList<>();
@@ -84,20 +82,6 @@ public class Run implements Action
ActiveMQServerImpl server = new ActiveMQServerImpl(core, mBeanServer, security);
- namingServer = new StandaloneNamingServer(server);
-
- namingServer.setBindAddress(broker.naming.bindAddress);
-
- namingServer.setPort(broker.naming.port);
-
- namingServer.setRmiBindAddress(broker.naming.rmiBindAddress);
-
- namingServer.setRmiPort(broker.naming.rmiPort);
-
- namingServer.start();
-
- ActiveMQBootstrapLogger.LOGGER.startedNamingService(broker.naming.bindAddress, broker.naming.port, broker.naming.rmiBindAddress, broker.naming.rmiPort);
-
if (jms != null)
{
jmsServerManager = new JMSServerManagerImpl(server, jms);
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/activemq-dto/src/main/java/org/apache/activemq/dto/BrokerDTO.java
----------------------------------------------------------------------
diff --git a/activemq-dto/src/main/java/org/apache/activemq/dto/BrokerDTO.java b/activemq-dto/src/main/java/org/apache/activemq/dto/BrokerDTO.java
index 70e6767..c6f8974 100644
--- a/activemq-dto/src/main/java/org/apache/activemq/dto/BrokerDTO.java
+++ b/activemq-dto/src/main/java/org/apache/activemq/dto/BrokerDTO.java
@@ -40,9 +40,6 @@ public class BrokerDTO
@XmlElementRef
public SecurityDTO security;
- @XmlElementRef
- public NamingDTO naming;
-
@XmlElementRef(required = false)
public WebServerDTO web;
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/activemq-dto/src/main/java/org/apache/activemq/dto/NamingDTO.java
----------------------------------------------------------------------
diff --git a/activemq-dto/src/main/java/org/apache/activemq/dto/NamingDTO.java b/activemq-dto/src/main/java/org/apache/activemq/dto/NamingDTO.java
deleted file mode 100644
index a2aa5b6..0000000
--- a/activemq-dto/src/main/java/org/apache/activemq/dto/NamingDTO.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.dto;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement(name = "naming")
-@XmlAccessorType(XmlAccessType.FIELD)
-public class NamingDTO
-{
- @XmlAttribute
- public String bindAddress = "localhost";
-
- @XmlAttribute
- public int port = 1099;
-
- @XmlAttribute
- public String rmiBindAddress = "localhost";
-
- @XmlAttribute
- public int rmiPort = 1098;
-}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/activemq-dto/src/main/resources/org/apache/activemq/dto/jaxb.index
----------------------------------------------------------------------
diff --git a/activemq-dto/src/main/resources/org/apache/activemq/dto/jaxb.index b/activemq-dto/src/main/resources/org/apache/activemq/dto/jaxb.index
index d4f5b1f..9cffb01 100644
--- a/activemq-dto/src/main/resources/org/apache/activemq/dto/jaxb.index
+++ b/activemq-dto/src/main/resources/org/apache/activemq/dto/jaxb.index
@@ -19,5 +19,4 @@ CoreDTO
JmsDTO
SecurityDTO
BasicSecurityDTO
-NamingDTO
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/activemq-jms-client/src/main/java/org/apache/activemq/jndi/ActiveMQInitialContextFactory.java
----------------------------------------------------------------------
diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jndi/ActiveMQInitialContextFactory.java b/activemq-jms-client/src/main/java/org/apache/activemq/jndi/ActiveMQInitialContextFactory.java
new file mode 100644
index 0000000..18b145d
--- /dev/null
+++ b/activemq-jms-client/src/main/java/org/apache/activemq/jndi/ActiveMQInitialContextFactory.java
@@ -0,0 +1,496 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.jndi;
+
+import javax.jms.Queue;
+import javax.jms.Topic;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.naming.spi.InitialContextFactory;
+import java.io.UnsupportedEncodingException;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.StringTokenizer;
+import java.util.UUID;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.apache.activemq.api.core.DiscoveryGroupConfiguration;
+import org.apache.activemq.api.core.JGroupsBroadcastGroupConfiguration;
+import org.apache.activemq.api.core.TransportConfiguration;
+import org.apache.activemq.api.core.UDPBroadcastGroupConfiguration;
+import org.apache.activemq.api.core.client.ActiveMQClient;
+import org.apache.activemq.api.jms.ActiveMQJMSClient;
+import org.apache.activemq.api.jms.JMSFactoryType;
+import org.apache.activemq.core.client.ActiveMQClientLogger;
+import org.apache.activemq.core.remoting.impl.netty.NettyConnectorFactory;
+import org.apache.activemq.core.remoting.impl.netty.TransportConstants;
+import org.apache.activemq.jms.client.ActiveMQConnectionFactory;
+
+/**
+ * A factory of the ActiveMQ InitialContext which contains
+ * {@link javax.jms.ConnectionFactory} instances as well as a child context called
+ * <i>destinations</i> which contain all of the current active destinations, in
+ * child context depending on the QoS such as transient or durable and queue or
+ * topic.
+ */
+public class ActiveMQInitialContextFactory implements InitialContextFactory
+{
+ public static final String CONNECTION_FACTORY_NAMES = "connectionFactoryNames";
+ public static final String REFRESH_TIMEOUT = "refresh-timeout";
+ public static final String DISCOVERY_INITIAL_WAIT_TIMEOUT = "discovery-initial-wait-timeout";
+
+ private static final String[] DEFAULT_CONNECTION_FACTORY_NAMES = {"ConnectionFactory", "XAConnectionFactory", "QueueConnectionFactory", "TopicConnectionFactory"};
+ public static final String TCP_SCHEME = "tcp";
+ public static final String JGROUPS_SCHEME = "jgroups";
+ public static final String UDP_SCHEME = "udp";
+ public static final String VM_SCHEME = "vm";
+ public static final String HA = "ha";
+ public static final String CF_TYPE = "type";
+ public static final String QUEUE_CF = "QUEUE_CF";
+ public static final String TOPIC_CF = "TOPIC_CF";
+ public static final String QUEUE_XA_CF = "QUEUE_XA_CF";
+ public static final String TOPIC_XA_CF = "TOPIC_XA_CF";
+ public static final String XA_CF = "XA_CF";
+ public static final String DYNAMIC_QUEUE_CONTEXT = "dynamicQueues";
+ public static final String DYNAMIC_TOPIC_CONTEXT = "dynamicTopics";
+
+ private String connectionPrefix = "connection.";
+ private String queuePrefix = "queue.";
+ private String topicPrefix = "topic.";
+
+ public Context getInitialContext(Hashtable environment) throws NamingException
+ {
+ // lets create a factory
+ Map<String, Object> data = new ConcurrentHashMap<String, Object>();
+ String[] names = getConnectionFactoryNames(environment);
+ for (int i = 0; i < names.length; i++)
+ {
+ ActiveMQConnectionFactory factory = null;
+ String name = names[i];
+
+ try
+ {
+ factory = createConnectionFactory(name, environment);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ throw new NamingException("Invalid broker URL");
+ }
+
+ data.put(name, factory);
+ }
+
+ createQueues(data, environment);
+ createTopics(data, environment);
+
+ data.put(DYNAMIC_QUEUE_CONTEXT, new LazyCreateContext()
+ {
+ private static final long serialVersionUID = 6503881346214855588L;
+
+ protected Object createEntry(String name)
+ {
+ return ActiveMQJMSClient.createQueue(name);
+ }
+ });
+ data.put(DYNAMIC_TOPIC_CONTEXT, new LazyCreateContext()
+ {
+ private static final long serialVersionUID = 2019166796234979615L;
+
+ protected Object createEntry(String name)
+ {
+ return ActiveMQJMSClient.createTopic(name);
+ }
+ });
+
+ return createContext(environment, data);
+ }
+
+ // Properties
+ // -------------------------------------------------------------------------
+ public String getTopicPrefix()
+ {
+ return topicPrefix;
+ }
+
+ public void setTopicPrefix(String topicPrefix)
+ {
+ this.topicPrefix = topicPrefix;
+ }
+
+ public String getQueuePrefix()
+ {
+ return queuePrefix;
+ }
+
+ public void setQueuePrefix(String queuePrefix)
+ {
+ this.queuePrefix = queuePrefix;
+ }
+
+ // Implementation methods
+ // -------------------------------------------------------------------------
+
+ protected ReadOnlyContext createContext(Hashtable environment, Map<String, Object> data)
+ {
+ return new ReadOnlyContext(environment, data);
+ }
+
+ protected ActiveMQConnectionFactory createConnectionFactory(String name, Hashtable environment) throws URISyntaxException, MalformedURLException
+ {
+ Hashtable connectionFactoryProperties = new Hashtable(environment);
+ if (DEFAULT_CONNECTION_FACTORY_NAMES[1].equals(name))
+ {
+ connectionFactoryProperties.put(CF_TYPE, XA_CF);
+ }
+ if (DEFAULT_CONNECTION_FACTORY_NAMES[2].equals(name))
+ {
+ connectionFactoryProperties.put(CF_TYPE, QUEUE_CF);
+ }
+ if (DEFAULT_CONNECTION_FACTORY_NAMES[3].equals(name))
+ {
+ connectionFactoryProperties.put(CF_TYPE, TOPIC_CF);
+ }
+ String prefix = connectionPrefix + name + ".";
+ for (Iterator iter = environment.entrySet().iterator(); iter.hasNext(); )
+ {
+ Map.Entry entry = (Map.Entry) iter.next();
+ String key = (String) entry.getKey();
+ if (key.startsWith(prefix))
+ {
+ // Rename the key...
+ connectionFactoryProperties.remove(key);
+ key = key.substring(prefix.length());
+ connectionFactoryProperties.put(key, entry.getValue());
+ }
+ }
+ return createConnectionFactory(connectionFactoryProperties);
+ }
+
+ protected String[] getConnectionFactoryNames(Map environment)
+ {
+ String factoryNames = (String) environment.get(CONNECTION_FACTORY_NAMES);
+ if (factoryNames != null)
+ {
+ List<String> list = new ArrayList<String>();
+ for (StringTokenizer enumeration = new StringTokenizer(factoryNames, ","); enumeration.hasMoreTokens(); )
+ {
+ list.add(enumeration.nextToken().trim());
+ }
+ int size = list.size();
+ if (size > 0)
+ {
+ String[] answer = new String[size];
+ list.toArray(answer);
+ return answer;
+ }
+ }
+ return DEFAULT_CONNECTION_FACTORY_NAMES;
+ }
+
+ protected void createQueues(Map<String, Object> data, Hashtable environment)
+ {
+ for (Iterator iter = environment.entrySet().iterator(); iter.hasNext(); )
+ {
+ Map.Entry entry = (Map.Entry) iter.next();
+ String key = entry.getKey().toString();
+ if (key.startsWith(queuePrefix))
+ {
+ String jndiName = key.substring(queuePrefix.length());
+ data.put(jndiName, createQueue(entry.getValue().toString()));
+ }
+ }
+ }
+
+ protected void createTopics(Map<String, Object> data, Hashtable environment)
+ {
+ for (Iterator iter = environment.entrySet().iterator(); iter.hasNext(); )
+ {
+ Map.Entry entry = (Map.Entry) iter.next();
+ String key = entry.getKey().toString();
+ if (key.startsWith(topicPrefix))
+ {
+ String jndiName = key.substring(topicPrefix.length());
+ data.put(jndiName, createTopic(entry.getValue().toString()));
+ }
+ }
+ }
+
+ /**
+ * Factory method to create new Queue instances
+ */
+ protected Queue createQueue(String name)
+ {
+ return ActiveMQJMSClient.createQueue(name);
+ }
+
+ /**
+ * Factory method to create new Topic instances
+ */
+ protected Topic createTopic(String name)
+ {
+ return ActiveMQJMSClient.createTopic(name);
+ }
+
+ /**
+ * Factory method to create a new connection factory from the given environment
+ */
+ protected ActiveMQConnectionFactory createConnectionFactory(Hashtable environment) throws URISyntaxException, MalformedURLException
+ {
+ ActiveMQConnectionFactory connectionFactory;
+ Map transportConfig = new HashMap();
+
+ if (environment.containsKey(Context.PROVIDER_URL))
+ {
+ URI providerURI = new URI(((String)environment.get(Context.PROVIDER_URL)));
+
+ if (providerURI.getQuery() != null)
+ {
+ try
+ {
+ transportConfig = parseQuery(providerURI.getQuery());
+ }
+ catch (URISyntaxException e)
+ {
+ }
+ }
+
+ if (providerURI.getScheme().equals(TCP_SCHEME))
+ {
+ String[] connectors = providerURI.getAuthority().split(",");
+ TransportConfiguration[] transportConfigurations = new TransportConfiguration[connectors.length];
+ for (int i = 0; i < connectors.length; i++)
+ {
+ Map individualTransportConfig = new HashMap(transportConfig);
+ String[] hostAndPort = connectors[i].split(":");
+ individualTransportConfig.put(TransportConstants.HOST_PROP_NAME, hostAndPort[0]);
+ individualTransportConfig.put(TransportConstants.PORT_PROP_NAME, hostAndPort[1]);
+ transportConfigurations[i] = new TransportConfiguration(NettyConnectorFactory.class.getCanonicalName(), individualTransportConfig);
+ }
+
+ if (Boolean.TRUE.equals(environment.get(HA)))
+ {
+ connectionFactory = ActiveMQJMSClient.createConnectionFactoryWithHA(getJmsFactoryType(environment), transportConfigurations);
+ }
+ else
+ {
+ connectionFactory = ActiveMQJMSClient.createConnectionFactoryWithoutHA(getJmsFactoryType(environment), transportConfigurations);
+ }
+ }
+ else if (providerURI.getScheme().equals(UDP_SCHEME))
+ {
+ DiscoveryGroupConfiguration dgc = new DiscoveryGroupConfiguration()
+ .setRefreshTimeout(transportConfig.containsKey(REFRESH_TIMEOUT) ? Long.parseLong((String) transportConfig.get(REFRESH_TIMEOUT)) : ActiveMQClient.DEFAULT_DISCOVERY_REFRESH_TIMEOUT)
+ .setDiscoveryInitialWaitTimeout(transportConfig.containsKey(DISCOVERY_INITIAL_WAIT_TIMEOUT) ? Long.parseLong((String) transportConfig.get(DISCOVERY_INITIAL_WAIT_TIMEOUT)) : ActiveMQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT)
+ .setBroadcastEndpointFactoryConfiguration(new UDPBroadcastGroupConfiguration()
+ .setGroupAddress(providerURI.getHost())
+ .setGroupPort(providerURI.getPort())
+ .setLocalBindAddress(transportConfig.containsKey(TransportConstants.LOCAL_ADDRESS_PROP_NAME) ? (String) transportConfig.get(TransportConstants.LOCAL_ADDRESS_PROP_NAME) : null)
+ .setLocalBindPort(transportConfig.containsKey(TransportConstants.LOCAL_PORT_PROP_NAME) ? Integer.parseInt((String) transportConfig.get(TransportConstants.LOCAL_PORT_PROP_NAME)) : -1));
+ if (Boolean.TRUE.equals(environment.get(HA)))
+ {
+ connectionFactory = ActiveMQJMSClient.createConnectionFactoryWithHA(dgc, getJmsFactoryType(environment));
+ }
+ else
+ {
+ connectionFactory = ActiveMQJMSClient.createConnectionFactoryWithoutHA(dgc, getJmsFactoryType(environment));
+ }
+ }
+ else if (providerURI.getScheme().equals(JGROUPS_SCHEME))
+ {
+ JGroupsBroadcastGroupConfiguration config = new JGroupsBroadcastGroupConfiguration(providerURI.getAuthority(), providerURI.getPath() != null ? providerURI.getPath() : UUID.randomUUID().toString());
+
+ DiscoveryGroupConfiguration dgc = new DiscoveryGroupConfiguration()
+ .setRefreshTimeout(transportConfig.containsKey(REFRESH_TIMEOUT) ? Long.parseLong((String) transportConfig.get(REFRESH_TIMEOUT)) : ActiveMQClient.DEFAULT_DISCOVERY_REFRESH_TIMEOUT)
+ .setDiscoveryInitialWaitTimeout(transportConfig.containsKey(DISCOVERY_INITIAL_WAIT_TIMEOUT) ? Long.parseLong((String) transportConfig.get(DISCOVERY_INITIAL_WAIT_TIMEOUT)) : ActiveMQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT)
+ .setBroadcastEndpointFactoryConfiguration(config);
+ if (Boolean.TRUE.equals(environment.get(HA)))
+ {
+ connectionFactory = ActiveMQJMSClient.createConnectionFactoryWithHA(dgc, getJmsFactoryType(environment));
+ }
+ else
+ {
+ connectionFactory = ActiveMQJMSClient.createConnectionFactoryWithoutHA(dgc, getJmsFactoryType(environment));
+ }
+ }
+ else if (providerURI.getScheme().equals(VM_SCHEME))
+ {
+ Map inVmTransportConfig = new HashMap();
+ inVmTransportConfig.put("server-id", providerURI.getHost());
+ TransportConfiguration tc = new TransportConfiguration("org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory", inVmTransportConfig);
+ connectionFactory = ActiveMQJMSClient.createConnectionFactoryWithoutHA(getJmsFactoryType(environment), tc);
+ }
+ else
+ {
+ throw new IllegalArgumentException("Invalid scheme");
+ }
+ }
+ else
+ {
+ TransportConfiguration tc = new TransportConfiguration("org.apache.activemq.core.remoting.impl.invm.InVMConnectorFactory");
+ connectionFactory = ActiveMQJMSClient.createConnectionFactoryWithoutHA(getJmsFactoryType(environment), tc);
+ }
+
+ Properties properties = new Properties();
+ properties.putAll(environment);
+
+ for (Object key : environment.keySet())
+ {
+ invokeSetter(connectionFactory, (String) key, environment.get(key));
+ }
+
+ return connectionFactory;
+ }
+
+ private JMSFactoryType getJmsFactoryType(Hashtable environment)
+ {
+ JMSFactoryType ultimateType = JMSFactoryType.CF; // default value
+ if (environment.containsKey(CF_TYPE))
+ {
+ String tempType = (String) environment.get(CF_TYPE);
+ if (QUEUE_CF.equals(tempType))
+ {
+ ultimateType = JMSFactoryType.QUEUE_CF;
+ }
+ else if (TOPIC_CF.equals(tempType))
+ {
+ ultimateType = JMSFactoryType.TOPIC_CF;
+ }
+ else if (QUEUE_XA_CF.equals(tempType))
+ {
+ ultimateType = JMSFactoryType.QUEUE_XA_CF;
+ }
+ else if (TOPIC_XA_CF.equals(tempType))
+ {
+ ultimateType = JMSFactoryType.TOPIC_XA_CF;
+ }
+ else if (XA_CF.equals(tempType))
+ {
+ ultimateType = JMSFactoryType.XA_CF;
+ }
+ }
+ return ultimateType;
+ }
+
+
+ public static Map<String, String> parseQuery(String uri) throws URISyntaxException
+ {
+ try
+ {
+ uri = uri.substring(uri.lastIndexOf("?") + 1); // get only the relevant part of the query
+ Map<String, String> rc = new HashMap<String, String>();
+ if (uri != null && !uri.isEmpty())
+ {
+ String[] parameters = uri.split("&");
+ for (int i = 0; i < parameters.length; i++)
+ {
+ int p = parameters[i].indexOf("=");
+ if (p >= 0)
+ {
+ String name = URLDecoder.decode(parameters[i].substring(0, p), "UTF-8");
+ String value = URLDecoder.decode(parameters[i].substring(p + 1), "UTF-8");
+ rc.put(name, value);
+ }
+ else
+ {
+ rc.put(parameters[i], null);
+ }
+ }
+ }
+ return rc;
+ }
+ catch (UnsupportedEncodingException e)
+ {
+ throw (URISyntaxException) new URISyntaxException(e.toString(), "Invalid encoding").initCause(e);
+ }
+ }
+
+ public String getConnectionPrefix()
+ {
+ return connectionPrefix;
+ }
+
+ public void setConnectionPrefix(String connectionPrefix)
+ {
+ this.connectionPrefix = connectionPrefix;
+ }
+
+ private void invokeSetter(Object target, final String propertyName, final Object propertyValue)
+ {
+ Method setter = null;
+
+ Method[] methods = target.getClass().getMethods();
+
+ // turn something like "consumerWindowSize" to "setConsumerWindowSize"
+ String setterMethodName = "set" + Character.toUpperCase(propertyName.charAt(0)) + propertyName.substring(1);
+
+ for (Method m : methods)
+ {
+ if (m.getName().equals(setterMethodName))
+ {
+ setter = m;
+ break;
+ }
+ }
+
+ try
+ {
+ if (setter != null)
+ {
+ ActiveMQClientLogger.LOGGER.info("Invoking: " + setter + " that takes a " + setter.getParameterTypes()[0] + " with a " + propertyValue.getClass());
+ if (propertyValue.getClass() == String.class && setter.getParameterTypes()[0] != String.class)
+ {
+ String stringPropertyValue = (String) propertyValue;
+ if (setter.getParameterTypes()[0] == Integer.TYPE)
+ {
+ setter.invoke(target, Integer.parseInt(stringPropertyValue));
+ }
+ else if (setter.getParameterTypes()[0] == Long.TYPE)
+ {
+ setter.invoke(target, Long.parseLong(stringPropertyValue));
+ }
+ else if (setter.getParameterTypes()[0] == Double.TYPE)
+ {
+ setter.invoke(target, Double.parseDouble(stringPropertyValue));
+ }
+ else if (setter.getParameterTypes()[0] == Boolean.TYPE)
+ {
+ setter.invoke(target, Boolean.parseBoolean(stringPropertyValue));
+ }
+ }
+ else
+ {
+ setter.invoke(target, propertyValue);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ ActiveMQClientLogger.LOGGER.warn("Caught exception during invocation of: " + setter, e);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/activemq-jms-client/src/main/java/org/apache/activemq/jndi/LazyCreateContext.java
----------------------------------------------------------------------
diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jndi/LazyCreateContext.java b/activemq-jms-client/src/main/java/org/apache/activemq/jndi/LazyCreateContext.java
new file mode 100644
index 0000000..0fe51bc
--- /dev/null
+++ b/activemq-jms-client/src/main/java/org/apache/activemq/jndi/LazyCreateContext.java
@@ -0,0 +1,43 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.jndi;
+
+import javax.naming.NameNotFoundException;
+import javax.naming.NamingException;
+
+public abstract class LazyCreateContext extends ReadOnlyContext
+{
+ public Object lookup(String name) throws NamingException
+ {
+ try
+ {
+ return super.lookup(name);
+ }
+ catch (NameNotFoundException e)
+ {
+ Object answer = createEntry(name);
+ if (answer == null)
+ {
+ throw e;
+ }
+ internalBind(name, answer);
+ return answer;
+ }
+ }
+
+ protected abstract Object createEntry(String name);
+}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/activemq-jms-client/src/main/java/org/apache/activemq/jndi/NameParserImpl.java
----------------------------------------------------------------------
diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jndi/NameParserImpl.java b/activemq-jms-client/src/main/java/org/apache/activemq/jndi/NameParserImpl.java
new file mode 100644
index 0000000..8ae21cf
--- /dev/null
+++ b/activemq-jms-client/src/main/java/org/apache/activemq/jndi/NameParserImpl.java
@@ -0,0 +1,30 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.jndi;
+
+import javax.naming.CompositeName;
+import javax.naming.Name;
+import javax.naming.NameParser;
+import javax.naming.NamingException;
+
+public class NameParserImpl implements NameParser
+{
+ public Name parse(String name) throws NamingException
+ {
+ return new CompositeName(name);
+ }
+}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/activemq-jms-client/src/main/java/org/apache/activemq/jndi/ReadOnlyContext.java
----------------------------------------------------------------------
diff --git a/activemq-jms-client/src/main/java/org/apache/activemq/jndi/ReadOnlyContext.java b/activemq-jms-client/src/main/java/org/apache/activemq/jndi/ReadOnlyContext.java
new file mode 100644
index 0000000..9602d1a
--- /dev/null
+++ b/activemq-jms-client/src/main/java/org/apache/activemq/jndi/ReadOnlyContext.java
@@ -0,0 +1,534 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.jndi;
+
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Map;
+import javax.naming.Binding;
+import javax.naming.CompositeName;
+import javax.naming.Context;
+import javax.naming.LinkRef;
+import javax.naming.Name;
+import javax.naming.NameClassPair;
+import javax.naming.NameNotFoundException;
+import javax.naming.NameParser;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.NotContextException;
+import javax.naming.OperationNotSupportedException;
+import javax.naming.Reference;
+import javax.naming.spi.NamingManager;
+
+import org.apache.activemq.core.client.ActiveMQClientLogger;
+
+/**
+ * A read-only Context <p/> This version assumes it and all its subcontext are
+ * read-only and any attempt to modify (e.g. through bind) will result in an
+ * OperationNotSupportedException. Each Context in the tree builds a cache of
+ * the entries in all sub-contexts to optimise the performance of lookup.
+ * </p>
+ * <p>
+ * This implementation is intended to optimise the performance of lookup(String)
+ * to about the level of a HashMap get. It has been observed that the scheme
+ * resolution phase performed by the JVM takes considerably longer, so for
+ * optimum performance lookups should be coded like:
+ * </p>
+ * <code>
+ * Context componentContext = (Context)new InitialContext().lookup("java:comp");
+ * String envEntry = (String) componentContext.lookup("env/myEntry");
+ * String envEntry2 = (String) componentContext.lookup("env/myEntry2");
+ * </code>
+ */
+@SuppressWarnings("unchecked")
+public class ReadOnlyContext implements Context, Serializable
+{
+ public static final String SEPARATOR = "/";
+ protected static final NameParser NAME_PARSER = new NameParserImpl();
+ private static final long serialVersionUID = -5754338187296859149L;
+
+ protected final Hashtable<String, Object> environment; // environment for this context
+ protected final Map<String, Object> bindings; // bindings at my level
+ protected final Map<String, Object> treeBindings; // all bindings under me
+
+ private boolean frozen;
+ private String nameInNamespace = "";
+
+ public ReadOnlyContext()
+ {
+ environment = new Hashtable<String, Object>();
+ bindings = new HashMap<String, Object>();
+ treeBindings = new HashMap<String, Object>();
+ }
+
+ public ReadOnlyContext(Hashtable env)
+ {
+ if (env == null)
+ {
+ this.environment = new Hashtable<String, Object>();
+ }
+ else
+ {
+ this.environment = new Hashtable<String, Object>(env);
+ }
+ this.bindings = Collections.EMPTY_MAP;
+ this.treeBindings = Collections.EMPTY_MAP;
+ }
+
+ public ReadOnlyContext(Hashtable environment, Map<String, Object> bindings)
+ {
+ if (environment == null)
+ {
+ this.environment = new Hashtable<String, Object>();
+ }
+ else
+ {
+ this.environment = new Hashtable<String, Object>(environment);
+ }
+ this.bindings = new HashMap<String, Object>();
+ treeBindings = new HashMap<String, Object>();
+ if (bindings != null)
+ {
+ for (Map.Entry<String, Object> binding : bindings.entrySet())
+ {
+ try
+ {
+ internalBind(binding.getKey(), binding.getValue());
+ }
+ catch (Throwable e)
+ {
+ ActiveMQClientLogger.LOGGER.error("Failed to bind " + binding.getKey() + "=" + binding.getValue(), e);
+ }
+ }
+ }
+ frozen = true;
+ }
+
+ public ReadOnlyContext(Hashtable environment, Map bindings, String nameInNamespace)
+ {
+ this(environment, bindings);
+ this.nameInNamespace = nameInNamespace;
+ }
+
+ protected ReadOnlyContext(ReadOnlyContext clone, Hashtable env)
+ {
+ this.bindings = clone.bindings;
+ this.treeBindings = clone.treeBindings;
+ this.environment = new Hashtable<String, Object>(env);
+ }
+
+ protected ReadOnlyContext(ReadOnlyContext clone, Hashtable<String, Object> env, String nameInNamespace)
+ {
+ this(clone, env);
+ this.nameInNamespace = nameInNamespace;
+ }
+
+ public void freeze()
+ {
+ frozen = true;
+ }
+
+ boolean isFrozen()
+ {
+ return frozen;
+ }
+
+ /**
+ * internalBind is intended for use only during setup or possibly by
+ * suitably synchronized superclasses. It binds every possible lookup into a
+ * map in each context. To do this, each context strips off one name segment
+ * and if necessary creates a new context for it. Then it asks that context
+ * to bind the remaining name. It returns a map containing all the bindings
+ * from the next context, plus the context it just created (if it in fact
+ * created it). (the names are suitably extended by the segment originally
+ * lopped off).
+ *
+ * @param name
+ * @param value
+ * @return
+ * @throws javax.naming.NamingException
+ */
+ protected Map<String, Object> internalBind(String name, Object value) throws NamingException
+ {
+ assert name != null && name.length() > 0;
+ assert !frozen;
+
+ Map<String, Object> newBindings = new HashMap<String, Object>();
+ int pos = name.indexOf('/');
+ if (pos == -1)
+ {
+ if (treeBindings.put(name, value) != null)
+ {
+ throw new NamingException("Something already bound at " + name);
+ }
+ bindings.put(name, value);
+ newBindings.put(name, value);
+ }
+ else
+ {
+ String segment = name.substring(0, pos);
+ assert segment != null;
+ assert !segment.equals("");
+ Object o = treeBindings.get(segment);
+ if (o == null)
+ {
+ o = newContext();
+ treeBindings.put(segment, o);
+ bindings.put(segment, o);
+ newBindings.put(segment, o);
+ }
+ else if (!(o instanceof ReadOnlyContext))
+ {
+ throw new NamingException("Something already bound where a subcontext should go");
+ }
+ ReadOnlyContext readOnlyContext = (ReadOnlyContext) o;
+ String remainder = name.substring(pos + 1);
+ Map<String, Object> subBindings = readOnlyContext.internalBind(remainder, value);
+ for (Iterator iterator = subBindings.entrySet().iterator(); iterator.hasNext(); )
+ {
+ Map.Entry entry = (Map.Entry) iterator.next();
+ String subName = segment + "/" + (String) entry.getKey();
+ Object bound = entry.getValue();
+ treeBindings.put(subName, bound);
+ newBindings.put(subName, bound);
+ }
+ }
+ return newBindings;
+ }
+
+ protected ReadOnlyContext newContext()
+ {
+ return new ReadOnlyContext();
+ }
+
+ public Object addToEnvironment(String propName, Object propVal) throws NamingException
+ {
+ return environment.put(propName, propVal);
+ }
+
+ public Hashtable<String, Object> getEnvironment() throws NamingException
+ {
+ return (Hashtable<String, Object>) environment.clone();
+ }
+
+ public Object removeFromEnvironment(String propName) throws NamingException
+ {
+ return environment.remove(propName);
+ }
+
+ public Object lookup(String name) throws NamingException
+ {
+ if (name.length() == 0)
+ {
+ return this;
+ }
+ Object result = treeBindings.get(name);
+ if (result == null)
+ {
+ result = bindings.get(name);
+ }
+ if (result == null)
+ {
+ int pos = name.indexOf(':');
+ if (pos > 0)
+ {
+ String scheme = name.substring(0, pos);
+ Context ctx = NamingManager.getURLContext(scheme, environment);
+ if (ctx == null)
+ {
+ throw new NamingException("scheme " + scheme + " not recognized");
+ }
+ return ctx.lookup(name);
+ }
+ else
+ {
+ // Split out the first name of the path
+ // and look for it in the bindings map.
+ CompositeName path = new CompositeName(name);
+
+ if (path.size() == 0)
+ {
+ return this;
+ }
+ else
+ {
+ String first = path.get(0);
+ Object obj = bindings.get(first);
+ if (obj == null)
+ {
+ throw new NameNotFoundException(name);
+ }
+ else if (obj instanceof Context && path.size() > 1)
+ {
+ Context subContext = (Context) obj;
+ obj = subContext.lookup(path.getSuffix(1));
+ }
+ return obj;
+ }
+ }
+ }
+ if (result instanceof LinkRef)
+ {
+ LinkRef ref = (LinkRef) result;
+ result = lookup(ref.getLinkName());
+ }
+ if (result instanceof Reference)
+ {
+ try
+ {
+ result = NamingManager.getObjectInstance(result, null, null, this.environment);
+ }
+ catch (NamingException e)
+ {
+ throw e;
+ }
+ catch (Exception e)
+ {
+ throw (NamingException) new NamingException("could not look up : " + name).initCause(e);
+ }
+ }
+ if (result instanceof ReadOnlyContext)
+ {
+ String prefix = getNameInNamespace();
+ if (prefix.length() > 0)
+ {
+ prefix = prefix + SEPARATOR;
+ }
+ result = new ReadOnlyContext((ReadOnlyContext) result, environment, prefix + name);
+ }
+ return result;
+ }
+
+ public Object lookup(Name name) throws NamingException
+ {
+ return lookup(name.toString());
+ }
+
+ public Object lookupLink(String name) throws NamingException
+ {
+ return lookup(name);
+ }
+
+ public Name composeName(Name name, Name prefix) throws NamingException
+ {
+ Name result = (Name) prefix.clone();
+ result.addAll(name);
+ return result;
+ }
+
+ public String composeName(String name, String prefix) throws NamingException
+ {
+ CompositeName result = new CompositeName(prefix);
+ result.addAll(new CompositeName(name));
+ return result.toString();
+ }
+
+ public NamingEnumeration list(String name) throws NamingException
+ {
+ Object o = lookup(name);
+ if (o == this)
+ {
+ return new ListEnumeration();
+ }
+ else if (o instanceof Context)
+ {
+ return ((Context) o).list("");
+ }
+ else
+ {
+ throw new NotContextException();
+ }
+ }
+
+ public NamingEnumeration listBindings(String name) throws NamingException
+ {
+ Object o = lookup(name);
+ if (o == this)
+ {
+ return new ListBindingEnumeration();
+ }
+ else if (o instanceof Context)
+ {
+ return ((Context) o).listBindings("");
+ }
+ else
+ {
+ throw new NotContextException();
+ }
+ }
+
+ public Object lookupLink(Name name) throws NamingException
+ {
+ return lookupLink(name.toString());
+ }
+
+ public NamingEnumeration list(Name name) throws NamingException
+ {
+ return list(name.toString());
+ }
+
+ public NamingEnumeration listBindings(Name name) throws NamingException
+ {
+ return listBindings(name.toString());
+ }
+
+ public void bind(Name name, Object obj) throws NamingException
+ {
+ throw new OperationNotSupportedException();
+ }
+
+ public void bind(String name, Object obj) throws NamingException
+ {
+ throw new OperationNotSupportedException();
+ }
+
+ public void close() throws NamingException
+ {
+ // ignore
+ }
+
+ public Context createSubcontext(Name name) throws NamingException
+ {
+ throw new OperationNotSupportedException();
+ }
+
+ public Context createSubcontext(String name) throws NamingException
+ {
+ throw new OperationNotSupportedException();
+ }
+
+ public void destroySubcontext(Name name) throws NamingException
+ {
+ throw new OperationNotSupportedException();
+ }
+
+ public void destroySubcontext(String name) throws NamingException
+ {
+ throw new OperationNotSupportedException();
+ }
+
+ public String getNameInNamespace() throws NamingException
+ {
+ return nameInNamespace;
+ }
+
+ public NameParser getNameParser(Name name) throws NamingException
+ {
+ return NAME_PARSER;
+ }
+
+ public NameParser getNameParser(String name) throws NamingException
+ {
+ return NAME_PARSER;
+ }
+
+ public void rebind(Name name, Object obj) throws NamingException
+ {
+ throw new OperationNotSupportedException();
+ }
+
+ public void rebind(String name, Object obj) throws NamingException
+ {
+ throw new OperationNotSupportedException();
+ }
+
+ public void rename(Name oldName, Name newName) throws NamingException
+ {
+ throw new OperationNotSupportedException();
+ }
+
+ public void rename(String oldName, String newName) throws NamingException
+ {
+ throw new OperationNotSupportedException();
+ }
+
+ public void unbind(Name name) throws NamingException
+ {
+ throw new OperationNotSupportedException();
+ }
+
+ public void unbind(String name) throws NamingException
+ {
+ throw new OperationNotSupportedException();
+ }
+
+ private abstract class LocalNamingEnumeration implements NamingEnumeration
+ {
+ private final Iterator i = bindings.entrySet()
+ .iterator();
+
+ public boolean hasMore() throws NamingException
+ {
+ return i.hasNext();
+ }
+
+ public boolean hasMoreElements()
+ {
+ return i.hasNext();
+ }
+
+ protected Map.Entry getNext()
+ {
+ return (Map.Entry) i.next();
+ }
+
+ public void close() throws NamingException
+ {
+ }
+ }
+
+ private class ListEnumeration extends LocalNamingEnumeration
+ {
+ ListEnumeration()
+ {
+ }
+
+ public Object next() throws NamingException
+ {
+ return nextElement();
+ }
+
+ public Object nextElement()
+ {
+ Map.Entry entry = getNext();
+ return new NameClassPair((String) entry.getKey(), entry.getValue()
+ .getClass()
+ .getName());
+ }
+ }
+
+ private class ListBindingEnumeration extends LocalNamingEnumeration
+ {
+ ListBindingEnumeration()
+ {
+ }
+
+ public Object next() throws NamingException
+ {
+ return nextElement();
+ }
+
+ public Object nextElement()
+ {
+ Map.Entry entry = getNext();
+ return new Binding((String) entry.getKey(), entry.getValue());
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/activemq-jms-server/pom.xml
----------------------------------------------------------------------
diff --git a/activemq-jms-server/pom.xml b/activemq-jms-server/pom.xml
index 476914b..c39a31e 100644
--- a/activemq-jms-server/pom.xml
+++ b/activemq-jms-server/pom.xml
@@ -53,10 +53,6 @@
<groupId>org.jboss</groupId>
<artifactId>jboss-transaction-spi</artifactId>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- </dependency>
</dependencies>
<profiles>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/JMSServerConfigParser.java
----------------------------------------------------------------------
diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/JMSServerConfigParser.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/JMSServerConfigParser.java
index 3b6bca8..67d7ef6 100644
--- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/JMSServerConfigParser.java
+++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/JMSServerConfigParser.java
@@ -18,7 +18,6 @@ package org.apache.activemq.jms.server;
import java.io.InputStream;
-import org.apache.activemq.jms.server.config.ConnectionFactoryConfiguration;
import org.apache.activemq.jms.server.config.JMSConfiguration;
import org.apache.activemq.jms.server.config.JMSQueueConfiguration;
import org.apache.activemq.jms.server.config.TopicConfiguration;
@@ -58,12 +57,4 @@ public interface JMSServerConfigParser
* @throws Exception
*/
JMSQueueConfiguration parseQueueConfiguration(final Node node) throws Exception;
-
- /**
- * Parse the Connection Configuration node as a ConnectionFactoryConfiguration object
- * @param node
- * @return
- * @throws Exception
- */
- ConnectionFactoryConfiguration parseConnectionFactoryConfiguration(final Node node) throws Exception;
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/embedded/EmbeddedJMS.java
----------------------------------------------------------------------
diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/embedded/EmbeddedJMS.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/embedded/EmbeddedJMS.java
index 376e4ce..e2d5550 100644
--- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/embedded/EmbeddedJMS.java
+++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/embedded/EmbeddedJMS.java
@@ -21,6 +21,7 @@ import javax.naming.Context;
import org.apache.activemq.core.registry.JndiBindingRegistry;
import org.apache.activemq.core.registry.MapBindingRegistry;
import org.apache.activemq.core.server.embedded.EmbeddedActiveMQ;
+import org.apache.activemq.jms.server.JMSServerManager;
import org.apache.activemq.jms.server.config.JMSConfiguration;
import org.apache.activemq.jms.server.impl.JMSServerManagerImpl;
import org.apache.activemq.spi.core.naming.BindingRegistry;
@@ -58,6 +59,11 @@ public class EmbeddedJMS extends EmbeddedActiveMQ
return registry;
}
+ public JMSServerManager getJMSServerManager()
+ {
+ return serverManager;
+ }
+
/**
* Only set this property if you are using a custom BindingRegistry
*
[05/13] activemq-6 git commit: ACTIVEMQ6-14 Replace JNDI server with
client impl
Posted by cl...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/management/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/management/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/management/src/main/resources/hornetq/server0/activemq-jms.xml
index 0a8701d..0d5c953 100644
--- a/examples/jms/management/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/management/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,18 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory" signature="queue">
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
+
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/message-counters/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/message-counters/pom.xml b/examples/jms/message-counters/pom.xml
index 84de40b..2bca2d4 100644
--- a/examples/jms/message-counters/pom.xml
+++ b/examples/jms/message-counters/pom.xml
@@ -75,7 +75,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.MessageCounterExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -122,11 +122,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/message-counters/src/main/java/org/apache/activemq/jms/example/MessageCounterExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/message-counters/src/main/java/org/apache/activemq/jms/example/MessageCounterExample.java b/examples/jms/message-counters/src/main/java/org/apache/activemq/jms/example/MessageCounterExample.java
index b3747e8..a1b697a 100644
--- a/examples/jms/message-counters/src/main/java/org/apache/activemq/jms/example/MessageCounterExample.java
+++ b/examples/jms/message-counters/src/main/java/org/apache/activemq/jms/example/MessageCounterExample.java
@@ -65,10 +65,10 @@ public class MessageCounterExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perfom a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- QueueConnectionFactory cf = (QueueConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ QueueConnectionFactory cf = (QueueConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4.Create a JMS Connection, session and a producer for the queue
connection = cf.createQueueConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/message-counters/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/message-counters/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/message-counters/src/main/resources/hornetq/server0/activemq-jms.xml
index 5814b76..44be37f 100644
--- a/examples/jms/message-counters/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/message-counters/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,24 +1,11 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory" signature="queue">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
<!--the expiry queue where expired messages will be sent-->
- <queue name="expiryQueue">
- <entry name="/queue/expiryQueue"/>
- </queue>
+ <queue name="expiryQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/message-group/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/message-group/pom.xml b/examples/jms/message-group/pom.xml
index 2cfaa15..69571d9 100644
--- a/examples/jms/message-group/pom.xml
+++ b/examples/jms/message-group/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.MessageGroupExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/message-group/src/main/java/org/apache/activemq/jms/example/MessageGroupExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/message-group/src/main/java/org/apache/activemq/jms/example/MessageGroupExample.java b/examples/jms/message-group/src/main/java/org/apache/activemq/jms/example/MessageGroupExample.java
index 27e8b04..1a2cf49 100644
--- a/examples/jms/message-group/src/main/java/org/apache/activemq/jms/example/MessageGroupExample.java
+++ b/examples/jms/message-group/src/main/java/org/apache/activemq/jms/example/MessageGroupExample.java
@@ -60,10 +60,10 @@ public class MessageGroupExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perform a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. Create a JMS Connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/message-group/src/main/resources/hornetq/server0/hornetq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/message-group/src/main/resources/hornetq/server0/hornetq-jms.xml b/examples/jms/message-group/src/main/resources/hornetq/server0/hornetq-jms.xml
index 452b958..847659f 100644
--- a/examples/jms/message-group/src/main/resources/hornetq/server0/hornetq-jms.xml
+++ b/examples/jms/message-group/src/main/resources/hornetq/server0/hornetq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/message-group2/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/message-group2/pom.xml b/examples/jms/message-group2/pom.xml
index 2e0f983..866e984 100644
--- a/examples/jms/message-group2/pom.xml
+++ b/examples/jms/message-group2/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.MessageGroup2Example</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/message-group2/src/main/java/org/apache/activemq/jms/example/MessageGroup2Example.java
----------------------------------------------------------------------
diff --git a/examples/jms/message-group2/src/main/java/org/apache/activemq/jms/example/MessageGroup2Example.java b/examples/jms/message-group2/src/main/java/org/apache/activemq/jms/example/MessageGroup2Example.java
index 9f98f8a..ce46238 100644
--- a/examples/jms/message-group2/src/main/java/org/apache/activemq/jms/example/MessageGroup2Example.java
+++ b/examples/jms/message-group2/src/main/java/org/apache/activemq/jms/example/MessageGroup2Example.java
@@ -59,10 +59,10 @@ public class MessageGroup2Example extends ActiveMQExample
initialContext = getContext(0);
//Step 2. Perform a lookup on the queue
- Queue queue = (Queue) initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue) initialContext.lookup("queue/exampleQueue");
//Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("ConnectionFactory");
//Step 4. Create a JMS Connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/message-group2/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/message-group2/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/message-group2/src/main/resources/hornetq/server0/activemq-jms.xml
index ec6c3d9..847659f 100644
--- a/examples/jms/message-group2/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/message-group2/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,20 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- <group-id>Group-0</group-id>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/message-priority/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/message-priority/pom.xml b/examples/jms/message-priority/pom.xml
index db6c291..631f6bd 100644
--- a/examples/jms/message-priority/pom.xml
+++ b/examples/jms/message-priority/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.MessagePriorityExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/message-priority/src/main/java/org/apache/activemq/jms/example/MessagePriorityExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/message-priority/src/main/java/org/apache/activemq/jms/example/MessagePriorityExample.java b/examples/jms/message-priority/src/main/java/org/apache/activemq/jms/example/MessagePriorityExample.java
index 6a2931e..e094b72 100644
--- a/examples/jms/message-priority/src/main/java/org/apache/activemq/jms/example/MessagePriorityExample.java
+++ b/examples/jms/message-priority/src/main/java/org/apache/activemq/jms/example/MessagePriorityExample.java
@@ -60,10 +60,10 @@ public class MessagePriorityExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. look-up the JMS queue object from JNDI
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. look-up the JMS connection factory object from JNDI
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. Create a JMS Connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/message-priority/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/message-priority/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/message-priority/src/main/resources/hornetq/server0/activemq-jms.xml
index 452b958..847659f 100644
--- a/examples/jms/message-priority/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/message-priority/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/multiple-failover-failback/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover-failback/pom.xml b/examples/jms/multiple-failover-failback/pom.xml
index b9827f6..8264323 100644
--- a/examples/jms/multiple-failover-failback/pom.xml
+++ b/examples/jms/multiple-failover-failback/pom.xml
@@ -101,9 +101,9 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.MultipleFailoverFailbackExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
- <param>jnp://localhost:1299</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
+ <param>tcp://localhost:5447</param>
</args>
<systemProperties>
<property>
@@ -177,11 +177,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/multiple-failover-failback/src/main/java/org/apache/activemq/jms/example/MultipleFailoverFailbackExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover-failback/src/main/java/org/apache/activemq/jms/example/MultipleFailoverFailbackExample.java b/examples/jms/multiple-failover-failback/src/main/java/org/apache/activemq/jms/example/MultipleFailoverFailbackExample.java
index 9cf1f9f..b6af378 100644
--- a/examples/jms/multiple-failover-failback/src/main/java/org/apache/activemq/jms/example/MultipleFailoverFailbackExample.java
+++ b/examples/jms/multiple-failover-failback/src/main/java/org/apache/activemq/jms/example/MultipleFailoverFailbackExample.java
@@ -55,8 +55,8 @@ public class MultipleFailoverFailbackExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Look up the JMS resources from JNDI
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
- ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
+ ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 3. Create a JMS Connection
connection = connectionFactory.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server0/activemq-jms.xml
index 889b59d..0d5c953 100644
--- a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,33 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
-
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
-
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server1/activemq-jms.xml
index c3b0393..0d5c953 100644
--- a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,32 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
-
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server2/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server2/activemq-jms.xml b/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server2/activemq-jms.xml
index 41d711b..0d5c953 100644
--- a/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server2/activemq-jms.xml
+++ b/examples/jms/multiple-failover-failback/src/main/resources/hornetq/server2/activemq-jms.xml
@@ -1,32 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
-
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/multiple-failover/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/pom.xml b/examples/jms/multiple-failover/pom.xml
index e8c0744..844f22c 100644
--- a/examples/jms/multiple-failover/pom.xml
+++ b/examples/jms/multiple-failover/pom.xml
@@ -101,9 +101,9 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.MultipleFailoverExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
- <param>jnp://localhost:1299</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
+ <param>tcp://localhost:5447</param>
</args>
<systemProperties>
<property>
@@ -177,11 +177,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/multiple-failover/src/main/java/org/apache/activemq/jms/example/MultipleFailoverExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/java/org/apache/activemq/jms/example/MultipleFailoverExample.java b/examples/jms/multiple-failover/src/main/java/org/apache/activemq/jms/example/MultipleFailoverExample.java
index 41849c9..8f430a3 100644
--- a/examples/jms/multiple-failover/src/main/java/org/apache/activemq/jms/example/MultipleFailoverExample.java
+++ b/examples/jms/multiple-failover/src/main/java/org/apache/activemq/jms/example/MultipleFailoverExample.java
@@ -55,8 +55,8 @@ public class MultipleFailoverExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Look up the JMS resources from JNDI
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
- ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
+ ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 3. Create a JMS Connection
connection = connectionFactory.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/multiple-failover/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/multiple-failover/src/main/resources/hornetq/server0/activemq-jms.xml
index 889b59d..0d5c953 100644
--- a/examples/jms/multiple-failover/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/multiple-failover/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,33 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
-
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
-
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/multiple-failover/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/multiple-failover/src/main/resources/hornetq/server1/activemq-jms.xml
index c3b0393..0d5c953 100644
--- a/examples/jms/multiple-failover/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/multiple-failover/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,32 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
-
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/multiple-failover/src/main/resources/hornetq/server2/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/src/main/resources/hornetq/server2/activemq-jms.xml b/examples/jms/multiple-failover/src/main/resources/hornetq/server2/activemq-jms.xml
index 41d711b..0d5c953 100644
--- a/examples/jms/multiple-failover/src/main/resources/hornetq/server2/activemq-jms.xml
+++ b/examples/jms/multiple-failover/src/main/resources/hornetq/server2/activemq-jms.xml
@@ -1,32 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
-
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/no-consumer-buffering/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/no-consumer-buffering/pom.xml b/examples/jms/no-consumer-buffering/pom.xml
index 0415b4b..b205475 100644
--- a/examples/jms/no-consumer-buffering/pom.xml
+++ b/examples/jms/no-consumer-buffering/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.NoConsumerBufferingExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/no-consumer-buffering/src/main/java/org/apache/activemq/jms/example/NoConsumerBufferingExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/no-consumer-buffering/src/main/java/org/apache/activemq/jms/example/NoConsumerBufferingExample.java b/examples/jms/no-consumer-buffering/src/main/java/org/apache/activemq/jms/example/NoConsumerBufferingExample.java
index 61e5ff6..98af21d 100644
--- a/examples/jms/no-consumer-buffering/src/main/java/org/apache/activemq/jms/example/NoConsumerBufferingExample.java
+++ b/examples/jms/no-consumer-buffering/src/main/java/org/apache/activemq/jms/example/NoConsumerBufferingExample.java
@@ -51,10 +51,10 @@ public class NoConsumerBufferingExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perfom a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. Create a JMS Connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/no-consumer-buffering/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/no-consumer-buffering/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/no-consumer-buffering/src/main/resources/hornetq/server0/activemq-jms.xml
index a679ccc..0d5c953 100644
--- a/examples/jms/no-consumer-buffering/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/no-consumer-buffering/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,24 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <!-- We set the consumer window size to 0, which means messages are not buffered at all
- on the client side -->
- <consumer-window-size>0</consumer-window-size>
-
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/non-transaction-failover/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/pom.xml b/examples/jms/non-transaction-failover/pom.xml
index 54afb76..0bd9fa5 100644
--- a/examples/jms/non-transaction-failover/pom.xml
+++ b/examples/jms/non-transaction-failover/pom.xml
@@ -85,8 +85,8 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.NonTransactionFailoverExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
</args>
<systemProperties>
<property>
@@ -151,11 +151,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/non-transaction-failover/src/main/java/org/apache/activemq/jms/example/NonTransactionFailoverExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/src/main/java/org/apache/activemq/jms/example/NonTransactionFailoverExample.java b/examples/jms/non-transaction-failover/src/main/java/org/apache/activemq/jms/example/NonTransactionFailoverExample.java
index 68f79e9..fc37097 100644
--- a/examples/jms/non-transaction-failover/src/main/java/org/apache/activemq/jms/example/NonTransactionFailoverExample.java
+++ b/examples/jms/non-transaction-failover/src/main/java/org/apache/activemq/jms/example/NonTransactionFailoverExample.java
@@ -56,8 +56,8 @@ public class NonTransactionFailoverExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Look up the JMS resources from JNDI
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
- ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
+ ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 3. Create a JMS Connection
connection = connectionFactory.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/non-transaction-failover/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/non-transaction-failover/src/main/resources/hornetq/server0/activemq-jms.xml
index c3b0393..0d5c953 100644
--- a/examples/jms/non-transaction-failover/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/non-transaction-failover/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,32 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
-
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/non-transaction-failover/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/non-transaction-failover/src/main/resources/hornetq/server1/activemq-jms.xml
index a5ea085..0d5c953 100644
--- a/examples/jms/non-transaction-failover/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/non-transaction-failover/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,32 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
-
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <ha>true</ha>
- <!-- Pause 1 second between connect attempts -->
- <retry-interval>1000</retry-interval>
-
- <!-- Multiply subsequent reconnect pauses by this multiplier. This can be used to
- implement an exponential back-off. For our purposes we just set to 1.0 so each reconnect
- pause is the same length -->
- <retry-interval-multiplier>1.0</retry-interval-multiplier>
-
- <!-- Try reconnecting an unlimited number of times (-1 means "unlimited") -->
- <reconnect-attempts>-1</reconnect-attempts>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/openwire/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/openwire/pom.xml b/examples/jms/openwire/pom.xml
index b2ba575..b129d99 100644
--- a/examples/jms/openwire/pom.xml
+++ b/examples/jms/openwire/pom.xml
@@ -56,7 +56,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.OpenWireExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -108,11 +108,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/openwire/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/openwire/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/openwire/src/main/resources/hornetq/server0/activemq-jms.xml
index 3058fc8..0d5c953 100644
--- a/examples/jms/openwire/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/openwire/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/paging/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/paging/pom.xml b/examples/jms/paging/pom.xml
index d635df5..6081b2b 100644
--- a/examples/jms/paging/pom.xml
+++ b/examples/jms/paging/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.PagingExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/paging/src/main/java/org/apache/activemq/jms/example/PagingExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/paging/src/main/java/org/apache/activemq/jms/example/PagingExample.java b/examples/jms/paging/src/main/java/org/apache/activemq/jms/example/PagingExample.java
index 1ba955e..fe50d82 100644
--- a/examples/jms/paging/src/main/java/org/apache/activemq/jms/example/PagingExample.java
+++ b/examples/jms/paging/src/main/java/org/apache/activemq/jms/example/PagingExample.java
@@ -52,11 +52,11 @@ public class PagingExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 3. We look-up the JMS queue object from JNDI. pagingQueue is configured to hold a very limited number
// of bytes in memory
- Queue pageQueue = (Queue)initialContext.lookup("/queue/pagingQueue");
+ Queue pageQueue = (Queue)initialContext.lookup("queue/pagingQueue");
// Step 4. Lookup for a JMS Queue
Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/paging/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/paging/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/paging/src/main/resources/hornetq/server0/activemq-jms.xml
index 16a1074..980f889 100644
--- a/examples/jms/paging/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/paging/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,23 +1,10 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the topic used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
- <queue name="pagingQueue">
- <entry name="/queue/pagingQueue"/>
- </queue>
+ <queue name="pagingQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/perf/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/perf/pom.xml b/examples/jms/perf/pom.xml
index 3416cf6..6b04923 100644
--- a/examples/jms/perf/pom.xml
+++ b/examples/jms/perf/pom.xml
@@ -34,11 +34,6 @@
<version>1.1.0.GA</version>
</dependency>
<dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnp-client</artifactId>
- <version>5.0.5.Final</version>
- </dependency>
- <dependency>
<groupId>org.apache.activemq.examples.jms</groupId>
<artifactId>activemq-jms-examples-common</artifactId>
<version>${project.version}</version>
@@ -118,11 +113,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
</plugin>
</plugins>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/perf/src/main/resources/client.jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/perf/src/main/resources/client.jndi.properties b/examples/jms/perf/src/main/resources/client.jndi.properties
index 080524f..6940f75 100644
--- a/examples/jms/perf/src/main/resources/client.jndi.properties
+++ b/examples/jms/perf/src/main/resources/client.jndi.properties
@@ -1,3 +1,2 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url=tcp://localhost:5445
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/perf/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/perf/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/perf/src/main/resources/hornetq/server0/activemq-jms.xml
index 0fe8db1..613bf94 100644
--- a/examples/jms/perf/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/perf/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,18 +1,7 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <queue name="perfQueue">
- <entry name="perfQueue"/>
- </queue>
+
+ <queue name="perfQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/pre-acknowledge/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/pre-acknowledge/pom.xml b/examples/jms/pre-acknowledge/pom.xml
index 35112bd..14623b8 100644
--- a/examples/jms/pre-acknowledge/pom.xml
+++ b/examples/jms/pre-acknowledge/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.PreacknowledgeExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/pre-acknowledge/src/main/java/org/apache/activemq/jms/example/PreacknowledgeExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/pre-acknowledge/src/main/java/org/apache/activemq/jms/example/PreacknowledgeExample.java b/examples/jms/pre-acknowledge/src/main/java/org/apache/activemq/jms/example/PreacknowledgeExample.java
index 18aaa25..e3f2c7a 100644
--- a/examples/jms/pre-acknowledge/src/main/java/org/apache/activemq/jms/example/PreacknowledgeExample.java
+++ b/examples/jms/pre-acknowledge/src/main/java/org/apache/activemq/jms/example/PreacknowledgeExample.java
@@ -63,9 +63,9 @@ public class PreacknowledgeExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perform the look-ups
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 3. Create a the JMS objects
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/pre-acknowledge/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/pre-acknowledge/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/pre-acknowledge/src/main/resources/hornetq/server0/activemq-jms.xml
index 3058fc8..0d5c953 100644
--- a/examples/jms/pre-acknowledge/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/pre-acknowledge/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/producer-rate-limit/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/producer-rate-limit/pom.xml b/examples/jms/producer-rate-limit/pom.xml
index 35dcd66..6d4bf66 100644
--- a/examples/jms/producer-rate-limit/pom.xml
+++ b/examples/jms/producer-rate-limit/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ProducerRateLimitExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/producer-rate-limit/src/main/java/org/apache/activemq/jms/example/ProducerRateLimitExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/producer-rate-limit/src/main/java/org/apache/activemq/jms/example/ProducerRateLimitExample.java b/examples/jms/producer-rate-limit/src/main/java/org/apache/activemq/jms/example/ProducerRateLimitExample.java
index 61fd763..1b78bd9 100644
--- a/examples/jms/producer-rate-limit/src/main/java/org/apache/activemq/jms/example/ProducerRateLimitExample.java
+++ b/examples/jms/producer-rate-limit/src/main/java/org/apache/activemq/jms/example/ProducerRateLimitExample.java
@@ -51,10 +51,10 @@ public class ProducerRateLimitExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perfom a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. Create a JMS Connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/producer-rate-limit/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/producer-rate-limit/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/producer-rate-limit/src/main/resources/hornetq/server0/activemq-jms.xml
index c68b505..0d5c953 100644
--- a/examples/jms/producer-rate-limit/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/producer-rate-limit/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,24 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
-
- <!-- We limit producers created on this connection factory to produce messages at a maximum rate
- of 50 messages per sec -->
- <producer-max-rate>50</producer-max-rate>
-
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/proton-cpp/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/proton-cpp/pom.xml b/examples/jms/proton-cpp/pom.xml
index 801d97d..32d30c3 100644
--- a/examples/jms/proton-cpp/pom.xml
+++ b/examples/jms/proton-cpp/pom.xml
@@ -34,11 +34,6 @@
<version>1.1.0.GA</version>
</dependency>
<dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnp-client</artifactId>
- <version>5.0.5.Final</version>
- </dependency>
- <dependency>
<groupId>org.jboss.spec.javax.jms</groupId>
<artifactId>jboss-jms-api_2.0_spec</artifactId>
</dependency>
@@ -119,11 +114,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
</plugin>
</plugins>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/proton-j/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/proton-j/pom.xml b/examples/jms/proton-j/pom.xml
index 7f2fad5..f530c43 100644
--- a/examples/jms/proton-j/pom.xml
+++ b/examples/jms/proton-j/pom.xml
@@ -53,7 +53,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ProtonJExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -105,11 +105,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/proton-ruby/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/proton-ruby/pom.xml b/examples/jms/proton-ruby/pom.xml
index d3a2e7a..7c6ce21 100644
--- a/examples/jms/proton-ruby/pom.xml
+++ b/examples/jms/proton-ruby/pom.xml
@@ -83,11 +83,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/queue-message-redistribution/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/queue-message-redistribution/pom.xml b/examples/jms/queue-message-redistribution/pom.xml
index a8868e8..d2b79af 100644
--- a/examples/jms/queue-message-redistribution/pom.xml
+++ b/examples/jms/queue-message-redistribution/pom.xml
@@ -79,8 +79,8 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.QueueMessageRedistributionExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
- <param>jnp://localhost:1199</param>
+ <param>tcp://localhost:5445</param>
+ <param>tcp://localhost:5446</param>
</args>
<systemProperties>
<property>
@@ -145,11 +145,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/queue-message-redistribution/src/main/java/org/apache/activemq/jms/example/QueueMessageRedistributionExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/queue-message-redistribution/src/main/java/org/apache/activemq/jms/example/QueueMessageRedistributionExample.java b/examples/jms/queue-message-redistribution/src/main/java/org/apache/activemq/jms/example/QueueMessageRedistributionExample.java
index d8183d6..732f36d 100644
--- a/examples/jms/queue-message-redistribution/src/main/java/org/apache/activemq/jms/example/QueueMessageRedistributionExample.java
+++ b/examples/jms/queue-message-redistribution/src/main/java/org/apache/activemq/jms/example/QueueMessageRedistributionExample.java
@@ -59,16 +59,16 @@ public class QueueMessageRedistributionExample extends ActiveMQExample
ic0 = getContext(0);
// Step 2. Look-up the JMS Queue object from JNDI
- Queue queue = (Queue)ic0.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)ic0.lookup("queue/exampleQueue");
// Step 3. Look-up a JMS Connection Factory object from JNDI on server 0
- ConnectionFactory cf0 = (ConnectionFactory)ic0.lookup("/ConnectionFactory");
+ ConnectionFactory cf0 = (ConnectionFactory)ic0.lookup("ConnectionFactory");
// Step 4. Get an initial context for looking up JNDI from server 1
ic1 = getContext(1);
// Step 5. Look-up a JMS Connection Factory object from JNDI on server 1
- ConnectionFactory cf1 = (ConnectionFactory)ic1.lookup("/ConnectionFactory");
+ ConnectionFactory cf1 = (ConnectionFactory)ic1.lookup("ConnectionFactory");
// Step 6. We create a JMS Connection connection0 which is a connection to server 0
connection0 = cf0.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/queue-message-redistribution/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/queue-message-redistribution/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/queue-message-redistribution/src/main/resources/hornetq/server0/activemq-jms.xml
index 452b958..847659f 100644
--- a/examples/jms/queue-message-redistribution/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/queue-message-redistribution/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/queue-message-redistribution/src/main/resources/hornetq/server1/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/queue-message-redistribution/src/main/resources/hornetq/server1/activemq-jms.xml b/examples/jms/queue-message-redistribution/src/main/resources/hornetq/server1/activemq-jms.xml
index 452b958..847659f 100644
--- a/examples/jms/queue-message-redistribution/src/main/resources/hornetq/server1/activemq-jms.xml
+++ b/examples/jms/queue-message-redistribution/src/main/resources/hornetq/server1/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/queue-requestor/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/queue-requestor/pom.xml b/examples/jms/queue-requestor/pom.xml
index f9e6eac..1c644d9 100644
--- a/examples/jms/queue-requestor/pom.xml
+++ b/examples/jms/queue-requestor/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.QueueRequestorExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/queue-requestor/src/main/java/org/apache/activemq/jms/example/QueueRequestorExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/queue-requestor/src/main/java/org/apache/activemq/jms/example/QueueRequestorExample.java b/examples/jms/queue-requestor/src/main/java/org/apache/activemq/jms/example/QueueRequestorExample.java
index a0c23b1..b2f3d5b 100644
--- a/examples/jms/queue-requestor/src/main/java/org/apache/activemq/jms/example/QueueRequestorExample.java
+++ b/examples/jms/queue-requestor/src/main/java/org/apache/activemq/jms/example/QueueRequestorExample.java
@@ -51,10 +51,10 @@ public class QueueRequestorExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perfom a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Look-up the JMS queue connection factory
- QueueConnectionFactory cf = (QueueConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ QueueConnectionFactory cf = (QueueConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. Create a TextReverserService which consumes messages from the queue and sends message with reversed
// text
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/queue-requestor/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/queue-requestor/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/queue-requestor/src/main/resources/hornetq/server0/activemq-jms.xml
index f38ed2d..0d5c953 100644
--- a/examples/jms/queue-requestor/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/queue-requestor/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory" signature="queue">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/queue-selector/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/queue-selector/pom.xml b/examples/jms/queue-selector/pom.xml
index 0cc2420..cb7024a 100644
--- a/examples/jms/queue-selector/pom.xml
+++ b/examples/jms/queue-selector/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.QueueSelectorExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/queue-selector/src/main/java/org/apache/activemq/jms/example/QueueSelectorExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/queue-selector/src/main/java/org/apache/activemq/jms/example/QueueSelectorExample.java b/examples/jms/queue-selector/src/main/java/org/apache/activemq/jms/example/QueueSelectorExample.java
index 57ef227..ccb5250 100644
--- a/examples/jms/queue-selector/src/main/java/org/apache/activemq/jms/example/QueueSelectorExample.java
+++ b/examples/jms/queue-selector/src/main/java/org/apache/activemq/jms/example/QueueSelectorExample.java
@@ -55,10 +55,10 @@ public class QueueSelectorExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. look-up the JMS queue object from JNDI
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. look-up the JMS connection factory object from JNDI
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. Create a JMS Connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/queue-selector/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/queue-selector/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/queue-selector/src/main/resources/hornetq/server0/activemq-jms.xml
index 452b958..847659f 100644
--- a/examples/jms/queue-selector/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/queue-selector/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/queue/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/queue/pom.xml b/examples/jms/queue/pom.xml
index 97797a0..307d2f8 100644
--- a/examples/jms/queue/pom.xml
+++ b/examples/jms/queue/pom.xml
@@ -52,7 +52,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.QueueExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
</configuration>
</execution>
@@ -99,11 +99,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/queue/src/main/java/org/apache/activemq/jms/example/QueueExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/queue/src/main/java/org/apache/activemq/jms/example/QueueExample.java b/examples/jms/queue/src/main/java/org/apache/activemq/jms/example/QueueExample.java
index a9dffee..a838c73 100644
--- a/examples/jms/queue/src/main/java/org/apache/activemq/jms/example/QueueExample.java
+++ b/examples/jms/queue/src/main/java/org/apache/activemq/jms/example/QueueExample.java
@@ -50,10 +50,10 @@ public class QueueExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perfom a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4.Create a JMS Connection
connection = cf.createConnection();
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/queue/src/main/resources/hornetq/server0/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/examples/jms/queue/src/main/resources/hornetq/server0/activemq-jms.xml b/examples/jms/queue/src/main/resources/hornetq/server0/activemq-jms.xml
index 3058fc8..0d5c953 100644
--- a/examples/jms/queue/src/main/resources/hornetq/server0/activemq-jms.xml
+++ b/examples/jms/queue/src/main/resources/hornetq/server0/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="netty-connector"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/reattach-node/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/reattach-node/pom.xml b/examples/jms/reattach-node/pom.xml
index f7d955e..97fee3c 100644
--- a/examples/jms/reattach-node/pom.xml
+++ b/examples/jms/reattach-node/pom.xml
@@ -47,7 +47,7 @@
<configuration>
<clientClass>org.apache.activemq.jms.example.ReattachExample</clientClass>
<args>
- <param>jnp://localhost:1099</param>
+ <param>tcp://localhost:5445</param>
</args>
<systemProperties>
<property>
@@ -103,11 +103,6 @@
<artifactId>jboss-jms-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.3.GA</version>
- </dependency>
</dependencies>
<configuration>
<waitOnStart>false</waitOnStart>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/examples/jms/reattach-node/src/main/java/org/apache/activemq/jms/example/ReattachExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/reattach-node/src/main/java/org/apache/activemq/jms/example/ReattachExample.java b/examples/jms/reattach-node/src/main/java/org/apache/activemq/jms/example/ReattachExample.java
index 303f2da..65d40fe 100644
--- a/examples/jms/reattach-node/src/main/java/org/apache/activemq/jms/example/ReattachExample.java
+++ b/examples/jms/reattach-node/src/main/java/org/apache/activemq/jms/example/ReattachExample.java
@@ -56,10 +56,10 @@ public class ReattachExample extends ActiveMQExample
initialContext = getContext(0);
// Step 2. Perform a lookup on the queue
- Queue queue = (Queue)initialContext.lookup("/queue/exampleQueue");
+ Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
// Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
// Step 4. Create a JMS Connection
connection = cf.createConnection();
@@ -136,7 +136,7 @@ public class ReattachExample extends ActiveMQExample
// when the main connection has been stopped
private void stopStartAcceptor(final InitialContext initialContext, final boolean stop) throws Exception
{
- ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory2");
+ ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory2");
Connection connection = null;
try
[12/13] activemq-6 git commit: Handful of test fixes
Posted by cl...@apache.org.
Handful of test fixes
Project: http://git-wip-us.apache.org/repos/asf/activemq-6/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-6/commit/7cfd76d3
Tree: http://git-wip-us.apache.org/repos/asf/activemq-6/tree/7cfd76d3
Diff: http://git-wip-us.apache.org/repos/asf/activemq-6/diff/7cfd76d3
Branch: refs/heads/master
Commit: 7cfd76d321fe4b9fb9bbb4030bae7dd8b4072c3d
Parents: e6a3d3a
Author: jbertram <jb...@redhat.com>
Authored: Mon Nov 24 16:49:39 2014 -0600
Committer: jbertram <jb...@redhat.com>
Committed: Fri Dec 5 09:27:53 2014 -0600
----------------------------------------------------------------------
.../org/apache/activemq/tests/integration/client/PagingTest.java | 2 +-
.../integration/jms/server/management/JMSServerControl2Test.java | 4 ++--
.../activemq/tests/integration/ra/ResourceAdapterTest.java | 2 +-
.../apache/activemq/tests/integration/stomp/ExtraStompTest.java | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/7cfd76d3/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/PagingTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/PagingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/PagingTest.java
index 01bb091..56369c8 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/PagingTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/client/PagingTest.java
@@ -5239,7 +5239,7 @@ public class PagingTest extends ServiceTestBase
// allow time for the logging to actually happen on the server
Thread.sleep(100);
- Assert.assertTrue("Expected to find HQ224016", AssertionLoggerHandler.findText("HQ224016"));
+ Assert.assertTrue("Expected to find AMQ224016", AssertionLoggerHandler.findText("AMQ224016"));
ClientConsumer consumer = session.createConsumer(ADDRESS);
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/7cfd76d3/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControl2Test.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControl2Test.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControl2Test.java
index fb5d3f5..4ca8615 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControl2Test.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/jms/server/management/JMSServerControl2Test.java
@@ -543,7 +543,7 @@ public class JMSServerControl2Test extends ManagementTestBase
spec.setPassword("password");
- spec.setDestinationType("Queue");
+ spec.setDestinationType("javax.jms.Queue");
spec.setDestination("test");
spec.setMinSession(1);
@@ -632,7 +632,7 @@ public class JMSServerControl2Test extends ManagementTestBase
spec.setUser("user");
spec.setPassword("password");
- spec.setDestinationType("Queue");
+ spec.setDestinationType("javax.jms.Queue");
spec.setDestination("test");
spec.setMinSession(1);
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/7cfd76d3/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ResourceAdapterTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ResourceAdapterTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ResourceAdapterTest.java
index 6e0ef08..9387ab5 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ResourceAdapterTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/ra/ResourceAdapterTest.java
@@ -86,7 +86,7 @@ public class ResourceAdapterTest extends ActiveMQRATestBase
spec.setUser("user");
spec.setPassword("password");
- spec.setDestinationType("Topic");
+ spec.setDestinationType("javax.jms.Topic");
spec.setDestination("test");
spec.setMinSession(1);
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/7cfd76d3/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/ExtraStompTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/ExtraStompTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/ExtraStompTest.java
index f2533a8..6b427e2 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/ExtraStompTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/tests/integration/stomp/ExtraStompTest.java
@@ -740,7 +740,7 @@ public class ExtraStompTest extends StompTestBase
while (enu.hasMoreElements())
{
Message msg = (Message) enu.nextElement();
- String msgId = msg.getStringProperty("amqMessageId");
+ String msgId = msg.getStringProperty("hqMessageId");
if (enable != null && enable.booleanValue())
{
assertNotNull(msgId);
[10/13] activemq-6 git commit: ACTIVEMQ6-14 Replace JNDI server with
client impl
Posted by cl...@apache.org.
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerConfigParserImpl.java
----------------------------------------------------------------------
diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerConfigParserImpl.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerConfigParserImpl.java
index 139ffdb..cd948c1 100644
--- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerConfigParserImpl.java
+++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerConfigParserImpl.java
@@ -20,21 +20,15 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.ArrayList;
-import java.util.List;
import org.apache.activemq.api.config.ActiveMQDefaultConfiguration;
-import org.apache.activemq.api.core.ActiveMQException;
-import org.apache.activemq.api.core.client.ActiveMQClient;
-import org.apache.activemq.api.jms.JMSFactoryType;
import org.apache.activemq.core.config.impl.Validators;
-import org.apache.activemq.jms.server.ActiveMQJMSServerBundle;
import org.apache.activemq.jms.server.ActiveMQJMSServerLogger;
import org.apache.activemq.jms.server.JMSServerConfigParser;
import org.apache.activemq.jms.server.config.ConnectionFactoryConfiguration;
import org.apache.activemq.jms.server.config.JMSConfiguration;
import org.apache.activemq.jms.server.config.JMSQueueConfiguration;
import org.apache.activemq.jms.server.config.TopicConfiguration;
-import org.apache.activemq.jms.server.config.impl.ConnectionFactoryConfigurationImpl;
import org.apache.activemq.jms.server.config.impl.JMSConfigurationImpl;
import org.apache.activemq.jms.server.config.impl.JMSQueueConfigurationImpl;
import org.apache.activemq.jms.server.config.impl.TopicConfigurationImpl;
@@ -85,8 +79,7 @@ public final class JMSServerConfigParserImpl implements JMSServerConfigParser
org.apache.activemq.utils.XMLUtil.validate(rootnode, "schema/activemq-jms.xsd");
String[] elements = new String[]{JMSServerDeployer.QUEUE_NODE_NAME,
- JMSServerDeployer.TOPIC_NODE_NAME,
- JMSServerDeployer.CONNECTION_FACTORY_NODE_NAME};
+ JMSServerDeployer.TOPIC_NODE_NAME};
for (String element : elements)
{
NodeList children = e.getElementsByTagName(element);
@@ -100,11 +93,7 @@ public final class JMSServerConfigParserImpl implements JMSServerConfigParser
continue;
}
- if (node.getNodeName().equals(JMSServerDeployer.CONNECTION_FACTORY_NODE_NAME))
- {
- cfs.add(parseConnectionFactoryConfiguration(node));
- }
- else if (node.getNodeName().equals(JMSServerDeployer.TOPIC_NODE_NAME))
+ if (node.getNodeName().equals(JMSServerDeployer.TOPIC_NODE_NAME))
{
topics.add(parseTopicConfiguration(node));
}
@@ -118,7 +107,7 @@ public final class JMSServerConfigParserImpl implements JMSServerConfigParser
domain = XMLConfigurationUtil.getString(e, JMSServerDeployer.JMX_DOMAIN_NAME, ActiveMQDefaultConfiguration.getDefaultJmxDomain(), Validators.NO_CHECK);
- JMSConfiguration value = newConfig(queues, topics, cfs, domain);
+ JMSConfiguration value = newConfig(queues, topics, domain);
return value;
}
@@ -133,23 +122,8 @@ public final class JMSServerConfigParserImpl implements JMSServerConfigParser
public TopicConfiguration parseTopicConfiguration(final Node node) throws Exception
{
String topicName = node.getAttributes().getNamedItem(JMSServerConfigParserImpl.NAME_ATTR).getNodeValue();
- NodeList children = node.getChildNodes();
- ArrayList<String> jndiNames = new ArrayList<String>();
- for (int i = 0; i < children.getLength(); i++)
- {
- Node child = children.item(i);
-
- if (JMSServerDeployer.ENTRY_NODE_NAME.equals(children.item(i).getNodeName()))
- {
- String jndiElement = child.getAttributes().getNamedItem("name").getNodeValue();
- jndiNames.add(jndiElement);
- }
- }
-
- String[] strBindings = jndiNames.toArray(new String[jndiNames.size()]);
-
- return newTopic(topicName, strBindings);
+ return newTopic(topicName);
}
/**
@@ -167,17 +141,11 @@ public final class JMSServerConfigParserImpl implements JMSServerConfigParser
String selectorString = null;
boolean durable = XMLConfigurationUtil.getBoolean(e, "durable", JMSServerDeployer.DEFAULT_QUEUE_DURABILITY);
NodeList children = node.getChildNodes();
- ArrayList<String> jndiNames = new ArrayList<String>();
for (int i = 0; i < children.getLength(); i++)
{
Node child = children.item(i);
- if (JMSServerDeployer.ENTRY_NODE_NAME.equals(children.item(i).getNodeName()))
- {
- String jndiName = child.getAttributes().getNamedItem("name").getNodeValue();
- jndiNames.add(jndiName);
- }
- else if (JMSServerDeployer.QUEUE_SELECTOR_NODE_NAME.equals(children.item(i).getNodeName()))
+ if (JMSServerDeployer.QUEUE_SELECTOR_NODE_NAME.equals(children.item(i).getNodeName()))
{
Node selectorNode = children.item(i);
Node attNode = selectorNode.getAttributes().getNamedItem("string");
@@ -185,298 +153,19 @@ public final class JMSServerConfigParserImpl implements JMSServerConfigParser
}
}
- String[] jndiArray = jndiNames.toArray(new String[jndiNames.size()]);
- return newQueue(queueName, selectorString, durable, jndiArray);
- }
-
- /**
- * Parse the Connection Configuration node as a ConnectionFactoryConfiguration object
- *
- * @param node
- * @return ConnectionFactoryConfiguration
- * @throws Exception
- */
- public ConnectionFactoryConfiguration parseConnectionFactoryConfiguration(final Node node) throws Exception
- {
- if (!node.getNodeName().equals(JMSServerDeployer.CONNECTION_FACTORY_NODE_NAME))
- {
- // sanity check, this shouldn't ever happen
- throw ActiveMQJMSServerBundle.BUNDLE.invalidNodeParsingCF(node.getNodeName());
- }
- Element e = (Element) node;
-
- String name = node.getAttributes().getNamedItem(JMSServerConfigParserImpl.NAME_ATTR).getNodeValue();
-
- String fact = e.getAttribute("signature");
- boolean isXA = XMLConfigurationUtil.getBoolean(e,
- "xa",
- ActiveMQClient.DEFAULT_XA);
-
- JMSFactoryType factType = resolveFactoryType(fact, isXA);
-
- long clientFailureCheckPeriod = XMLConfigurationUtil.getLong(e,
- "client-failure-check-period",
- ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
- Validators.MINUS_ONE_OR_GT_ZERO);
- long connectionTTL = XMLConfigurationUtil.getLong(e,
- "connection-ttl",
- ActiveMQClient.DEFAULT_CONNECTION_TTL,
- Validators.MINUS_ONE_OR_GE_ZERO);
- long callTimeout = XMLConfigurationUtil.getLong(e,
- "call-timeout",
- ActiveMQClient.DEFAULT_CALL_TIMEOUT,
- Validators.GE_ZERO);
- long callFailoverTimeout = XMLConfigurationUtil.getLong(e,
- "call-failover-timeout",
- ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT,
- Validators.MINUS_ONE_OR_GT_ZERO);
- String clientID = XMLConfigurationUtil.getString(e, "client-id", null, Validators.NO_CHECK);
- int dupsOKBatchSize = XMLConfigurationUtil.getInteger(e,
- "dups-ok-batch-size",
- ActiveMQClient.DEFAULT_ACK_BATCH_SIZE,
- Validators.GT_ZERO);
- int transactionBatchSize = XMLConfigurationUtil.getInteger(e,
- "transaction-batch-size",
- ActiveMQClient.DEFAULT_ACK_BATCH_SIZE,
- Validators.GT_ZERO);
- int consumerWindowSize = XMLConfigurationUtil.getInteger(e,
- "consumer-window-size",
- ActiveMQClient.DEFAULT_CONSUMER_WINDOW_SIZE,
- Validators.MINUS_ONE_OR_GE_ZERO);
- int producerWindowSize = XMLConfigurationUtil.getInteger(e,
- "producer-window-size",
- ActiveMQClient.DEFAULT_PRODUCER_WINDOW_SIZE,
- Validators.MINUS_ONE_OR_GT_ZERO);
- int consumerMaxRate = XMLConfigurationUtil.getInteger(e,
- "consumer-max-rate",
- ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE,
- Validators.MINUS_ONE_OR_GT_ZERO);
- int confirmationWindowSize = XMLConfigurationUtil.getInteger(e,
- "confirmation-window-size",
- ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE,
- Validators.MINUS_ONE_OR_GT_ZERO);
- int producerMaxRate = XMLConfigurationUtil.getInteger(e,
- "producer-max-rate",
- ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE,
- Validators.MINUS_ONE_OR_GT_ZERO);
- boolean cacheLargeMessagesClient = XMLConfigurationUtil.getBoolean(e,
- "cache-large-message-client",
- ActiveMQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT);
- int minLargeMessageSize = XMLConfigurationUtil.getInteger(e,
- "min-large-message-size",
- ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE,
- Validators.GT_ZERO);
-
- boolean compressLargeMessages = XMLConfigurationUtil.getBoolean(e,
- "compress-large-messages",
- ActiveMQClient.DEFAULT_COMPRESS_LARGE_MESSAGES);
-
- boolean blockOnAcknowledge = XMLConfigurationUtil.getBoolean(e,
- "block-on-acknowledge",
- ActiveMQClient.DEFAULT_BLOCK_ON_ACKNOWLEDGE);
- boolean blockOnNonDurableSend = XMLConfigurationUtil.getBoolean(e,
- "block-on-non-durable-send",
- ActiveMQClient.DEFAULT_BLOCK_ON_NON_DURABLE_SEND);
- boolean blockOnDurableSend = XMLConfigurationUtil.getBoolean(e,
- "block-on-durable-send",
- ActiveMQClient.DEFAULT_BLOCK_ON_DURABLE_SEND);
- boolean autoGroup = XMLConfigurationUtil.getBoolean(e, "auto-group", ActiveMQClient.DEFAULT_AUTO_GROUP);
- boolean preAcknowledge = XMLConfigurationUtil.getBoolean(e,
- "pre-acknowledge",
- ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE);
- long retryInterval = XMLConfigurationUtil.getLong(e,
- "retry-interval",
- ActiveMQClient.DEFAULT_RETRY_INTERVAL,
- Validators.GT_ZERO);
- double retryIntervalMultiplier = XMLConfigurationUtil.getDouble(e,
- "retry-interval-multiplier",
- ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER,
- Validators.GT_ZERO);
- long maxRetryInterval = XMLConfigurationUtil.getLong(e,
- "max-retry-interval",
- ActiveMQClient.DEFAULT_MAX_RETRY_INTERVAL,
- Validators.GT_ZERO);
- int reconnectAttempts = XMLConfigurationUtil.getInteger(e,
- "reconnect-attempts",
- ActiveMQClient.DEFAULT_RECONNECT_ATTEMPTS,
- Validators.MINUS_ONE_OR_GE_ZERO);
- boolean failoverOnInitialConnection = XMLConfigurationUtil.getBoolean(e,
- "failover-on-initial-connection",
- ActiveMQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION);
-
- boolean useGlobalPools = XMLConfigurationUtil.getBoolean(e,
- "use-global-pools",
- ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS);
- int scheduledThreadPoolMaxSize = XMLConfigurationUtil.getInteger(e,
- "scheduled-thread-pool-max-size",
- ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE,
- Validators.MINUS_ONE_OR_GT_ZERO);
- int threadPoolMaxSize = XMLConfigurationUtil.getInteger(e,
- "thread-pool-max-size",
- ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE,
- Validators.MINUS_ONE_OR_GT_ZERO);
- String connectionLoadBalancingPolicyClassName = XMLConfigurationUtil.getString(e,
- "connection-load-balancing-policy-class-name",
- ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME,
- Validators.NOT_NULL_OR_EMPTY);
- boolean ha = XMLConfigurationUtil.getBoolean(e, "ha", ActiveMQClient.DEFAULT_HA);
-
- String groupid = XMLConfigurationUtil.getString(e, "group-id", null, Validators.NO_CHECK);
- List<String> jndiBindings = new ArrayList<String>();
- List<String> connectorNames = new ArrayList<String>();
- String discoveryGroupName = null;
-
- NodeList children = node.getChildNodes();
-
- for (int j = 0; j < children.getLength(); j++)
- {
- Node child = children.item(j);
-
- if (JMSServerDeployer.ENTRIES_NODE_NAME.equals(child.getNodeName()))
- {
- NodeList entries = child.getChildNodes();
- for (int i = 0; i < entries.getLength(); i++)
- {
- Node entry = entries.item(i);
- if (JMSServerDeployer.ENTRY_NODE_NAME.equals(entry.getNodeName()))
- {
- String jndiName = entry.getAttributes().getNamedItem("name").getNodeValue();
-
- jndiBindings.add(jndiName);
- }
- }
- }
- else if (JMSServerDeployer.CONNECTORS_NODE_NAME.equals(child.getNodeName()))
- {
- NodeList entries = child.getChildNodes();
- for (int i = 0; i < entries.getLength(); i++)
- {
- Node entry = entries.item(i);
- if (JMSServerDeployer.CONNECTOR_REF_ELEMENT.equals(entry.getNodeName()))
- {
- String connectorName = entry.getAttributes().getNamedItem("connector-name").getNodeValue();
-
- connectorNames.add(connectorName);
- }
- }
- }
- else if (JMSServerDeployer.DISCOVERY_GROUP_ELEMENT.equals(child.getNodeName()))
- {
- discoveryGroupName = child.getAttributes().getNamedItem("discovery-group-name").getNodeValue();
-
- }
- }
-
- ConnectionFactoryConfiguration cfConfig;
-
- String[] strbindings = jndiBindings.toArray(new String[jndiBindings.size()]);
-
- if (discoveryGroupName != null)
- {
- cfConfig = new ConnectionFactoryConfigurationImpl()
- .setDiscoveryGroupName(discoveryGroupName);
- }
- else
- {
- ArrayList<String> connectors = new ArrayList<String>(connectorNames.size());
- for (String connectorName : connectorNames)
- {
- connectors.add(connectorName);
- }
- cfConfig = new ConnectionFactoryConfigurationImpl()
- .setConnectorNames(connectors);
- }
-
- cfConfig
- .setName(name)
- .setHA(ha)
- .setBindings(strbindings)
- .setFactoryType(factType)
- .setClientID(clientID)
- .setClientFailureCheckPeriod(clientFailureCheckPeriod)
- .setConnectionTTL(connectionTTL)
- .setCallTimeout(callTimeout)
- .setCallFailoverTimeout(callFailoverTimeout)
- .setCacheLargeMessagesClient(cacheLargeMessagesClient)
- .setMinLargeMessageSize(minLargeMessageSize)
- .setCompressLargeMessages(compressLargeMessages)
- .setConsumerWindowSize(consumerWindowSize)
- .setConsumerMaxRate(consumerMaxRate)
- .setConfirmationWindowSize(confirmationWindowSize)
- .setProducerWindowSize(producerWindowSize)
- .setProducerMaxRate(producerMaxRate)
- .setBlockOnAcknowledge(blockOnAcknowledge)
- .setBlockOnDurableSend(blockOnDurableSend)
- .setBlockOnNonDurableSend(blockOnNonDurableSend)
- .setAutoGroup(autoGroup)
- .setPreAcknowledge(preAcknowledge)
- .setLoadBalancingPolicyClassName(connectionLoadBalancingPolicyClassName)
- .setTransactionBatchSize(transactionBatchSize)
- .setDupsOKBatchSize(dupsOKBatchSize)
- .setUseGlobalPools(useGlobalPools)
- .setScheduledThreadPoolMaxSize(scheduledThreadPoolMaxSize)
- .setThreadPoolMaxSize(threadPoolMaxSize)
- .setRetryInterval(retryInterval)
- .setRetryIntervalMultiplier(retryIntervalMultiplier)
- .setMaxRetryInterval(maxRetryInterval)
- .setReconnectAttempts(reconnectAttempts)
- .setFailoverOnInitialConnection(failoverOnInitialConnection)
- .setGroupID(groupid);
-
- return cfConfig;
- }
-
- private JMSFactoryType resolveFactoryType(String fact, boolean isXA) throws ActiveMQException
- {
- if ("".equals(fact))
- {
- fact = "generic";
- }
- if (isXA)
- {
- if ("generic".equals(fact))
- {
- return JMSFactoryType.XA_CF;
- }
- if ("queue".equals(fact))
- {
- return JMSFactoryType.QUEUE_XA_CF;
- }
- if ("topic".equals(fact))
- {
- return JMSFactoryType.TOPIC_XA_CF;
- }
- }
- else
- {
- if ("generic".equals(fact))
- {
- return JMSFactoryType.CF;
- }
- if ("queue".equals(fact))
- {
- return JMSFactoryType.QUEUE_CF;
- }
- if ("topic".equals(fact))
- {
- return JMSFactoryType.TOPIC_CF;
- }
- }
- throw ActiveMQJMSServerBundle.BUNDLE.invalidSignatureParsingCF(fact);
+ return newQueue(queueName, selectorString, durable);
}
/**
* hook for integration layers
*
* @param topicName
- * @param strBindings
* @return
*/
- protected TopicConfiguration newTopic(final String topicName, final String[] strBindings)
+ protected TopicConfiguration newTopic(final String topicName)
{
return new TopicConfigurationImpl()
- .setName(topicName)
- .setBindings(strBindings);
+ .setName(topicName);
}
/**
@@ -485,19 +174,16 @@ public final class JMSServerConfigParserImpl implements JMSServerConfigParser
* @param queueName
* @param selectorString
* @param durable
- * @param jndiArray
* @return
*/
protected JMSQueueConfiguration newQueue(final String queueName,
final String selectorString,
- final boolean durable,
- final String[] jndiArray)
+ final boolean durable)
{
return new JMSQueueConfigurationImpl().
setName(queueName).
setSelector(selectorString).
- setDurable(durable).
- setBindings(jndiArray);
+ setDurable(durable);
}
/**
@@ -505,16 +191,13 @@ public final class JMSServerConfigParserImpl implements JMSServerConfigParser
*
* @param queues
* @param topics
- * @param cfs
* @param domain
* @return
*/
protected JMSConfiguration newConfig(final ArrayList<JMSQueueConfiguration> queues,
- final ArrayList<TopicConfiguration> topics,
- final ArrayList<ConnectionFactoryConfiguration> cfs, String domain)
+ final ArrayList<TopicConfiguration> topics, String domain)
{
return new JMSConfigurationImpl()
- .setConnectionFactoryConfigurations(cfs)
.setQueueConfigurations(queues)
.setTopicConfigurations(topics)
.setDomain(domain);
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerDeployer.java
----------------------------------------------------------------------
diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerDeployer.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerDeployer.java
index eaa2bec..eab54a6 100644
--- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerDeployer.java
+++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerDeployer.java
@@ -20,7 +20,6 @@ import org.apache.activemq.core.deployers.DeploymentManager;
import org.apache.activemq.core.deployers.impl.XmlDeployer;
import org.apache.activemq.jms.server.JMSServerConfigParser;
import org.apache.activemq.jms.server.JMSServerManager;
-import org.apache.activemq.jms.server.config.ConnectionFactoryConfiguration;
import org.apache.activemq.jms.server.config.JMSQueueConfiguration;
import org.apache.activemq.jms.server.config.TopicConfiguration;
import org.w3c.dom.Node;
@@ -36,18 +35,6 @@ public class JMSServerDeployer extends XmlDeployer
private final JMSServerManager jmsServerManager;
- protected static final String CONNECTOR_REF_ELEMENT = "connector-ref";
-
- protected static final String DISCOVERY_GROUP_ELEMENT = "discovery-group-ref";
-
- protected static final String ENTRIES_NODE_NAME = "entries";
-
- protected static final String ENTRY_NODE_NAME = "entry";
-
- protected static final String CONNECTORS_NODE_NAME = "connectors";
-
- protected static final String CONNECTION_FACTORY_NODE_NAME = "connection-factory";
-
protected static final String QUEUE_NODE_NAME = "queue";
protected static final String QUEUE_SELECTOR_NODE_NAME = "selector";
@@ -77,8 +64,7 @@ public class JMSServerDeployer extends XmlDeployer
public String[] getElementTagName()
{
return new String[]{JMSServerDeployer.QUEUE_NODE_NAME,
- JMSServerDeployer.TOPIC_NODE_NAME,
- JMSServerDeployer.CONNECTION_FACTORY_NODE_NAME};
+ JMSServerDeployer.TOPIC_NODE_NAME};
}
@Override
@@ -100,19 +86,14 @@ public class JMSServerDeployer extends XmlDeployer
}
/**
- * Creates the object to bind, this will either be a JBossConnectionFActory, ActiveMQQueue or
- * ActiveMQTopic.
+ * Creates the object to bind, this will either be a ActiveMQQueue or ActiveMQTopic.
*
* @param node the config
* @throws Exception
*/
private void createAndBindObject(final Node node) throws Exception
{
- if (node.getNodeName().equals(JMSServerDeployer.CONNECTION_FACTORY_NODE_NAME))
- {
- deployConnectionFactory(node);
- }
- else if (node.getNodeName().equals(JMSServerDeployer.QUEUE_NODE_NAME))
+ if (node.getNodeName().equals(JMSServerDeployer.QUEUE_NODE_NAME))
{
deployQueue(node);
}
@@ -131,12 +112,7 @@ public class JMSServerDeployer extends XmlDeployer
@Override
public void undeploy(final Node node) throws Exception
{
- if (node.getNodeName().equals(JMSServerDeployer.CONNECTION_FACTORY_NODE_NAME))
- {
- String cfName = node.getAttributes().getNamedItem(getKeyAttribute()).getNodeValue();
- jmsServerManager.destroyConnectionFactory(cfName);
- }
- else if (node.getNodeName().equals(JMSServerDeployer.QUEUE_NODE_NAME))
+ if (node.getNodeName().equals(JMSServerDeployer.QUEUE_NODE_NAME))
{
String queueName = node.getAttributes().getNamedItem(getKeyAttribute()).getNodeValue();
jmsServerManager.removeQueueFromJNDI(queueName);
@@ -162,7 +138,7 @@ public class JMSServerDeployer extends XmlDeployer
private void deployTopic(final Node node) throws Exception
{
TopicConfiguration topicConfig = parser.parseTopicConfiguration(node);
- jmsServerManager.createTopic(false, topicConfig.getName(), topicConfig.getBindings());
+ jmsServerManager.createTopic(false, topicConfig.getName());
}
/**
@@ -172,18 +148,6 @@ public class JMSServerDeployer extends XmlDeployer
private void deployQueue(final Node node) throws Exception
{
JMSQueueConfiguration queueconfig = parser.parseQueueConfiguration(node);
- jmsServerManager.createQueue(false, queueconfig.getName(), queueconfig.getSelector(), queueconfig.isDurable(), queueconfig.getBindings());
+ jmsServerManager.createQueue(false, queueconfig.getName(), queueconfig.getSelector(), queueconfig.isDurable());
}
-
- /**
- * @param node
- * @throws Exception
- */
- private void deployConnectionFactory(final Node node) throws Exception
- {
- ConnectionFactoryConfiguration cfConfig = parser.parseConnectionFactoryConfiguration(node);
- jmsServerManager.createConnectionFactory(false, cfConfig, cfConfig.getBindings());
- }
-
-
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerManagerImpl.java
----------------------------------------------------------------------
diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerManagerImpl.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerManagerImpl.java
index 392a19b..3261033 100644
--- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerManagerImpl.java
+++ b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/JMSServerManagerImpl.java
@@ -481,7 +481,10 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
{
if (!contextSet)
{
- registry = new JndiBindingRegistry(new InitialContext());
+ if (System.getProperty(Context.INITIAL_CONTEXT_FACTORY) != null)
+ {
+ registry = new JndiBindingRegistry(new InitialContext());
+ }
}
}
@@ -1731,10 +1734,9 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
private void checkJNDI(final String... jndiNames) throws NamingException
{
-
for (String jndiName : jndiNames)
{
- if (registry.lookup(jndiName) != null)
+ if (registry != null && registry.lookup(jndiName) != null)
{
throw new NamingException(jndiName + " already has an object bound");
}
@@ -1772,15 +1774,13 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
List<JMSQueueConfiguration> queueConfigs = config.getQueueConfigurations();
for (JMSQueueConfiguration qConfig : queueConfigs)
{
- String[] bindings = qConfig.getBindings();
- createQueue(false, qConfig.getName(), qConfig.getSelector(), qConfig.isDurable(), bindings);
+ createQueue(false, qConfig.getName(), qConfig.getSelector(), qConfig.isDurable(), qConfig.getBindings());
}
List<TopicConfiguration> topicConfigs = config.getTopicConfigurations();
for (TopicConfiguration tConfig : topicConfigs)
{
- String[] bindings = tConfig.getBindings();
- createTopic(false, tConfig.getName(), bindings);
+ createTopic(false, tConfig.getName(), tConfig.getBindings());
}
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/StandaloneNamingServer.java
----------------------------------------------------------------------
diff --git a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/StandaloneNamingServer.java b/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/StandaloneNamingServer.java
deleted file mode 100644
index 9d029a2..0000000
--- a/activemq-jms-server/src/main/java/org/apache/activemq/jms/server/impl/StandaloneNamingServer.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.jms.server.impl;
-
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-import org.apache.activemq.core.server.ActivateCallback;
-import org.apache.activemq.core.server.ActiveMQComponent;
-import org.apache.activemq.core.server.ActiveMQServer;
-import org.apache.activemq.core.server.ActiveMQServerLogger;
-import org.jnp.server.Main;
-import org.jnp.server.NamingBeanImpl;
-
-/**
- * This server class is only used in the standalone mode, its used to control the life cycle of the Naming Server to allow
- * it to be activated and deactivated
- *
- * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
- * 11/8/12
- */
-public class StandaloneNamingServer implements ActiveMQComponent
-{
- private Main jndiServer;
-
- private ActiveMQServer server;
-
- private NamingBeanImpl namingBean;
-
- private int port = 1099;
-
- private String bindAddress = "localhost";
-
- private int rmiPort = 1098;
-
- private String rmiBindAddress = "localhost";
-
- private ExecutorService executor;
-
- public StandaloneNamingServer(ActiveMQServer server)
- {
- this.server = server;
- }
-
- @Override
- public void start() throws Exception
- {
- server.registerActivateCallback(new ServerActivateCallback());
- }
-
- @Override
- public void stop() throws Exception
- {
- }
-
- @Override
- public boolean isStarted()
- {
- return false;
- }
-
- public void setPort(int port)
- {
- this.port = port;
- }
-
- public void setBindAddress(String bindAddress)
- {
- this.bindAddress = bindAddress;
- }
-
- public void setRmiPort(int rmiPort)
- {
- this.rmiPort = rmiPort;
- }
-
- public void setRmiBindAddress(String rmiBindAddress)
- {
- this.rmiBindAddress = rmiBindAddress;
- }
-
- private class ServerActivateCallback implements ActivateCallback
- {
- private boolean activated = false;
-
- @Override
- public synchronized void preActivate()
- {
- if (activated)
- {
- return;
- }
- try
- {
- jndiServer = new Main();
- namingBean = new NamingBeanImpl();
- jndiServer.setNamingInfo(namingBean);
- executor = Executors.newCachedThreadPool();
- jndiServer.setLookupExector(executor);
- jndiServer.setPort(port);
- jndiServer.setBindAddress(bindAddress);
- jndiServer.setRmiPort(rmiPort);
- jndiServer.setRmiBindAddress(rmiBindAddress);
- namingBean.start();
- jndiServer.start();
- }
- catch (Exception e)
- {
- ActiveMQServerLogger.LOGGER.unableToStartNamingServer(e);
- }
-
- activated = true;
- }
-
- @Override
- public void activated()
- {
-
- }
-
- @Override
- public synchronized void deActivate()
- {
- if (!activated)
- {
- return;
- }
- if (jndiServer != null)
- {
- try
- {
- jndiServer.stop();
- }
- catch (Exception e)
- {
- ActiveMQServerLogger.LOGGER.unableToStopNamingServer(e);
- }
- }
- if (namingBean != null)
- {
- namingBean.stop();
- }
- if (executor != null)
- {
- executor.shutdown();
- }
- activated = false;
- }
-
- @Override
- public void activationComplete()
- {
-
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/activemq-jms-server/src/main/resources/schema/activemq-jms.xsd
----------------------------------------------------------------------
diff --git a/activemq-jms-server/src/main/resources/schema/activemq-jms.xsd b/activemq-jms-server/src/main/resources/schema/activemq-jms.xsd
index 7367b15..b3d2cdf 100644
--- a/activemq-jms-server/src/main/resources/schema/activemq-jms.xsd
+++ b/activemq-jms-server/src/main/resources/schema/activemq-jms.xsd
@@ -9,259 +9,37 @@
version="1.0">
<xsd:element name="configuration" amq:schema="activemq-jms-configuration">
- <xsd:complexType>
- <xsd:sequence>
+ <xsd:complexType>
+ <xsd:sequence>
<xsd:element name="jmx-domain" type="xsd:string" default="org.apache.activemq"
minOccurs="0" maxOccurs="1"/>
- <xsd:element ref="connection-factory" maxOccurs="unbounded" minOccurs="0"/>
- <xsd:choice maxOccurs="unbounded" minOccurs="0">
- <xsd:element ref="queue" maxOccurs="1" minOccurs="1"/>
- <xsd:element ref="topic" maxOccurs="1" minOccurs="1"/>
+ <xsd:choice maxOccurs="unbounded" minOccurs="0">
+ <xsd:element ref="queue" maxOccurs="1" minOccurs="1"/>
+ <xsd:element ref="topic" maxOccurs="1" minOccurs="1"/>
</xsd:choice>
- </xsd:sequence>
- </xsd:complexType>
+ </xsd:sequence>
+ </xsd:complexType>
</xsd:element>
- <xsd:element name="connection-factory">
- <xsd:annotation amq:linkend="using-jms.server.configuration">
- <xsd:documentation>a list of connection factories to create and add to
- JNDI</xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:all>
- <xsd:element name="xa" type="xsd:boolean" default="false" maxOccurs="1" minOccurs="0">
- <xsd:annotation amq:linkend="using-jms.configure.factory.types"
- amq:id="configuration.connection-factory.signature.xa">
- <xsd:documentation>Whether this is an XA connection factory</xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="discovery-group-ref" type="discovery-group-refType" maxOccurs="1" minOccurs="0">
- </xsd:element>
+ <xsd:element name="queue" type="queueType"></xsd:element>
- <xsd:element name="connectors" maxOccurs="1" minOccurs="0">
- <xsd:annotation amq:linkend="clusters">
- <xsd:documentation>A sequence of connectors used by the connection factory
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="connector-ref" maxOccurs="unbounded" minOccurs="1">
- <xsd:annotation>
- <xsd:documentation>A connector reference
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:attribute name="connector-name" type="xsd:string" use="required">
- <xsd:annotation>
- <xsd:documentation>Name of the connector to connect to the live server
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="entries" maxOccurs="1" minOccurs="0">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="entry" type="entryType" maxOccurs="unbounded" minOccurs="1">
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
-
- <xsd:element name="client-failure-check-period" type="xsd:long" default="30000"
- maxOccurs="1" minOccurs="0">
- <xsd:annotation amq:id="configuration.connection-factory.client-failure-check-period"
- amq:linkend="dead.connections" amq:default="(ms)">
- <xsd:documentation>
- the period (in ms) after which the client will consider the connection failed
- after not receiving packets from the server. -1 disables this setting.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="connection-ttl" type="xsd:long" maxOccurs="1" minOccurs="0">
- <xsd:annotation amq:id="configuration.connection-factory.connection-ttl"
- amq:linkend="dead.connections">
- <xsd:documentation>the time to live (in ms) for connections
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="call-timeout" type="xsd:long" default="30000"
- maxOccurs="1" minOccurs="0">
- <xsd:annotation amq:id="configuration.connection-factory.call-timeout">
- <xsd:documentation>
- the timeout (in ms) for remote calls
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="call-failover-timeout" type="xsd:long"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
- <xsd:element name="consumer-window-size" type="xsd:int"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
- <xsd:element name="consumer-max-rate" type="xsd:int"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
- <xsd:element name="confirmation-window-size" type="xsd:int"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
- <xsd:element name="producer-window-size" type="xsd:int"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
- <xsd:element name="producer-max-rate" type="xsd:int"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
- <xsd:element name="cache-large-message-client" type="xsd:boolean"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
- <xsd:element name="min-large-message-size" type="xsd:long"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
- <xsd:element name="compress-large-messages" type="xsd:boolean"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
-
- <xsd:element name="client-id" type="xsd:string" maxOccurs="1" minOccurs="0">
- <xsd:annotation amq:id="configuration.connection-factory.client-id"
- amq:linkend="using-jms.clientid">
- <xsd:documentation>
- the pre-configured client ID for the connection factory
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="dups-ok-batch-size" type="xsd:int"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
- <xsd:element name="transaction-batch-size" type="xsd:int"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
- <xsd:element name="block-on-acknowledge" type="xsd:boolean" default="false"
- maxOccurs="1" minOccurs="0">
- <xsd:annotation amq:linkend="send-guarantees.nontrans.acks"
- amq:id="configuration.connection-factory.block-on-acknowledge">
- <xsd:documentation>
- whether or not messages are acknowledged synchronously
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="block-on-non-durable-send" type="xsd:boolean" default="false"
- maxOccurs="1" minOccurs="0">
- <xsd:annotation amq:id="configuration.connection-factory.block-on-non-durable-send"
- amq:linkend="non-transactional-sends">
- <xsd:documentation>
- whether or not non-durable messages are sent synchronously
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="block-on-durable-send" type="xsd:boolean" default="true"
- maxOccurs="1" minOccurs="0">
- <xsd:annotation amq:id="configuration.connection-factory.block-on-durable-send"
- amq:linkend="non-transactional-sends">
- <xsd:documentation>
- whether or not durable messages are sent synchronously
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="auto-group" type="xsd:boolean" default="false" maxOccurs="1" minOccurs="0">
- <xsd:annotation amq:id="configuration.connection-factory.auto-group"
- amq:linkend="message-grouping.jmsconfigure">
- <xsd:documentation>whether or not message grouping is automatically used
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="pre-acknowledge" type="xsd:boolean"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
- <xsd:element name="retry-interval" type="xsd:long"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
- <xsd:element name="retry-interval-multiplier" type="xsd:float"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
- <xsd:element name="max-retry-interval" type="xsd:long"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
- <xsd:element name="reconnect-attempts" type="xsd:int"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
- <xsd:element name="failover-on-initial-connection" type="xsd:boolean"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
- <xsd:element name="failover-on-server-shutdown" type="xsd:boolean"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
- <xsd:element name="connection-load-balancing-policy-class-name" type="xsd:string"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
- <xsd:element name="use-global-pools" type="xsd:boolean"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
- <xsd:element name="scheduled-thread-pool-max-size" type="xsd:int"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
- <xsd:element name="thread-pool-max-size" type="xsd:int"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
- <xsd:element name="group-id" type="xsd:string"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
- <xsd:element name="ha" type="xsd:boolean"
- maxOccurs="1" minOccurs="0">
- </xsd:element>
- </xsd:all>
- <xsd:attribute name="name" type="xsd:string"></xsd:attribute>
- <xsd:attribute name="signature" type="xsd:string">
- <xsd:annotation amq:id="configuration.connection-factory.signature"
- amq:linkend="using-jms.configure.factory.types"
- amq:default="generic"> <!-- XXX -->
- <xsd:documentation>Type of connection factory</xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- </xsd:complexType>
- </xsd:element>
-
- <xsd:complexType name="entryType">
- <xsd:attribute name="name" type="xsd:string" use="required"></xsd:attribute>
- </xsd:complexType>
-
- <xsd:complexType name="discovery-group-refType">
- <xsd:attribute name="discovery-group-name" type="xsd:string" use="required">
- <xsd:annotation>
- <xsd:documentation>
- Name of discovery group used by this connection factory
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- </xsd:complexType>
-
- <xsd:element name="queue" type="queueType"></xsd:element>
-
- <xsd:element name="topic" type="topicType"></xsd:element>
+ <xsd:element name="topic" type="topicType"></xsd:element>
<xsd:complexType name="queueType">
- <xsd:sequence>
- <xsd:element name="entry" type="entryType" maxOccurs="unbounded" minOccurs="1"></xsd:element>
- <xsd:element name="selector" maxOccurs="1" minOccurs="0">
- <xsd:complexType>
- <xsd:attribute name="string" type="xsd:string" use="required"></xsd:attribute>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="durable" type="xsd:boolean" maxOccurs="1" minOccurs="0"></xsd:element>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required"></xsd:attribute>
- </xsd:complexType>
-
- <xsd:complexType name="topicType">
- <xsd:sequence>
- <xsd:element name="entry" type="entryType" maxOccurs="unbounded" minOccurs="1"></xsd:element>
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required"></xsd:attribute>
- </xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="selector" maxOccurs="1" minOccurs="0">
+ <xsd:complexType>
+ <xsd:attribute name="string" type="xsd:string" use="required"></xsd:attribute>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="durable" type="xsd:boolean" maxOccurs="1" minOccurs="0"></xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required"></xsd:attribute>
+ </xsd:complexType>
+
+ <xsd:complexType name="topicType">
+ <xsd:sequence>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required"></xsd:attribute>
+ </xsd:complexType>
</xsd:schema>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/activemq-ra/pom.xml
----------------------------------------------------------------------
diff --git a/activemq-ra/pom.xml b/activemq-ra/pom.xml
index c027026..c1fca05 100644
--- a/activemq-ra/pom.xml
+++ b/activemq-ra/pom.xml
@@ -46,6 +46,13 @@
<artifactId>activemq-jms-server</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <!-- exclude JCA 1.5 spec here so geronimo dependency will be used -->
+ <groupId>org.jboss.spec.javax.resource</groupId>
+ <artifactId>jboss-connector-api_1.5_spec</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/activemq-rest/src/main/java/org/apache/activemq/rest/integration/EmbeddedRestActiveMQJMS.java
----------------------------------------------------------------------
diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/integration/EmbeddedRestActiveMQJMS.java b/activemq-rest/src/main/java/org/apache/activemq/rest/integration/EmbeddedRestActiveMQJMS.java
index 4014030..ee48d51 100644
--- a/activemq-rest/src/main/java/org/apache/activemq/rest/integration/EmbeddedRestActiveMQJMS.java
+++ b/activemq-rest/src/main/java/org/apache/activemq/rest/integration/EmbeddedRestActiveMQJMS.java
@@ -37,4 +37,8 @@ public class EmbeddedRestActiveMQJMS extends EmbeddedRestActiveMQ
return ((EmbeddedJMS) embeddedActiveMQ).getRegistry();
}
+ public EmbeddedJMS getEmbeddedJMS()
+ {
+ return (EmbeddedJMS) embeddedActiveMQ;
+ }
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/activemq-rest/src/main/java/org/apache/activemq/rest/queue/QueueDestinationsResource.java
----------------------------------------------------------------------
diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/QueueDestinationsResource.java b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/QueueDestinationsResource.java
index 259826e..0358db1 100644
--- a/activemq-rest/src/main/java/org/apache/activemq/rest/queue/QueueDestinationsResource.java
+++ b/activemq-rest/src/main/java/org/apache/activemq/rest/queue/QueueDestinationsResource.java
@@ -101,13 +101,6 @@ public class QueueDestinationsResource
{
}
}
- if (queue.getBindings() != null && queue.getBindings().length > 0 && manager.getRegistry() != null)
- {
- for (String binding : queue.getBindings())
- {
- manager.getRegistry().bind(binding, activeMQQueue);
- }
- }
URI uri = uriInfo.getRequestUriBuilder().path(queueName).build();
return Response.created(uri).build();
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/activemq-rest/src/main/java/org/apache/activemq/rest/topic/TopicDestinationsResource.java
----------------------------------------------------------------------
diff --git a/activemq-rest/src/main/java/org/apache/activemq/rest/topic/TopicDestinationsResource.java b/activemq-rest/src/main/java/org/apache/activemq/rest/topic/TopicDestinationsResource.java
index fa3415b..8ab2a0e 100644
--- a/activemq-rest/src/main/java/org/apache/activemq/rest/topic/TopicDestinationsResource.java
+++ b/activemq-rest/src/main/java/org/apache/activemq/rest/topic/TopicDestinationsResource.java
@@ -95,13 +95,6 @@ public class TopicDestinationsResource
{
}
}
- if (topic.getBindings() != null && topic.getBindings().length > 0 && manager.getRegistry() != null)
- {
- for (String binding : topic.getBindings())
- {
- manager.getRegistry().bind(binding, activeMQTopic);
- }
- }
URI uri = uriInfo.getRequestUriBuilder().path(topicName).build();
return Response.created(uri).build();
}
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/activemq-rest/src/test/java/org/apache/activemq/rest/test/EmbeddedTest.java
----------------------------------------------------------------------
diff --git a/activemq-rest/src/test/java/org/apache/activemq/rest/test/EmbeddedTest.java b/activemq-rest/src/test/java/org/apache/activemq/rest/test/EmbeddedTest.java
index da0d9ea..1ab39d4 100644
--- a/activemq-rest/src/test/java/org/apache/activemq/rest/test/EmbeddedTest.java
+++ b/activemq-rest/src/test/java/org/apache/activemq/rest/test/EmbeddedTest.java
@@ -23,7 +23,10 @@ import javax.jms.MessageProducer;
import javax.jms.ObjectMessage;
import javax.jms.Session;
import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.activemq.api.jms.JMSFactoryType;
import org.apache.activemq.rest.HttpHeaderProperty;
import org.apache.activemq.rest.integration.EmbeddedRestActiveMQJMS;
import org.apache.activemq.spi.core.naming.BindingRegistry;
@@ -49,6 +52,9 @@ public class EmbeddedTest
server = new EmbeddedRestActiveMQJMS();
server.getManager().setConfigResourcePath("activemq-rest.xml");
server.start();
+ List<String> connectors = new ArrayList<>();
+ connectors.add("in-vm");
+ server.getEmbeddedJMS().getJMSServerManager().createConnectionFactory("ConnectionFactory", false, JMSFactoryType.CF, connectors, "ConnectionFactory");
}
@AfterClass
@@ -61,10 +67,10 @@ public class EmbeddedTest
public static void publish(String destination, Serializable object, String contentType) throws Exception
{
BindingRegistry reg = server.getRegistry();
- Destination dest = (Destination) reg.lookup(destination);
ConnectionFactory factory = (ConnectionFactory) reg.lookup("ConnectionFactory");
Connection conn = factory.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ Destination dest = session.createQueue(destination);
try
{
@@ -109,7 +115,7 @@ public class EmbeddedTest
TransformTest.Order order = new TransformTest.Order();
order.setName("1");
order.setAmount("$5.00");
- publish("/queue/exampleQueue", order, null);
+ publish("exampleQueue", order, null);
ClientResponse<?> res = consumeNext.request().header("Accept-Wait", "2").accept("application/xml").post(String.class);
Assert.assertEquals(200, res.getStatus());
@@ -126,7 +132,7 @@ public class EmbeddedTest
TransformTest.Order order = new TransformTest.Order();
order.setName("1");
order.setAmount("$5.00");
- publish("/queue/exampleQueue", order, null);
+ publish("exampleQueue", order, null);
ClientResponse<?> res = consumeNext.request().header("Accept-Wait", "2").accept("application/json").post(String.class);
Assert.assertEquals(200, res.getStatus());
@@ -143,7 +149,7 @@ public class EmbeddedTest
TransformTest.Order order = new TransformTest.Order();
order.setName("2");
order.setAmount("$15.00");
- publish("/queue/exampleQueue", order, "application/xml");
+ publish("exampleQueue", order, "application/xml");
ClientResponse<?> res = consumeNext.request().header("Accept-Wait", "2").post(String.class);
Assert.assertEquals(200, res.getStatus());
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/activemq-rest/src/test/resources/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/activemq-rest/src/test/resources/activemq-jms.xml b/activemq-rest/src/test/resources/activemq-jms.xml
index bce97ab..3758989 100644
--- a/activemq-rest/src/test/resources/activemq-jms.xml
+++ b/activemq-rest/src/test/resources/activemq-jms.xml
@@ -1,19 +1,8 @@
<configuration xmlns="urn:activemq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <!--the connection factory used by the example-->
- <connection-factory name="ConnectionFactory">
- <connectors>
- <connector-ref connector-name="in-vm"/>
- </connectors>
- <entries>
- <entry name="ConnectionFactory"/>
- </entries>
- </connection-factory>
<!--the queue used by the example-->
- <queue name="exampleQueue">
- <entry name="/queue/exampleQueue"/>
- </queue>
+ <queue name="exampleQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/distribution/activemq/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/activemq/pom.xml b/distribution/activemq/pom.xml
index c0e5845..7911837 100644
--- a/distribution/activemq/pom.xml
+++ b/distribution/activemq/pom.xml
@@ -102,11 +102,6 @@
<artifactId>activemq-aerogear-integration</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>jnp-client</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-web</artifactId>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/distribution/activemq/src/main/assembly/dep.xml
----------------------------------------------------------------------
diff --git a/distribution/activemq/src/main/assembly/dep.xml b/distribution/activemq/src/main/assembly/dep.xml
index a4c17ac..088ae95 100644
--- a/distribution/activemq/src/main/assembly/dep.xml
+++ b/distribution/activemq/src/main/assembly/dep.xml
@@ -33,7 +33,6 @@
<include>org.apache.activemq.rest:activemq-rest</include>
<!-- dependencies -->
<include>org.jboss.spec.javax.jms:jboss-jms-api_2.0_spec</include>
- <include>org.jboss.naming:jnpserver</include>
<include>org.jboss.logmanager:jboss-logmanager</include>
<include>org.jboss:jboss-common-core</include>
<include>io.netty:netty-all</include>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/distribution/activemq/src/main/resources/bin/activemq
----------------------------------------------------------------------
diff --git a/distribution/activemq/src/main/resources/bin/activemq b/distribution/activemq/src/main/resources/bin/activemq
index 1e632d5..d8e01f1 100755
--- a/distribution/activemq/src/main/resources/bin/activemq
+++ b/distribution/activemq/src/main/resources/bin/activemq
@@ -81,7 +81,7 @@ for i in `ls $ACTIVEMQ_HOME/lib/*.jar`; do
done
-JAVA_ARGS="-XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Xms512M -Xmx1024M -Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces -Dactivemq.home=$ACTIVEMQ_HOME -Ddata.dir=$ACTIVEMQ_HOME/data -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dlogging.configuration=file:$ACTIVEMQ_HOME/config/logging.properties -Djava.library.path=$ACTIVEMQ_HOME/bin/lib/linux-i686:$ACTIVEMQ_HOME/bin/lib/linux-x86_64"
-#JAVA_ARGS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 -Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces"
+JAVA_ARGS="-XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Xms512M -Xmx1024M -Dactivemq.home=$ACTIVEMQ_HOME -Ddata.dir=$ACTIVEMQ_HOME/data -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dlogging.configuration=file:$ACTIVEMQ_HOME/config/logging.properties -Djava.library.path=$ACTIVEMQ_HOME/bin/lib/linux-i686:$ACTIVEMQ_HOME/bin/lib/linux-x86_64"
+#JAVA_ARGS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"
exec "$JAVACMD" $JAVA_ARGS -classpath $CLASSPATH org.apache.activemq.cli.ActiveMQ $@
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/distribution/activemq/src/main/resources/bin/activemq.cmd
----------------------------------------------------------------------
diff --git a/distribution/activemq/src/main/resources/bin/activemq.cmd b/distribution/activemq/src/main/resources/bin/activemq.cmd
index 32dbb36..3a0a4f9 100755
--- a/distribution/activemq/src/main/resources/bin/activemq.cmd
+++ b/distribution/activemq/src/main/resources/bin/activemq.cmd
@@ -31,7 +31,7 @@ echo.
:RUN_JAVA
-if "%JVM_FLAGS%" == "" set JVM_FLAGS=-XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Xms512M -Xmx1024M -Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces -Dactivemq.home=$ACTIVEMQ_HOME -Ddata.dir=$ACTIVEMQ_HOME/data -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dlogging.configuration="file:%ACTIVEMQ_HOME%\config\logging.properties" -Djava.library.path="%ACTIVEMQ_HOME%/bin/lib/linux-i686:%ACTIVEMQ_HOME%/bin/lib/linux-x86_64"
+if "%JVM_FLAGS%" == "" set JVM_FLAGS=-XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Xms512M -Xmx1024M -Dactivemq.home=$ACTIVEMQ_HOME -Ddata.dir=$ACTIVEMQ_HOME/data -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dlogging.configuration="file:%ACTIVEMQ_HOME%\config\logging.properties" -Djava.library.path="%ACTIVEMQ_HOME%/bin/lib/linux-i686:%ACTIVEMQ_HOME%/bin/lib/linux-x86_64"
if "x%ACTIVEMQ_OPTS%" == "x" goto noACTIVEMQ_OPTS
set JVM_FLAGS=%JVM_FLAGS% %ACTIVEMQ_OPTS%
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/distribution/activemq/src/main/resources/config/clustered/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/distribution/activemq/src/main/resources/config/clustered/activemq-jms.xml b/distribution/activemq/src/main/resources/config/clustered/activemq-jms.xml
index d1b456b..ccdc8bd 100644
--- a/distribution/activemq/src/main/resources/config/clustered/activemq-jms.xml
+++ b/distribution/activemq/src/main/resources/config/clustered/activemq-jms.xml
@@ -2,52 +2,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <connection-factory name="NettyXAConnectionFactory">
- <xa>true</xa>
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="/XAConnectionFactory"/>
- </entries>
- </connection-factory>
+ <queue name="DLQ"/>
- <connection-factory name="NettyConnectionFactory">
- <xa>false</xa>
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="/ConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <connection-factory name="NettyThroughputConnectionFactory">
- <xa>true</xa>
- <connectors>
- <connector-ref connector-name="netty-throughput"/>
- </connectors>
- <entries>
- <entry name="/XAThroughputConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <connection-factory name="NettyThroughputConnectionFactory">
- <xa>false</xa>
- <connectors>
- <connector-ref connector-name="netty-throughput"/>
- </connectors>
- <entries>
- <entry name="/ThroughputConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <queue name="DLQ">
- <entry name="/queue/DLQ"/>
- </queue>
-
- <queue name="ExpiryQueue">
- <entry name="/queue/ExpiryQueue"/>
- </queue>
+ <queue name="ExpiryQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/distribution/activemq/src/main/resources/config/clustered/jndi.properties
----------------------------------------------------------------------
diff --git a/distribution/activemq/src/main/resources/config/clustered/jndi.properties b/distribution/activemq/src/main/resources/config/clustered/jndi.properties
deleted file mode 100644
index e2a9832..0000000
--- a/distribution/activemq/src/main/resources/config/clustered/jndi.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/distribution/activemq/src/main/resources/config/non-clustered/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/distribution/activemq/src/main/resources/config/non-clustered/activemq-jms.xml b/distribution/activemq/src/main/resources/config/non-clustered/activemq-jms.xml
index d1b456b..ccdc8bd 100644
--- a/distribution/activemq/src/main/resources/config/non-clustered/activemq-jms.xml
+++ b/distribution/activemq/src/main/resources/config/non-clustered/activemq-jms.xml
@@ -2,52 +2,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <connection-factory name="NettyXAConnectionFactory">
- <xa>true</xa>
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="/XAConnectionFactory"/>
- </entries>
- </connection-factory>
+ <queue name="DLQ"/>
- <connection-factory name="NettyConnectionFactory">
- <xa>false</xa>
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="/ConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <connection-factory name="NettyThroughputConnectionFactory">
- <xa>true</xa>
- <connectors>
- <connector-ref connector-name="netty-throughput"/>
- </connectors>
- <entries>
- <entry name="/XAThroughputConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <connection-factory name="NettyThroughputConnectionFactory">
- <xa>false</xa>
- <connectors>
- <connector-ref connector-name="netty-throughput"/>
- </connectors>
- <entries>
- <entry name="/ThroughputConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <queue name="DLQ">
- <entry name="/queue/DLQ"/>
- </queue>
-
- <queue name="ExpiryQueue">
- <entry name="/queue/ExpiryQueue"/>
- </queue>
+ <queue name="ExpiryQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/distribution/activemq/src/main/resources/config/non-clustered/jndi.properties
----------------------------------------------------------------------
diff --git a/distribution/activemq/src/main/resources/config/non-clustered/jndi.properties b/distribution/activemq/src/main/resources/config/non-clustered/jndi.properties
deleted file mode 100644
index e2a9832..0000000
--- a/distribution/activemq/src/main/resources/config/non-clustered/jndi.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/distribution/activemq/src/main/resources/config/replicated/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/distribution/activemq/src/main/resources/config/replicated/activemq-configuration.xml b/distribution/activemq/src/main/resources/config/replicated/activemq-configuration.xml
index 5f41085..a7a756e 100644
--- a/distribution/activemq/src/main/resources/config/replicated/activemq-configuration.xml
+++ b/distribution/activemq/src/main/resources/config/replicated/activemq-configuration.xml
@@ -3,7 +3,7 @@
xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
<!--
if you want to run this as a backup on different ports you would need to set the following variable
- export CLUSTER_PROPS="-Djnp.port=1199 -Djnp.rmiPort=1198 -Djnp.host=localhost -Dactivemq.remoting.netty.host=localhost -Dactivemq.remoting.netty.port=5545 -Dactivemq.remoting.netty.batch.port=5555 -Dactivemq.backup=true"
+ export CLUSTER_PROPS="-Dactivemq.remoting.netty.host=localhost -Dactivemq.remoting.netty.port=5545 -Dactivemq.remoting.netty.batch.port=5555 -Dactivemq.backup=true"
-->
<paging-directory>${data.dir:../data}/paging</paging-directory>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/distribution/activemq/src/main/resources/config/replicated/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/distribution/activemq/src/main/resources/config/replicated/activemq-jms.xml b/distribution/activemq/src/main/resources/config/replicated/activemq-jms.xml
index d1b456b..ccdc8bd 100644
--- a/distribution/activemq/src/main/resources/config/replicated/activemq-jms.xml
+++ b/distribution/activemq/src/main/resources/config/replicated/activemq-jms.xml
@@ -2,52 +2,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <connection-factory name="NettyXAConnectionFactory">
- <xa>true</xa>
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="/XAConnectionFactory"/>
- </entries>
- </connection-factory>
+ <queue name="DLQ"/>
- <connection-factory name="NettyConnectionFactory">
- <xa>false</xa>
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="/ConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <connection-factory name="NettyThroughputConnectionFactory">
- <xa>true</xa>
- <connectors>
- <connector-ref connector-name="netty-throughput"/>
- </connectors>
- <entries>
- <entry name="/XAThroughputConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <connection-factory name="NettyThroughputConnectionFactory">
- <xa>false</xa>
- <connectors>
- <connector-ref connector-name="netty-throughput"/>
- </connectors>
- <entries>
- <entry name="/ThroughputConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <queue name="DLQ">
- <entry name="/queue/DLQ"/>
- </queue>
-
- <queue name="ExpiryQueue">
- <entry name="/queue/ExpiryQueue"/>
- </queue>
+ <queue name="ExpiryQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/distribution/activemq/src/main/resources/config/replicated/jndi.properties
----------------------------------------------------------------------
diff --git a/distribution/activemq/src/main/resources/config/replicated/jndi.properties b/distribution/activemq/src/main/resources/config/replicated/jndi.properties
deleted file mode 100644
index e2a9832..0000000
--- a/distribution/activemq/src/main/resources/config/replicated/jndi.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/distribution/activemq/src/main/resources/config/shared-store/activemq-configuration.xml
----------------------------------------------------------------------
diff --git a/distribution/activemq/src/main/resources/config/shared-store/activemq-configuration.xml b/distribution/activemq/src/main/resources/config/shared-store/activemq-configuration.xml
index e738d2f..e5820e1 100644
--- a/distribution/activemq/src/main/resources/config/shared-store/activemq-configuration.xml
+++ b/distribution/activemq/src/main/resources/config/shared-store/activemq-configuration.xml
@@ -3,7 +3,7 @@
xsi:schemaLocation="urn:activemq /schema/activemq-configuration.xsd">
<!--
if you want to run this as a backup on different ports you would need to set the following variable
- export CLUSTER_PROPS="-Djnp.port=1199 -Djnp.rmiPort=1198 -Djnp.host=localhost -Dactivemq.remoting.netty.host=localhost -Dactivemq.remoting.netty.port=5545 -Dactivemq.remoting.netty.batch.port=5555 -Dactivemq.backup=true"
+ export CLUSTER_PROPS="-Dactivemq.remoting.netty.host=localhost -Dactivemq.remoting.netty.port=5545 -Dactivemq.remoting.netty.batch.port=5555 -Dactivemq.backup=true"
-->
<paging-directory>${data.dir:../data}/paging</paging-directory>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/distribution/activemq/src/main/resources/config/shared-store/activemq-jms.xml
----------------------------------------------------------------------
diff --git a/distribution/activemq/src/main/resources/config/shared-store/activemq-jms.xml b/distribution/activemq/src/main/resources/config/shared-store/activemq-jms.xml
index d1b456b..ccdc8bd 100644
--- a/distribution/activemq/src/main/resources/config/shared-store/activemq-jms.xml
+++ b/distribution/activemq/src/main/resources/config/shared-store/activemq-jms.xml
@@ -2,52 +2,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:activemq /schema/activemq-jms.xsd">
- <connection-factory name="NettyXAConnectionFactory">
- <xa>true</xa>
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="/XAConnectionFactory"/>
- </entries>
- </connection-factory>
+ <queue name="DLQ"/>
- <connection-factory name="NettyConnectionFactory">
- <xa>false</xa>
- <connectors>
- <connector-ref connector-name="netty"/>
- </connectors>
- <entries>
- <entry name="/ConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <connection-factory name="NettyThroughputConnectionFactory">
- <xa>true</xa>
- <connectors>
- <connector-ref connector-name="netty-throughput"/>
- </connectors>
- <entries>
- <entry name="/XAThroughputConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <connection-factory name="NettyThroughputConnectionFactory">
- <xa>false</xa>
- <connectors>
- <connector-ref connector-name="netty-throughput"/>
- </connectors>
- <entries>
- <entry name="/ThroughputConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <queue name="DLQ">
- <entry name="/queue/DLQ"/>
- </queue>
-
- <queue name="ExpiryQueue">
- <entry name="/queue/ExpiryQueue"/>
- </queue>
+ <queue name="ExpiryQueue"/>
</configuration>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/distribution/activemq/src/main/resources/config/shared-store/jndi.properties
----------------------------------------------------------------------
diff --git a/distribution/activemq/src/main/resources/config/shared-store/jndi.properties b/distribution/activemq/src/main/resources/config/shared-store/jndi.properties
deleted file mode 100644
index e2a9832..0000000
--- a/distribution/activemq/src/main/resources/config/shared-store/jndi.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/distribution/jnp-client/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/jnp-client/pom.xml b/distribution/jnp-client/pom.xml
deleted file mode 100644
index 122880c..0000000
--- a/distribution/jnp-client/pom.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
-
- <parent>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-distribution</artifactId>
- <version>6.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>jnp-client</artifactId>
- <packaging>jar</packaging>
- <name>JBoss jnp client jar</name>
-
- <dependencies>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- <configuration>
- <artifactSet>
- <includes>
- <include>org.jboss.naming:jnpserver</include>
- <artifact>org.jboss.logging:jboss-logging</artifact>
- </includes>
- </artifactSet>
- <filters>
- <filter>
- <artifact>org.jboss.naming:jnpserver</artifact>
- <includes>
- <include>org/jnp/interfaces/**/*.class</include>
- <include>org/jboss/naming/**/*.class</include>
- <include>org/jnp/server/NamingServer_Stub.class</include>
- </includes>
- </filter>
- <filter>
- <artifact>org.jboss.logging:jboss-logging</artifact>
- <includes>
- <include>org/jboss/logging/**/*.class</include>
- </includes>
- </filter>
- </filters>
- </configuration>
- </execution>
-
- </executions>
- </plugin>
- </plugins>
- </build>
-
-</project>
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/e6a3d3a0/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/pom.xml b/distribution/pom.xml
index 143b72f..6e0c42b 100644
--- a/distribution/pom.xml
+++ b/distribution/pom.xml
@@ -23,17 +23,12 @@
<artifactId>jboss-jms-api_2.0_spec</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- </dependency>
- <dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
</dependency>
</dependencies>
<modules>
- <module>jnp-client</module>
<module>activemq</module>
</modules>