I use this code
public java.sql.Connection getStandardConnection() throws Exception { return standardDS.getConnection( "name", "pwd" ); } .... .... .... java.sql.Connection conn= getStandardConnection(); OracleCallableStatement stmt= (OracleCallableStatement) conn.createCallableStatement(....) I think it get the cast is automatic. This code work since 2 years in 2.4.x and it's working on 3.0.1 (last packaged version) with XA connection, but nor with LocalConnection (I get an error with last casting). I'd like to understand what is the difference between current XA and Local connection. I'd like to understand what could happen in the next version to my code. Thanks a lot Stefano Il mer, 2002-08-21 alle 17:23, David Jencks ha scritto: Oops, my instructions were wrong. Should be (OracleConnection)c = (OracleConnection)((LocalConnection)ds.getConnection()).getUnderlyingConnection(); in 3.0 and 3.2 (current) or (OracleConnection)c = (OracleConnection)((WrappedConnection)ds.getConnection()).getUnderlyingConnection(); 4.0 and 3.2 (future) Your casting of the datasource is correct: however what kind of connection are you getting? With the local wrapper in 3.0 and current 3.2 you get LocalConnection, with the xa wrapper in 3.0 you get the actual connection from the XADataSource, with the local wrapper and xa wrapper from 4.0 (and soon 3.2 I hope) you get WrappedConnection. My instructions are for how to get the underlying wrapped connection from the wrapped connection. Sorry for the original wrong code. david jencks On 2002.08.21 10:00:28 -0400 Stefano Maestri wrote: > I cast to (DataSource), and then I get connection from a standard > DataSource. Isn't it correct? > > thanx > > Stefano > > Il mer, 2002-08-21 alle 15:20, David Jencks ha scritto: > > Just a warning, the xa wrapper in 3.0 does not wrap connection but > the new > one I just wrote for 4.0 does. I'm hoping it will get tested shortly > and I > will back port it to 3.2. With the local wrapper or the new xa > wrapper you > need to call > > (OracleConnection)c = (OracleConnection)((LocalConnection)ds.getConnection()); > > in 3.0 and 3.2 (current) > > or > > (OracleConnection)c = (OracleConnection)((WrappedConnection)ds.getConnection()); > > 4.0 and 3.2 (future) > > thanks > david jencks > > > On 2002.08.21 05:13:38 -0400 Stefano Maestri wrote: > > i tried with XA connection and it works. > > > > > > Il mer, 2002-08-21 alle 10:00, Stefano Maestri ha scritto: > > Il mar, 2002-08-20 alle 18:49, David Jencks ha scritto: > > I think either you have 2 copies of the oracle driver > deployed or > > you have > > a version of jboss that has a bug where it creates 2 > classloaders > > for each > > deployed package. If you have only one copy of Oracle, > which > > exact jboss > > are you using? AFAIK this was fixed several weeks ago in > all > > jboss cvs > > branches. > > > > david jencks > > > > Well, you are right. Yesterday I understood the trouble, and I > > solved (damn a developer pack in his jar the oracle driver !!). > > > Now We have another exception when we try to cast a > > conn.creatCallableStatement(...) to OracleCallableStatement. We > get > > a CastException runtime. We need the specific oracle callable > > statement to use some of its feature (LOB mainly). In 2.4.x all > > works ok. Why I get the error with 3.0.1. We have about 600 > call > > done in this way. I hope I can solve the trouble without touch > our > > code. Please help me! > > > > thanks in advance > > > > > > --------------- all work and no play makes Jack a dull boy > > --------------- > > > > bye Stefano > > > > [EMAIL PROTECTED] > > www.javalinux.it > > MSN messanger: [EMAIL PROTECTED] > > ICQ uin: 122192578 > > #jedit IRC channel as <maeste> > > > > > > > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by: OSDN - Tired of that same old > > cell phone? Get a new here for FREE! > > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > > _______________________________________________ > > JBoss-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > --------------- all work and no play makes Jack a dull boy > --------------- > > bye Stefano > > > [EMAIL PROTECTED] > www.javalinux.it > MSN messanger: [EMAIL PROTECTED] > ICQ uin: 122192578 > #jedit IRC channel as <maeste> > > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN"> > <HTML> > <HEAD> > <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8"> > <META NAME="GENERATOR" CONTENT="GtkHTML/1.0.4"> > </HEAD> > <BODY> > I cast to (DataSource), and then I get connection from a standard > DataSource. Isn't it correct? > <BR> > > <BR> > thanx > <BR> > > <BR> > Stefano > <BR> > > <BR> > Il mer, 2002-08-21 alle 15:20, David Jencks ha scritto: > <BLOCKQUOTE> > <PRE><FONT COLOR="#737373"><FONT SIZE="3"><I>Just a warning, the xa > wrapper in 3.0 does not wrap connection but the new</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>one I just wrote for 4.0 does. > I'm hoping it will get tested shortly and I</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>will back port it to 3.2. With > the local wrapper or the new xa wrapper you</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>need to call</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>(OracleConnection)c = > (OracleConnection)((LocalConnection)ds.getConnection());</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>in 3.0 and 3.2 > (current)</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>or</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>(OracleConnection)c = > (OracleConnection)((WrappedConnection)ds.getConnection());</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>4.0 and 3.2 > (future)</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>thanks</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>david jencks</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>On 2002.08.21 05:13:38 -0400 > Stefano Maestri wrote:</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> i tried with XA connection > and it works. </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> Il mer, 2002-08-21 alle > 10:00, Stefano Maestri ha scritto: </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> Il mar, 2002-08-20 alle > 18:49, David Jencks ha scritto: </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> I think either you > have 2 copies of the oracle driver deployed or</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> you have</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> a version of jboss > that has a bug where it creates 2 classloaders</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> for each</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> deployed package. > If you have only one copy of Oracle, which</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> exact > jboss</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> are you using? AFAIK > this was fixed several weeks ago in all</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> jboss cvs</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> > branches.</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> david > jencks</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> Well, you are right. > Yesterday I understood the trouble, and I</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> solved (damn a developer > pack in his jar the oracle driver !!). </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> Now We have another > exception when we try to cast a</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> > conn.creatCallableStatement(...) to OracleCallableStatement. We > get</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> a CastException runtime. > We need the specific oracle callable</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> statement to use some of > its feature (LOB mainly). In 2.4.x all</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> works ok. Why I get the > error with 3.0.1. We have about 600 call</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> done in this way. I hope > I can solve the trouble without touch our</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> code. Please help > me!</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> thanks in > advance</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> --------------- all work > and no play makes Jack a dull boy</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> --------------- > </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> bye Stefano > </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> > [EMAIL PROTECTED]</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> > www.javalinux.it</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> MSN messanger: > [EMAIL PROTECTED] </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> ICQ uin: 122192578 > </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> #jedit IRC channel > as <maeste> </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> > -------------------------------------------------------</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> This sf.net email is > sponsored by: OSDN - Tired of that same old</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> cell phone? Get a new here > for FREE!</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> > _______________________________________________</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> JBoss-user mailing > list</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> > [EMAIL PROTECTED]</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> > https://lists.sourceforge.net/lists/listinfo/jboss-user</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>> </FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>-------------------------------------------------------</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>This sf.net email is sponsored > by: OSDN - Tired of that same old</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>cell phone? Get a new here for > FREE!</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>_______________________________________________</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>JBoss-user mailing > list</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>[EMAIL PROTECTED]</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I>https://lists.sourceforge.net/lists/listinfo/jboss-user</FONT></FONT></I> > <FONT COLOR="#737373"><FONT SIZE="3"><I></FONT></FONT></I> > </PRE> > </BLOCKQUOTE> > <TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%"> > <TR> > <TD> > --------------- all work and no play makes Jack a dull boy > --------------- > <BR> > > <BR> > bye Stefano > <BR> > > <BLOCKQUOTE> > <A HREF="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</A> > <BR> > <A HREF="http://www.javalinux.it">www.javalinux.it</A> > <BR> > MSN messanger: [EMAIL PROTECTED] > <BR> > ICQ uin: 122192578 > <BR> > #jedit IRC channel as <maeste> > <BR> > > </BLOCKQUOTE> > </TD> > </TR> > </TABLE> > > </BODY> > </HTML> > ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user