Title: RE: [JBoss-user] XATxConnectionManager with Oracle?

Thanks for a helpful hint, David. As you correctly guessed my test ssb was leaking sql connections. I'll post my patch and config files here shortly.

> -----Original Message-----
> From: David Jencks [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 14, 2002 2:01 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] XATxConnectionManager with Oracle?
>
>
> Thanks for your work on this. Please post the results when you are
> satisfied.  IMO the entire xa wrapper needs replacing which I
> unfortunately
> won't have time for soon.  I'm not sure if associateConnection can be
> implemented easily.  You can avoid it being called if you always close
> connection handles before calling other ejb methods (through
> home or remote
> interfaces) (and do not hold connections over method
> boundaries).  So, try
> this:
>
> Connection c = myds.getConnection();
> //do something
> c.close()
> myotherRemoteInterface.doSomethingElse();
> c = myds.getConnection();
> //do the rest of your work
> c.close();
>
> david jencks
>
> On 2002.06.14 13:35:16 -0400 Igor Fedorenko wrote:
> > I spent last two days trying to make this work and it looks
> like there
> > are
> > number of issues with both oracle xa datasource and jboss
> itself. I am
> > getting close to have this configuration work (it's oracle
> 8.1.7.3 in my
> > case but this should not make big difference). Problems that I've
> > seen/fixed
> > so far
> >
> > 1. Oracle xa driver returns difference XAResource for each call to
> > XAConnection.getXAResource (see specs jdbc 2.0, section 7.2.2 why it
> > should
> > not). This problem causes "xaRes not enlisted". Fixed
> XAManagedConnection
> > to
> > cache XAResource, this fix should not break anything else.
> >
> > 2. Although oracle xa driver accepts non-oracle Xid object,
> it seems to
> > require that both getGlobalTransactionId and
> getBranchQualifier always
> > return byte[64], otherwise it throws "invalid transaction id" during
> > XAResource.end. Fixed XidImpl to return such arrays, not
> sure if it will
> > work with all resource managers.
> >
> > 3. Currently I am trying to understand how
> > XAManagedConnection#associateConnection(Object). Currently it
> > unconditionally throws "method not implemented" exception. I would
> > appreciate if anyone can comment on this...
> >
> > > -----Original Message-----
> > > From: Geer, Benjamin [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, June 14, 2002 1:02 PM
> > > To: '[EMAIL PROTECTED]'
> > > Cc: Lindsay, Steve; Wink, Stephen
> > > Subject: [JBoss-user] XATxConnectionManager with Oracle?
> > >
> > >
> > > I'm trying to get XA transactions to work in JBoss 3.0.0 with
> > > Oracle 9i.
> > >
> > > I've tried the oracle-service.xml provided with JBoss in
> > > docs/examples/jca (which uses LocalTxConnectionManager),
> and it works
> > > fine.  I modified it to make an oracle-xa-service.xml
> > > (attached), using
> > > XATxConnectionManager, and I'm testing it with a little
> MBean service
> > > (attached).  I can get a DataSource, get a Connection from
> > > it, and do a
> > > SELECT, but when my service calls Connection.close(), I get the
> > > following exception:
> > >
> > > java.lang.IllegalArgumentException: xaRes not enlisted
> > >         at
> org.jboss.tm.TxCapsule.delistResource(TxCapsule.java:546)
> > >
> > > (Full stack trace attached.)
> > >
> > > Can anyone tell me what I'm doing wrong?
> > >
> > > Ben
> > >
> > >
> >
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
> > <HTML>
> > <HEAD>
> > <META HTTP-EQUIV="Content-Type" CONTENT="text/html;
> charset=iso-8859-1">
> > <META NAME="Generator" CONTENT="MS Exchange Server version
> 5.5.2654.45">
> > <TITLE>RE: [JBoss-user] XATxConnectionManager with Oracle?</TITLE>
> > </HEAD>
> > <BODY>
> >
> > <P><FONT SIZE=2>I spent last two days trying to make this
> work and it
> > looks like there are number of issues with both oracle xa
> datasource and
> > jboss itself. I am getting close to have this configuration
> work (it's
> > oracle 8.1.7.3 in my case but this should not make big difference).
> > Problems that I've seen/fixed so far</FONT></P>
> >
> > <P><FONT SIZE=2>1. Oracle xa driver returns difference
> XAResource for
> > each call to XAConnection.getXAResource (see specs jdbc 2.0, section
> > 7.2.2 why it should not). This problem causes &quot;xaRes not
> > enlisted&quot;. Fixed XAManagedConnection to cache
> XAResource, this fix
> > should not break anything else.</FONT></P>
> >
> > <P><FONT SIZE=2>2. Although oracle xa driver accepts non-oracle Xid
> > object, it seems to require that both getGlobalTransactionId and
> > getBranchQualifier always return byte[64], otherwise it throws
> > &quot;invalid transaction id&quot; during XAResource.end.
> Fixed XidImpl
> > to return such arrays, not sure if it will work with all resource
> > managers.</FONT></P>
> >
> > <P><FONT SIZE=2>3. Currently I am trying to understand how
> > XAManagedConnection#associateConnection(Object). Currently it
> > unconditionally throws &quot;method not implemented&quot;
> exception. I
> > would appreciate if anyone can comment on this...</FONT></P>
> >
> > <P><FONT SIZE=2>&gt; -----Original Message-----</FONT>
> > <BR><FONT SIZE=2>&gt; From: Geer, Benjamin [<A
> >
> HREF=""mailto:[EMAIL PROTECTED]">mailto:benjamin.geer@mis
> ys.com</A>]</FONT>
> > <BR><FONT SIZE=2>&gt; Sent: Friday, June 14, 2002 1:02 PM</FONT>
> > <BR><FONT SIZE=2>&gt; To: '[EMAIL PROTECTED]'</FONT>
> > <BR><FONT SIZE=2>&gt; Cc: Lindsay, Steve; Wink, Stephen</FONT>
> > <BR><FONT SIZE=2>&gt; Subject: [JBoss-user]
> XATxConnectionManager with
> > Oracle?</FONT>
> > <BR><FONT SIZE=2>&gt; </FONT>
> > <BR><FONT SIZE=2>&gt; </FONT>
> > <BR><FONT SIZE=2>&gt; I'm trying to get XA transactions to
> work in JBoss
> > 3.0.0 with </FONT>
> > <BR><FONT SIZE=2>&gt; Oracle 9i.</FONT>
> > <BR><FONT SIZE=2>&gt; </FONT>
> > <BR><FONT SIZE=2>&gt; I've tried the oracle-service.xml
> provided with
> > JBoss in</FONT>
> > <BR><FONT SIZE=2>&gt; docs/examples/jca (which uses
> > LocalTxConnectionManager), and it works</FONT>
> > <BR><FONT SIZE=2>&gt; fine.&nbsp; I modified it to make an
> > oracle-xa-service.xml </FONT>
> > <BR><FONT SIZE=2>&gt; (attached), using</FONT>
> > <BR><FONT SIZE=2>&gt; XATxConnectionManager, and I'm
> testing it with a
> > little MBean service</FONT>
> > <BR><FONT SIZE=2>&gt; (attached).&nbsp; I can get a
> DataSource, get a
> > Connection from </FONT>
> > <BR><FONT SIZE=2>&gt; it, and do a</FONT>
> > <BR><FONT SIZE=2>&gt; SELECT, but when my service calls
> > Connection.close(), I get the</FONT>
> > <BR><FONT SIZE=2>&gt; following exception:</FONT>
> > <BR><FONT SIZE=2>&gt; </FONT>
> > <BR><FONT SIZE=2>&gt; java.lang.IllegalArgumentException: xaRes not
> > enlisted</FONT>
> > <BR><FONT
> SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
> > org.jboss.tm.TxCapsule.delistResource(TxCapsule.java:546)</FONT>
> > <BR><FONT SIZE=2>&gt; </FONT>
> > <BR><FONT SIZE=2>&gt; (Full stack trace attached.)</FONT>
> > <BR><FONT SIZE=2>&gt; </FONT>
> > <BR><FONT SIZE=2>&gt; Can anyone tell me what I'm doing
> wrong?</FONT>
> > <BR><FONT SIZE=2>&gt; </FONT>
> > <BR><FONT SIZE=2>&gt; Ben</FONT>
> > <BR><FONT SIZE=2>&gt; </FONT>
> > <BR><FONT SIZE=2>&gt; </FONT>
> > </P>
> >
> > </BODY>
> > </HTML>
> >
>
> _______________________________________________________________
>
> Don't miss the 2002 Sprint PCS Application Developer's Conference
> August 25-28 in Las Vegas -
> http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>

Reply via email to