6

I need to do XA transaction in JavaSE with JDBC and JMS Queues.

I have weblogic server to lookup for resources.

Could you help me with some sample code?

рüффп
  • 5,172
  • 34
  • 67
  • 113
Stalin Gino
  • 592
  • 9
  • 28

1 Answers1

2

I can't provide code, but you must keep these things in mind when doing two-phase commit with JDBC and JMS resources in WebLogic...

JMS General Settings

  • Configure the JMSconnection factory to use: weblogic.jms.XAConnectionFactory

More info: http://docs.oracle.com/cd/E13222_01/wls/docs103/ConsoleHelp/pagehelp/JMSjmsconnectionjmsconnectionfactoryconfigtransactionparamstitle.html

JDBC General Settings

  • Configure JDBC connection pool to use XA-compliant JDBC driver.

From the code perspective, either control the transaction from MDB or Spring bean with transaction annotations; the J2EE containers will handle the global commit/rollback.

Andrew Barber
  • 39,603
  • 20
  • 94
  • 123
raffian
  • 31,267
  • 26
  • 103
  • 174