tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remy Maucherat" <r...@apache.org>
Subject Re: Tyrex pooling issues (Tomcat 4.0.2)
Date Fri, 01 Mar 2002 08:23:54 GMT
> I wanted to use tyrex to pool JNDI-acquired JDBC connections.  I have
> attached a file called "diary" that explains how I ultimately got this
> working.  Unfortunately, this required several undesirable things.  First,
> I had to specify a tomcat-specific class (tyrex.jdbc.ServerDataSource)
> in my web.xml.  Second, I had to patch the source to ResourceFactory.java
> (patch attached in ResourceFactory-pool-patch).  Third, I had to muck
> around with security polices, even though I wasn't running under a
> security manager (this is a tyrex issue, not a tomcat one, so I'm not
> going to go any farther with this).

I changed the way the TyrexResourceFactory works (new code will be in 4.0.3
b1), so your patch is no longer needed. Note that you should have been able
to use it by specifying the resourceFactory.

I am aware of the securiy check issue (but can't do much about it).

> The fundamental problem is that as far as I can tell, there is no way
> to get tyrex to create a ServerDataSource without doing what I did.
> The patch tells ResourceFactory to create a ServerDataSource (which
> does pooling) instead of an EnabledDataSource (which does not) if the
> web.xml-specified class is tyrex.jdbc.ServerDataSource.  It needs to
> explicitly specified this way because of the logic around line 214
> of TyrexDataSourceFactory.java.
>
> So, I think the point of this mail is a feature request for a way to
> specify that I want a ServerDataSource instead of an EnabledDataSource
> when I ask tomcat to give me a javax.sql.DataSource resource.
> The attached patch is suboptimal because it requires tomcat-specific
> information in web.xml.

Also, to use the transaction manager, you need to get the OTS classes.

Remy


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


Mime
View raw message