I'm a newbie to WebSphere/WSAD transactions. I'm trying to get a simple transaction to work in which a method in a session ejb creates an instance of ejb1 and then an instance of ejb2. In the catch statment, I do a "mySessionCtx.setRollbackOnly()." ejb1 is a bmp bean with cmt set to "required." ejb2 is a cmp bean with similar cmt setting. In the server configuration (WSAD), I have defined the following provider, with brings in the XADataSource: COM.ibm.db2.jdbc.DB2XADataSource.

I am using db2v8.1 and WSAD 5.0, running on Windows 2000 Professional on an IBM 220 server pc.

If both creates work, all is fine. If the second create fails (I'm forcing this with an invalide key in the ccreate statement), the system does, in fact, do the rollback on ejb1, as it should, but it throws several exceptions:

1) XAException occurred. Error code is: XAER_PROTO.

2) An exception occurred while invoking rollback on an XA Resource Adapter from dataSource jdbc/ooc, within transaction ID {XID: formatId(57415344), gtrid_length(26), bqual_length(25), data(00000001 041420A3 0D66AB6D F15A0F12 AA445A5A BBFEC1E4 CA3C0120 A30D66AB 6DF15A0F 12AA445A 5ABBFEC1 E4CA3CE9 827C51)}: javax.transaction.xa.XAException.

3) 7d5cc2f0 JTAXAResource u Encountered an XA resource error during an XA rollback operation: error code: -6.

The exception comes in the ejb lifecycle on the return from the ejb1 ejbStore method.

Can anyone tell me what is happening here and how to fix the problem?