Note that you MUST NOT close the Connection returned by
DelegatingConnection.getInnermostDelegate, and you MUST close (i.e., return
to the pool) the DelegatingConnection from which you got the delegate
OracleConnection once you're finished with the OracleConnection.  

-john.


-----Original Message-----
From: Kahle, Pavel (GE Consumer Finance) [mailto:[EMAIL PROTECTED]
Sent: Monday, January 19, 2004 6:54 AM
To: Tomcat Users List
Subject: RE: OracleConnection datasource CLOB.createTemporary


I've figured it out using this code :
 public void init(ServletConfig config) throws ServletException {
  .. ds lookup
        ((BasicDataSource) ds).setAccessToUnderlyingConnectionAllowed(true);
  ...     
 protected OracleConnection getConnection() throws SQLException
,NamingException {
       return ( (OracleConnection) ( (DelegatingConnection )
ds.getConnection() ).getInnermostDelegate());
       
                                     
         

>-----Original Message-----
>From: Rob Augustinus [mailto:[EMAIL PROTECTED]
>Sent: Sunday, January 18, 2004 2:04 PM
>To: Tomcat Users List
>Subject: Re: OracleConnection datasource CLOB.createTemporary
>
>
>
>how about typcasting the DBCP Connection to OracleConnection ?
>afaik this is the proper way?
>
>Kahle, Pavel (CONS FIN) wrote:
>
>>somwehere in the CLOB.createTemporary is Connection retype to
>>OracleConnection but Connection returned from DBCP 
>DataSource.getConnection
>>is not  assignable to that class. I can create clob in DB but I prefer
>>CLOB.createTemporary is there any solution to use 
>CLOB.createTemporary  with
>>DBCP?
>>Thank Pavel Kahle
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>  
>>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to