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]

Reply via email to