-
1. Re: Transaction
frito Jul 2, 2003 5:19 AM (in response to r_kumar)You probably want to work with a xa transaction to do your db related operations and the jms stuff in one xa transaction.
But your are still working with a local transaction with doesn't support preparing the call for comit.
Probably you missed to tell the container to manage the jmx connection factory and the topic. This is done by using these tags in jboss.xml of your session bean:
[pre]
<resource-manager>
<res-name>managedQueueConnectionFactory</res-name>
<res-jndi-name>java:JmsXA</res-jndi-name>
</resource-manager>
<resource-manager>
<res-name>managedTopic</res-name>
<res-jndi-name>topic/TestTransactionTopic</res-jndi-name>
</resource-manager>
[/pre]
And in your ejb-jar.xml :
[pre]
<resource-ref>
<res-ref-name>managedQueueConnectionFactory</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<res-ref-name>managedTopic</res-ref-name>
<res-type>javax.jms.Topic</res-type>
<res-auth>Container</res-auth>
</resource-ref>
[/pre]
You can now see these resources in the java:comp/env jndi scope of your session bean. Use these for your lookup in the session bean. .
Be sure you configured everything for xa transaction (datasource, jms, ...).
Greetings,
Frito -
2. Re: Transaction
weiqingh Jul 3, 2003 11:25 AM (in response to r_kumar)your db operation is against a local datasource, not an xa datasource? check your data source definition.