Thank you so much James.
Which version of active mq support durable subscriptions, 
As of now, I am using the following jars , in regard to active mq

activemq-core-4.0.1.jar
backport-util-concurrent-2.1.jar
geronimo-j2ee-management_1.0_spec-1.0.jar
geronimo-jms_1.1_spec-1.0.jar
incubator-activemq-4.0.2.jar


Please let me know, if I am understanding it correctly.
1) First approach
  Configuring durable subscriptions  on the ActiveMQConnectionFactory
object.
In the conf/context.xml  , I'll add the clientID as follows 

<Resource name="jms/ConnectionFactory" 
                        auth="Container" 
 
type="org.apache.activemq.ActiveMQConnectionFactory" 
                        description="JMS Connection Factory"
                factory="org.apache.activemq.jndi.JNDIReferenceFactory" 
                brokerURL="tcp://localhost:61616" 
                brokerName="LocalActiveMQBroker"
                clientID = "CMD"        
                />

2) Second Approach
      The code that creates the Connection can specify the ClientID
before calling start();
          
 Ictx = new javax.naming.InitialContext();
envContext = (Context)Ictx.lookup("java:comp/env");
//lookup the connection factory
javax.jms.TopicConnectionFactory factory =
(javax.jms.TopicConnectionFactory)envContext.lookup("jms/ConnectionFacto
ry");
HerbieConnection = factory.createTopicConnection();
HerbieConnection.setClientID("CMD");
HerbieConnection.start();

Thanks,
Suchitha.

-----Original Message-----
From: James Strachan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 06, 2007 1:40 AM
To: users@activemq.apache.org
Subject: Re: durable subscriptions

On 2/6/07, Suchitha Koneru (sukoneru) <[EMAIL PROTECTED]> wrote:
> Thanks for the information. As per the JMS documentation , Sessions 
> with durable subscriptions, should specify a Client Identifier I am 
> using Java 1.5 and Tomcat 5.5.20 .
> Where should I specify the client identifier ?

The code that creates the Connection can specify it before calling
start(). Or you can configure it on the ActiveMQConnectionFactory
object.

>  Is there any format for specifying it.

No - its any unique string you like.
-- 

James
-------
http://radio.weblogs.com/0112098/

Reply via email to