activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wallace <wallace3...@yahoo.com>
Subject Setting ClientId in ConnectionFactory
Date Tue, 24 Apr 2007 22:46:36 GMT

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.


Mime
View raw message