From: C. <Rue...@co...> - 2003-05-16 17:22:11
|
Hi, i have a problem with JMS in XA Transactions. A stateless session bean updates an entity bean and publishes a message to a JMS topic. For test purposes the transaction is then rolled back. My expectation was, that the message will not be sent, but it arrives at the Topic. The same code works as exspected with Weblogic 7, so i suspect some configuration problem. Im am using JBoss 3.2 with an Oracle 9.2. jbossmq-service.xml is out of the box except for an adapted PersistenceManager, which uses the configured oracle xa datasource. <mbean code=3D"org.jboss.mq.pm.jdbc2.PersistenceManager" name=3D"jbossmq:service=3DPersistenceManager"> <depends optional-attribute-name=3D"MessageCache">jboss.mq:service=3DMessageCache<= /depends> <depends optional-attribute-name=3D"ConnectionManager">jboss.jca:service=3DXATxCM,= name=3DBFlowDS</depends> <attribute name=3D"SqlProperties"> ... </attribute> </mbean> The session bean has the following resource refs: ( ejb-jar.xml ) <resource-ref> <res-ref-name>jms/xtrendTimerTopic</res-ref-name> <res-type>javax.jms.Topic</res-type> <res-auth>Container</res-auth> </resource-ref> <resource-ref> <res-ref-name>jms/ConnectionFactory</res-ref-name> <res-type>javax.jms.TopicConnectionFactory</res-type> <res-auth>Container</res-auth> </resource-ref> (jboss.xml) <resource-ref> <res-ref-name>jms/xtrendTimerTopic</res-ref-name> <jndi-name>topic/xtrendTimerTopic</jndi-name> </resource-ref> <resource-ref> <res-ref-name>jms/ConnectionFactory</res-ref-name> <jndi-name>java:/XAConnectionFactory</jndi-name> </resource-ref> All methods of the bean have the transaction attribute Required. The TopicSession is created with: connection.createTopicSession( false , TopicSession.AUTO_ACKNOWLEDGE ) I debugged into the code and at rollback the transaction object holds only one resource the database connection. The docs are no great help in this case, since all the JMS examples do not use transactions. Any hint to get the JMS calls into the transaction are appreciated. Thanks, R=FCdiger -- COI GmbH, Erlanger Stra=DFe 62, D-91074 Herzogenaurach Phone +49 (0) 9132 82 4279, Fax +49 (0) 9132 82 4959, http://www.coi.de, mailto:Rue...@co... COI - Solutions for Documents |