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>&gt; i tried with XA connection
> and it works. </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt; </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt; </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt; Il mer, 2002-08-21 alle
> 10:00, Stefano Maestri ha scritto: </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;     Il mar, 2002-08-20 alle
> 18:49, David Jencks ha scritto: </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;         I think either you
> have 2 copies of the oracle driver deployed or</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt; you have</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;         a version of jboss
> that has a bug where it creates 2 classloaders</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt; for each</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;         deployed package. 
> If you have only one copy of Oracle, which</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt; exact
> jboss</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;         are you using? AFAIK
> this was fixed several weeks ago in all</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt; jboss cvs</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;        
> branches.</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;         </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;         david
> jencks</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;         </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;     Well, you are right.
> Yesterday  I understood the trouble, and I</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;     solved (damn a developer
> pack in his jar the oracle driver !!). </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;     Now We have another
> exception when we try to cast a</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;    
> conn.creatCallableStatement(...) to OracleCallableStatement. We
> get</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;     a CastException runtime.
> We need the specific oracle callable</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;     statement to use some of
> its feature (LOB mainly). In 2.4.x all</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;     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>&gt;     done in this way. I hope
> I can solve the trouble without touch our</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;     code. Please help
> me!</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;     </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;     thanks in
> advance</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;     </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;     </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;     --------------- all work
> and no play makes Jack a dull boy</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;     ---------------
> </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;     </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;     bye Stefano
> </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;     </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;        
> [EMAIL PROTECTED]</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;        
> www.javalinux.it</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;         MSN messanger:
> [EMAIL PROTECTED] </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;         ICQ uin: 122192578
> </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;         #jedit IRC channel
> as &lt;maeste&gt; </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;         </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;     </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;     </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt; </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt; </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt; </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;
> -------------------------------------------------------</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt; This sf.net email is
> sponsored by: OSDN - Tired of that same old</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt; cell phone?  Get a new here
> for FREE!</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;
> https://www.inphonic.com/r.asp?r=sourceforge1&amp;refcode1=vs3390</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;
> _______________________________________________</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt; JBoss-user mailing
> list</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;
> [EMAIL PROTECTED]</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt;
> https://lists.sourceforge.net/lists/listinfo/jboss-user</FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt; </FONT></FONT></I>
> <FONT COLOR="#737373"><FONT SIZE="3"><I>&gt; </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&amp;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 &lt;maeste&gt; 
>     <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

Reply via email to