2 Replies Latest reply on Jun 22, 2009 5:16 PM by François FOUQUET

    SMX4 JMS Durable Subscriber and OSGi LifeCycle

    François FOUQUET Newbie

      Hi ,

       

      I have troubles using JMS new endpoints and durable subscribion in SMX4.

      On the first deploy of the OSGi bundle containing the JBI JMS Endpoint the result is ok, the durable subscrition is created and work correctly.

       

      But when I want to made an update (osgi/update #), there is error : DurableSubscriptionId already taken .

      So I seems like the previous consumer have not been close .

       

      Thanks for your help

        • 1. Re: SMX4 JMS Durable Subscriber and OSGi LifeCycle
          Dave Stanley Novice

          Hi

          Can you paste your connection factory configuration. Its just a guess but I'm wondering if perhaps you are using a pooled connection factory and when you do the refresh the destroy-method is not being called on the connection.

           

          <bean id="pooledFactory"
          class="org.apache.activemq.pool.PooledConnectionFactory"
          destroy-method="stop">
           ....
           </bean>
           

           

          (It could also be a bug of course..)

           

          Regards

          /Dave

          • 2. Re: SMX4 JMS Durable Subscriber and OSGi LifeCycle
            François FOUQUET Newbie

            Hi ,

             

            I think your idea is perhaps the solution , actually i'm using the connection factory by default because the transaction manager is activated.

             

            So I'm calling the Connection factory behind OSGI refrence like that :

             

            <osgi:reference id=connectionFactory interface=javax.jms.ConnectionFactory />

             

            Have you a better solution ? Does I need to declare a method to propertly close the connection on refresh ?

             

            Regards