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 generic > connection pooling > > library/implementation is going to wrap the underlying > connection so > > that the pool can do its job, as they generally override > the close() > > methods at the very least. Does the Oracle driver/connection have a > > specific method for executing the query? If it doesn't and > it uses the > > basic executeQuery() type of methods on the JDBC statement, > it would > > seem that it would work, since connection pool wrappers are > just going > > to pass along the query to the underlying driver anyway, > which would > > be your oracle one. If you have to use a specific method > though, you > > might be out of luck. > > > > - 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 > for use by > >> OracleXMLQuery. I must have an Oracle connection object, such as > >> OracleConnectionPoolDataSource for OracleXMLQuery to > behave properly. > >> My 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, > you can get > >>> a 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 > class vital > >>>> to my application. This made my Weblogic connection pool > unusable > >>>> because it uses it's own connection objects that use the Oracle > >>>> driver. I think my best option at this point is to use > the Struts > >>>> <data-sources>. Does anyone have any experience with > using Oracle > >>>> and OracleConnectionPoolDataSource or OracleConnectionCacheImpl? > >>>> I'm not really sure how to set this up and make sure I > get back an > >>>> 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. > >>>> > >>>> > >>>> > >>> > >>> > >>> > >>> > -------------------------------------------------------------------- > >>> - > >>> 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]