tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brad Thompson <b...@vecna.com>
Subject Tyrex pooling issues (Tomcat 4.0.2)
Date Fri, 01 Mar 2002 04:50:48 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).

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.

I do not know the tomcat source that well...my apologies if I am missing
something important.

brad

Mime
View raw message