Although this did not fix my problem, I think those having problems with Oracle connections might be helped by the following:
It appears that the Weblogic wrapper classes don't allow the Oracle driver extensions by default and you have to cast the connection object to a weblogic.jdbc.vendor.oracle.OracleConnection or the statment object to a weblogic.jdbc.vendor.oracle.OracleStatement which allows access to some of the extensions such as OracleStatement and OracleResultSet. See the following URL for Weblogic 6.1: http://edocs.bea.com/wls/docs61/jdbc/thirdparty.html#1043705**
Marco Tedone wrote:
If this is the case, I would do one of the two: to change database or to change application server. As it seems to me that a connection pooling wors fine with Oracle, probally I would change the appserv, because a JNDI connection pooling should be portable across different JVM and I find difficult to think that Weblogic built some proprietary object around the database connection. In any case, binding the connection to the servlet context would lead to a high coupling between the web tier and the database tier with all the consequences you could imagine, the first, as you've already stated, would be to pass the connection from the Action to the business tier; as you'll probally know, the Action is part of the controller, therefore it should contain as few logic as possible and it should act as a sort of request dispatcher, requesting services to business components by means of messaging and preparing food for the forward action. As a solution, you could create a factory to call in order to receive a database connection; the Action shouldn't be aware of the Factory implementation, and it should call just a getConnection() method or, better, to call a business method on a business component which in turn would call the Factory to have the database connection object available. To store the database connection in the Servlet Context(even at this point I would use the DBCP from Jakarta) you can use a Struts PlugIn which is called at startup, but it requires only some configuration on the struts-config.xml file, leaving clean and tidy the web.xml file.
My 2 cents.
Marco
-----Original Message----- From: Austin Lowry [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 11, 2003 5:06 PM To: Struts Users Mailing List Subject: Re: Oracle Data Source Config
Apparently there is some portion of the Oracle connection that the
OracleXMLQuery class needs. To quote Oracle support: "Must use an Oracle connection pool and not the web logic pool. Because the XML API requires an Oracle conn object."
My current approach is going to be to initialize an Oracle connection
pool that utilizes OracleConnectionCacheImpl from a servlet at server startup and placing it in the servlet context. (Thanks to Claude for your help here.) This introduces another problem in that I will have to pass the connection to my business objects from my action classes, but I think it will work. Any ideas are welcome. Thanks.
~Austin
Robert McIntosh wrote:
I would venture to say that just about any genericconnection pooling
library/implementation is going to wrap the underlyingconnection so
that the pool can do its job, as they generally overridethe close()
methods at the very least. Does the Oracle driver/connection have ait uses the
specific method for executing the query? If it doesn't and
basic executeQuery() type of methods on the JDBC statement,it would
seem that it would work, since connection pool wrappers arejust going
to pass along the query to the underlying driver anyway,which would
be your oracle one. If you have to use a specific methodthough, you
might be out of luck.for use by
- Robert
Austin Lowry wrote:
Maybe I should clarify my question.
The Weblogic connection pool works fine, the problem is that it returns a Weblogic connection object which is not suitable
behave properly.OracleXMLQuery. I must have an Oracle connection object, such as
OracleConnectionPoolDataSource for OracleXMLQuery to
you can getMy question is basicly, does anyone have a good way to implement Oracle connection pooling with Struts?
Thanks.
Marco Tedone wrote:
If Weblogic release a connection pool under a jndi name,
class vitala connection from the pool. I've done it with Jboss.
-----Original Message-----
From: Austin Lowry [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 4:09 PM
To: [EMAIL PROTECTED]
Subject: Oracle Data Source Config
I've hit a bump in the road with my development because I have to be able to use an Oracle connection in order to use a
unusableto my application. This made my Weblogic connection pool
the Strutsbecause it uses it's own connection objects that use the Oracle
driver. I think my best option at this point is to use
using Oracle<data-sources>. Does anyone have any experience with
get back anand OracleConnectionPoolDataSource or OracleConnectionCacheImpl?
I'm not really sure how to set this up and make sure I
--------------------------------------------------------------------Oracle connection object that I can use. Also, is there a better
way to implement the connection pool and still return an Oracle connection object than through Struts? Thanks for your help.
[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:
---------------------------------------------------------------------
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]