Since MDB uses XAResource, I've to make my EntityBean also to use XAConnection to avoid famous warning:
'Prepare called on a local tx. Use of local transactions on a jta transaction with more than one branch may result in inconsistent data in some cases of failure.'
Configuring DataSource to XA getting me into some other problem:
-----------------------
17:45:37,253 INFO [JBossManagedConnectionPool] Started jboss.jca:service=ManagedConnec
tionPool,name=RepurposeDS
17:45:37,263 ERROR [OracleXAExceptionFormatter] Starting failed
java.lang.NoSuchMethodException
at java.lang.Class.getMethod0(Native Method)
at java.lang.Class.getMethod(Class.java:888)
at org.jboss.resource.adapter.jdbc.xa.oracle.OracleXAExceptionFormatter.startService(OracleXAExceptionFormatter.java:75)
---------------------------------------------------
How to make MDB to use same resources as EntityBean?