aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Accessing Entity from MDB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Accessing Entity from MDB " Watch "Accessing Entity from MDB " New topic
Author

Accessing Entity from MDB

Suneesh Raman
Ranch Hand

Joined: Jun 13, 2002
Posts: 42
Hi
My MDB and Entity bean is working fine . But When I tried to access Entity through MDB it is showing following exception . My question is that is it not possible to act one EJB as a client to other ?

Thanks,
Suneesh

<Apr 14, 2005 12:07:42 PM GMT+05:30> <Error> <EJB> <BEA-010026> <Exception occurred during commit of transaction Xi
d=BEA1-6968B55D28DB7F28EDB9(28606304),Status=Rolled back. [Reason=javax.transaction.xa.XAException: JDBC driver doe
s not support XA, hence cannot be a participant in two-phase commit. To force this participation, set the EnableTwo
PhaseCommit property on the corresponding JDBCTxDataSource property, to true. Pool = MSG_DB, TxDataSource = DataSou
rce],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=0,seconds left=29,XAServerResourceInfo[JMS_FileS
tore]=(ServerResourceInfo[JMS_FileStore]=(state=rolledback,assigned=myserver),xar=JMS_FileStore),XAServerResourceIn
fo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=rol
ledback,assigned=myserver),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@11685d5),SCInfo[mydomain+myserver]=(state=ro
lledback),properties=({weblogic.jdbc=t3://10.116.30.24:7001}),local properties=({modifiedListeners=[]}),OwnerTransa
ctionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=myserver+10.116.30.24:7001+mydomain+t3+, XAResour
ces={},NonXAResources={})],CoordinatorURL=myserver+10.116.30.24:7001+mydomain+t3+): javax.transaction.xa.XAExceptio
n: JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation,
set the EnableTwoPhaseCommit property on the corresponding JDBCTxDataSource property, to true. Pool = MSG_DB, TxDa
taSource = DataSource
at weblogic.jdbc.wrapper.JTSXAResourceImpl.prepare(JTSXAResourceImpl.java:87)
at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:1161)
at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:395)
at weblogic.transaction.internal.ServerSCInfo$1.execute(ServerSCInfo.java:253)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
--------------- nested within: ------------------
weblogic.transaction.RollbackException: Could not prepare resource 'weblogic.jdbc.wrapper.JTSXAResourceImpl
JDBC driver does not support XA, hence cannot be a participant in two-phase commit. To force this participation, se
t the EnableTwoPhaseCommit property on the corresponding JDBCTxDataSource property, to true. Pool = MSG_DB, TxDataS
ource = DataSource - with nested exception:
[javax.transaction.xa.XAException: JDBC driver does not support XA, hence cannot be a participant in two-phase comm
it. To force this participation, set the EnableTwoPhaseCommit property on the corresponding JDBCTxDataSource proper
ty, to true. Pool = MSG_DB, TxDataSource = DataSource]
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1644)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:300)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:412)
at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

It is possible for a MDB to be client of another entity bean.
I am guessing that the reasong for the error is because your JDBC driver does not support 2 phase commit protocol. Since an entity bean is accessed by MDB 2 , muliple resources are involved and hence 2 phase commit comes into picture.


Groovy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Accessing Entity from MDB