0 Replies Latest reply on Jul 25, 2005 11:20 AM by Mike B

    JmsXA and javax.jms.Connection.setClientId

    Mike B Newbie

      I have a problem working with JmsXA connection factory. The problem is - I can't call Connection.setClientID() from MDB because this is restricted by J2EE spec (J2EE1.4 section 6.6). Calling this method with default connection factory is ok in JBoss, but it throws exception when java:/JmsXA is used.

      I need to dynamicaly create/update durable subscriptions with varying selectors inside a bean. If I comment setting client ID by setClientID() then it appears to be autogenerated. As a consequence I can't connect in other bean to durable subscription peviously created in MDB because of different client ID. How could I fix client ID for this case? Could it be specified in some xml config, e.g. for connection factory?

      PS. There is also a section in FAQJBossMQ that advises to use setClientId (http://wiki.jboss.org/wiki/Wiki.jsp?page=WhatIsTheCorrectWayToMakeADurableSubscription).