struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Graham" <dgraham1...@hotmail.com>
Subject Re: [OT] WAS Connection Pool
Date Tue, 15 Oct 2002 16:55:49 GMT
Why don't you skip the WAS pool altogether and configure (in 
struts-config.xml) a datasource that uses the Oracle driver and Oracle 
DataSource?  If Oracle doesn't provide a DataSource then you could use one 
from jakarta-commons dbcp.

I still think WAS would let you tell it which driver to use and would then 
return the correct type of Connections.

Dave


>From: "Adolfo Miguelez" <pelly69@hotmail.com>
>Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>To: struts-user@jakarta.apache.org
>Subject: Re: [OT] WAS Connection Pool
>Date: Tue, 15 Oct 2002 16:09:46 +0000
>
>The point is that WAS pool returns a connection extending IBM classes and 
>NOT OracleConnection. I use this connection with driver, but THE DRIVER, 
>despite it gets a Connection argument in one of its methods (I do not 
>remember which one), IT MAKES A CAST itself to OracleConnection.
>
>As a consequence, all the connections that does implement OracleConnection 
>(but yes Connection, of course) would throw a ClassCastException. It 
>happends also with Weblogic as some friend pointed.
>
>I do not know any nice workaround for the moment. The only one, quite ugly, 
>getting a empty Struct element, fill it and update its data. A Struct 
>returned by Oracle, is a connected component which connection is actually 
>an OracleConnection, so it would not throw exception in the driver classes.
>
>It seems that IBM implements their pool in WAS so the connections can not 
>be used with Oracle connected components. A smart movement to tell you: 
>move to DB2!!!
>
>>BTW, why do you need to cast to the specific connection type?
>
>DRIVER MAKES THE CAST, despite there is a Connection in the method 
>interface, but inside the method body, they cast it to OracleConnection. 
>Not really nice.
>
>Adolfo.
>
>
>>From: "David Graham" <dgraham1980@hotmail.com>
>>Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>>To: struts-user@jakarta.apache.org
>>Subject: Re: [OT] WAS Connection Pool
>>Date: Tue, 15 Oct 2002 09:34:05 -0600
>>
>>I'm not familiar with the WAS pool but I thought that connection pooling 
>>was accomplished via the DataSource interface.  Implementations of 
>>DataSource can pool the Connections returned from getConnection.  The 
>>DataSource implementation should also be able to handle any kind of 
>>Connection (OracleConnection, DB2Connection).
>>
>>Maybe the WAS DataSource or pool is only using DB2Connections but I highly 
>>doubt that.  I hope you are able to tell the WAS pool to use 
>>OracleConnection.
>>
>>BTW, why do you need to cast to the specific connection type?
>>
>>Dave
>>
>>
>>>From: "Adolfo Miguelez" <pelly69@hotmail.com>
>>>Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>>>To: struts-user@jakarta.apache.org
>>>Subject: Re: [OT] WAS Connection Pool
>>>Date: Tue, 15 Oct 2002 15:23:13 +0000
>>>
>>>
>>>Thin classes12.zip.
>>>
>>>Perhaps you are right. Do you know how to do it? I do not want to use the 
>>>DriverManager directly since it does not uses pooled connections 
>>>(AFAIK?). Maybe telling WAS to use an Oracle pool rather tha WAS pool. 
>>>Anyone know how?
>>>
>>>Adolfo.
>>>
>>>>From: "David Graham" <dgraham1980@hotmail.com>
>>>>Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>>>>To: struts-user@jakarta.apache.org
>>>>Subject: [OT] WAS Connection Pool
>>>>Date: Tue, 15 Oct 2002 09:02:29 -0600
>>>>
>>>>What database driver class are you using?  It seems like you should be 
>>>>able to tell WAS to use the oracle db driver which would return 
>>>>OracleConnections.
>>>>
>>>>Dave
>>>>
>>>>
>>>>>From: "Adolfo Miguelez" <pelly69@hotmail.com>
>>>>>Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>>>>>To: struts-user@jakarta.apache.org
>>>>>Subject: RE: How to use datasource and db connection pooling in struts?
>>>>>Date: Tue, 15 Oct 2002 14:58:46 +0000
>>>>>
>>>>>
>>>>>Taking advantage of this thread. Has any of you had the experience of

>>>>>using a connection provided by the Websphere pool to handle connected

>>>>>components, i.e. Struct or ARRAY in Oracle.
>>>>>
>>>>>We are getting a ClassCastException since driver attempts to cast the

>>>>>connection to an OracleConnection, and WAS pool provided connection 
>>>>>does not implement OracleConnection since is a connection provided by

>>>>>IBM classes. Any workaround? We are stuck with this issue.
>>>>>
>>>>>If you ask to IBM support they probably response you to use DB2 so not

>>>>>really helpful. Any experience?
>>>>>
>>>>>TIA,
>>>>>
>>>>>Adolfo.
>>>>>
>>>>>>From: "Hajratwala, Nayan (N.)" <nhajratw@ford.com>
>>>>>>Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>>>>>>To: "'Struts Users Mailing List'" <struts-user@jakarta.apache.org>
>>>>>>Subject: RE: How to use datasource and db connection pooling in 
>>>>>>struts?
>>>>>>Date: Tue, 15 Oct 2002 10:42:13 -0400
>>>>>>
>>>>>>you can use commons-dbcp ... see 
>>>>>>http://jakarta.apache.org/commons/dbcp.html
>>>>>>
>>>>>>---
>>>>>>- Nayan Hajratwala
>>>>>>- Chikli Consulting LLC
>>>>>>- http://www.chikli.com
>>>>>>
>>>>>>
>>>>>>-----Original Message-----
>>>>>>From: Stefan.Landro@swisscom.com [mailto:Stefan.Landro@swisscom.com]
>>>>>>Sent: Tuesday, October 15, 2002 10:40 AM
>>>>>>To: struts-user@jakarta.apache.org
>>>>>>Subject: How to use datasource and db connection pooling in struts?
>>>>>>
>>>>>>
>>>>>>Hi, there!
>>>>>>
>>>>>>How can I easily achieve database connection pooling (using a 
>>>>>>datasource
>>>>>>in one of the xml config files - btw. which one is it?)?
>>>>>>I know there is some stuff in jakarta-commons.
>>>>>>What I want to achieve is an easy to configure and highly efficient
db
>>>>>>connection pool that is available to all my action classes.
>>>>>>
>>>>>>Stef.
>>>>>>
>>>>>>--
>>>>>>To unsubscribe, e-mail:   
>>>>>><mailto:struts-user-unsubscribe@jakarta.apache.org>
>>>>>>For additional commands, e-mail: 
>>>>>><mailto:struts-user-help@jakarta.apache.org>
>>>>>>
>>>>>>--
>>>>>>To unsubscribe, e-mail:   
>>>>>><mailto:struts-user-unsubscribe@jakarta.apache.org>
>>>>>>For additional commands, e-mail: 
>>>>>><mailto:struts-user-help@jakarta.apache.org>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>_________________________________________________________________
>>>>>MSN Photos is the easiest way to share and print your photos: 
>>>>>http://photos.msn.com/support/worldwide.aspx
>>>>>
>>>>>
>>>>>--
>>>>>To unsubscribe, e-mail:   
>>>>><mailto:struts-user-unsubscribe@jakarta.apache.org>
>>>>>For additional commands, e-mail: 
>>>>><mailto:struts-user-help@jakarta.apache.org>
>>>>
>>>>
>>>>
>>>>
>>>>_________________________________________________________________
>>>>MSN Photos is the easiest way to share and print your photos: 
>>>>http://photos.msn.com/support/worldwide.aspx
>>>>
>>>>
>>>>--
>>>>To unsubscribe, e-mail:   
>>>><mailto:struts-user-unsubscribe@jakarta.apache.org>
>>>>For additional commands, e-mail: 
>>>><mailto:struts-user-help@jakarta.apache.org>
>>>
>>>
>>>
>>>
>>><HTML>
>>>      <HEAD>
>>>             <TITLE>Adolfo's signature</TITLE>
>>>      </HEAD>
>>>      <BODY>
>>>             <center><b><em>Adolfo Rodriguez Miguelez</em><b></center>
>>>
>>>      </BODY>
>>>      </HTML>
>>>
>>>
>>>
>>>
>>>
>>>_________________________________________________________________
>>>Chat with friends online, try MSN Messenger: http://messenger.msn.com
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:   
>>><mailto:struts-user-unsubscribe@jakarta.apache.org>
>>>For additional commands, e-mail: 
>>><mailto:struts-user-help@jakarta.apache.org>
>>
>>
>>
>>
>>_________________________________________________________________
>>Send and receive Hotmail on your mobile device: http://mobile.msn.com
>>
>>
>>--
>>To unsubscribe, e-mail:   
>><mailto:struts-user-unsubscribe@jakarta.apache.org>
>>For additional commands, e-mail: 
>><mailto:struts-user-help@jakarta.apache.org>
>
>
>
>
><HTML>
>      <HEAD>
>             <TITLE>Adolfo's signature</TITLE>
>      </HEAD>
>      <BODY>
>             <center><b><em>Adolfo Rodriguez Miguelez</em><b></center>
>
>      </BODY>
>      </HTML>
>
>
>
>
>
>_________________________________________________________________
>Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
>--
>To unsubscribe, e-mail:   
><mailto:struts-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: 
><mailto:struts-user-help@jakarta.apache.org>




_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message