Wednesday, September 2, 2009

Problem while Emulating the XADataSource

Hi All,

In domain.log, If you can see the following error ;

Message handle error.
An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessage"; the exception is: Branch [oracle.oc4j.sql.xa.EmulatedXAResource@454837, Xid( Global Id d4.14.26.b6.ff.ff.ff.ff.d8.b4.9d.4d.22.01.00.00.80.a5.1f.00.00.00.00.00, Format Id 1330790740, Branch Id 33.d3.88.8e.00.00.00.00.00.00.00.00.00.00.00.01), oracle.oc4j.sql.xa.EmulatedXAResource@454837, state={PREPARED}, exception error code=] in transaction Global Transaction Xid( Global Id d4.14.26.b6.ff.ff.ff.ff.d8.b4.9d.4d.22.01.00.00.80.a5.1f.00.00.00.00.00, Format Id 1330790740), type=orabpel, state=COMMITTING, time in completion or recovering=1)
{
[oracle.oc4j.sql.xa.EmulatedXAResource@454837, Xid( Global Id d4.14.26.b6.ff.ff.ff.ff.d8.b4.9d.4d.22.01.00.00.80.a5.1f.00.00.00.00.00, Format Id 1330790740, Branch Id 33.d3.88.8e.00.00.00.00.00.00.00.00.00.00.00.01), oracle.oc4j.sql.xa.EmulatedXAResource@454837, state={PREPARED}, exception error code=],
[oracle.oc4j.sql.xa.EmulatedXAResource@8833d8, Xid( Global Id d4.14.26.b6.ff.ff.ff.ff.d8.b4.9d.4d.22.01.00.00.80.a5.1f.00.00.00.00.00, Format Id 1330790740, Branch Id 33.d3.88.8e.00.00.00.00.00.00.00.00.00.00.00.00), oracle.oc4j.sql.xa.EmulatedXAResource@8833d8, state={PREPARED}, exception error code=]
} returned RB* during commit.

This problem arises because OC4j is trying to emulate the XADataSource.
When Oc4j tries to emulate the data source, it can lead to inconsistent transaction.


For more information refer to EMULATING XA section in following doc
http://download.oracle.com/docs/cd/B25221_04/web.1013/b14427/datasrc.htm#CHDHGDII

To solve the error,

1.We need to change the connection factory class attribute of connectionPools from 'oracle.jdbc.pool.OracleDataSource' to 'oracle.jdbc.xa.client.OracleXADataSource'.

2. We need to increase the maxConnection value of the BPELServerDataSource.


3. Increase the transaction time out value. We can also decrease the audit level.

No comments: