User: mulder
Date: 00/10/20 22:20:23
Modified: src/main/org/jboss/minerva/xa XAConnectionImpl.java
XAResourceImpl.java
Log:
Make jBoss work with Oracle XADataSource driver.
Not yet a very elegant solution - we need to be able to use a different
Xid implementation class per pool for this to really work right.
The requirements of the Oracle driver were:
- Xid must be instanceof OracleXid
- Global and Branch IDs must be exactly 64 bytes
- RM that end is called on must be *exactly* the same as start
was called on (XAConnection.getXAResource returns a different
instance each time *despite* the documented 1-to-1 relation)
- Can't execute DDL (create/drop table, etc) within a transaction
Haven't tested this well with multiple data sources - that's next.
Revision Changes Path
1.8 +3 -3 jboss/src/main/org/jboss/minerva/xa/XAConnectionImpl.java
Index: XAConnectionImpl.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/minerva/xa/XAConnectionImpl.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- XAConnectionImpl.java 2000/10/02 15:35:59 1.7
+++ XAConnectionImpl.java 2000/10/21 05:20:22 1.8
@@ -43,7 +43,7 @@
* also register a TransactionListener that will be notified when the
* Transaction is finished, and release the XAConnection at that time.</P>
* @see org.jboss.minerva.xa.TransactionListener
- * @version $Revision: 1.7 $
+ * @version $Revision: 1.8 $
* @author Aaron Mulder ([EMAIL PROTECTED])
*/
public class XAConnectionImpl implements XAConnection, PooledObject {
@@ -114,8 +114,8 @@
Vector local = (Vector)listeners.clone();
for(int i=local.size()-1; i>=0; i--)
((ConnectionEventListener)local.elementAt(i)).connectionClosed(new
ConnectionEvent(this));
- if(!trans)
- transactionFinished();
+// if(!trans)
+// transactionFinished();
}
/**
1.7 +5 -1 jboss/src/main/org/jboss/minerva/xa/XAResourceImpl.java
Index: XAResourceImpl.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/minerva/xa/XAResourceImpl.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- XAResourceImpl.java 2000/09/29 13:50:17 1.6
+++ XAResourceImpl.java 2000/10/21 05:20:23 1.7
@@ -22,7 +22,7 @@
* <P><FONT COLOR="RED"><B>Warning:</B></FONT></P> This implementation assumes
* that forget will be called after a failed commit or rollback. Otherwise,
* the database connection will never be closed.</P>
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
* @author Aaron Mulder ([EMAIL PROTECTED])
*/
public class XAResourceImpl implements XAResource {
@@ -51,6 +51,10 @@
if(this.xaCon != null)
throw new IllegalStateException();
this.xaCon = xaCon;
+ }
+
+ public XAConnectionImpl getXAConnection() {
+ return xaCon;
}
/**