OK thanks, some useful points.  I'll do some more reading. :)

> > So I'm going to submit an enhacement suggestion for the docs
> > (5.0.x/5.5.x),
> > as they imply that DBCP is always used for datasources.
> 
> The docs give a DBCP example.  If someone needs to be told another
> implementation can be plugged in, they not competent enough 
> to be doing the plugging.

That's not the point I'm making.  The jndi-resource-how-to ('JDBC Data
Sources', '0. Introduction') 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html#JD
BC%20Data%20Sources 
says, "Many web applications need to access a database via a JDBC driver....
The J2EE Platform Specification requires J2EE Application Servers to make
available a DataSource implementation (that is, a connection pool for JDBC
connections) for this purpose."  Surely this is not correct given what we've
already said, i.e. the connection pool is not required?

> Your understanding is wrong.  BasicDataSource can be pooled or not,
> depending on how you configure it.

OK.  By "configure" are you just meaning the maxActive, maxIdle params, or
there more to it than that, in determining whether it's pooled or not?  e.g.
the choice of factory class perhaps?

Thanks :)

> -----Original Message-----
> From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
> Sent: Thursday 11 November 2004 14:51
> To: Tomcat Users List
> Subject: RE: Are all TC-managed DataSources pooled?
> 
> 
> 
> Hi,
> 
> >So I'm going to submit an enhacement suggestion for the docs
> (5.0.x/5.5.x),
> >as they imply that DBCP is always used for datasources.
> 
> The docs give a DBCP example.  If someone needs to be told another
> implementation can be plugged in, they not competent enough 
> to be doing
> the plugging.  But if you feel like clarifying ad-nauseam, 
> feel free to
> submit doc patches as always.
> 
> >Is this a case where I might use
> org.apache.commons.dbcp.BasicDataSource?
> >As far as I understand it, that class is DBCP's "standard" non-pooled
> >DataSource...?
> 
> Your understanding is wrong.  BasicDataSource can be pooled or not,
> depending on how you configure it.
> 
> >And, are the following valid ways to tell whether a DataSource or
> >Connection
> >has come from a pooled or non-pooled source? :
> > if (conn instanceof javax.sql.PooledConnection)
> > if (dataSource instanceof javax.sql.ConnectionPoolDataSource)
> 
> They're not conclusive ways.  There might not be a conclusive 
> *portable*
> way to tell.  It depends on the pooling implementation.
> 
> >which both fail the tests above, despite the latter's name implying
> >poolability
> 
> Implications are just that, nothing concrete.  Your tests are 
> incorrect.
> 
> >Maybe BasicDataSourceFactory does not produce a pooled DataSource(?),
> but
> 
> It produces a BasicDataSource, which may or may not be pooling.
> 
> >And I can't see another class within DBCP that looks like the pooled
> >datasource factory that I need to specify in my "factory" param...?
> 
> You need to read the JNDI (not just JDBC DataSource) doc again, and/or
> make sure you understand the concept of a factory class.  The 
> latter is
> not in the scope of Tomcat documentation.  
> 
> DBCP provides numerous factories, all of which can produce pooling AND
> non-pooling data sources, and the pools provided have different
> strategies.  Not all resource pooling is the same.
> 
> Yoav
> 
> 
> 
> This e-mail, including any attachments, is a confidential 
> business communication, and may contain information that is 
> confidential, proprietary and/or privileged.  This e-mail is 
> intended only for the individual(s) to whom it is addressed, 
> and may not be saved, copied, printed, disclosed or used by 
> anyone else.  If you are not the(an) intended recipient, 
> please immediately delete this e-mail from your computer 
> system and notify the sender.  Thank you.
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to