You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by wallace <wa...@yahoo.com> on 2007/04/25 00:46:36 UTC
Setting ClientId in ConnectionFactory
I am integration jboss4.0.5 with activemq4.0.
In the ra.xml, I set a value for the Clientid of ActiveMQResourceAdapter.
Inside the jboss contain, I run the code like
InitialContext = new InitialContext();
TopicConnectionFactory connectionFactory =
(javax.jms.TopicConnectionFactory) ctx.lookup(JNDI_EVENT_TOPIC_FACTORY);
_connection = connectionFactory.createConnection();
I got the following exception:
InitialContext ctx = null;
ctx = new InitialContext();
Caused by: javax.jms.IllegalStateException: Setting clientID on a used
Connection is not allowed
at
org.apache.activemq.ActiveMQConnection.setClientID(ActiveMQConnection.java:354)
at
org.apache.activemq.ra.ActiveMQResourceAdapter.makeConnection(ActiveMQResourceAdapter.java:111)
at
org.apache.activemq.ra.ActiveMQResourceAdapter.makeConnection(ActiveMQResourceAdapter.java:101)
at
org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:106)
... 20 more
It is the first connection I was trying to make, though it complaint about
a used connection. Is there anything else I need to do to turn on the
property value?
Thanks,
-Wallace
--
View this message in context: http://www.nabble.com/Setting-ClientId-in-ConnectionFactory-tf3641978s2354.html#a10171145
Sent from the ActiveMQ - User mailing list archive at Nabble.com.