Thanks for your comments Doug.  Good point re relevance of javax.sql API
docs.

I had a search through the J2EE spec.  It does not appear to me to _require_
that DataSources are provided in a pooled implementation.  It seems to be
preferred.  For example:

J2EE.5.4.3 ("J2EE Product Provider's Responsibilities") says, "While not
required by this specification, most J2EE products will provide the
following features:...... A mechanism to pool resources for the application
components and otherwise manage the use of resources by the container. The
pooling must be transparent to the application components."

J2EE6.2.4.3 ("JDBC API") says, "The JDBC API includes APIs for ...
connection pooling ... The connection pooling and distributed transaction
features are intended for use by JDBC drivers to coordinate with an
application server. J2EE products are not required to support the
application server facilities described by these APIs, although they may
prove useful."

Can anyone point me at a section of J2EE that says that pooling is required
for container-managed DataSources?

Also there are the other Qs in my last post - including, what is the effect
of including this:
        <parameter>
                <name>factory</name>
        
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
        </parameter>

as suggested at 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-how
to.html 
compared to not including a "factory" param at all?

To reiterate, my original issue is that I'm trying to understand whether or
not TC *always* pools container-managed DataSources.

> -----Original Message-----
> From: Parsons Technical Services 
> [mailto:[EMAIL PROTECTED] 
> Sent: Thursday 11 November 2004 02:37
> To: Tomcat Users List
> Subject: Re: Are all TC-managed DataSources pooled?
> 
> 
> > Is every container-managed DataSource configured in TC (e.g. via 
> > server.xml
> > / context.xml) automatically made pooled using commons pooling?
> 
> Yes. No additional code is needed (i.e. TC takes care of the pool.)
> 
> Or can
> > ordinary non-pooled connections be created too using this mechanism?
> >
> No, as it would not be compliant. It might be possible to 
> create a pool of 
> one connection, but it would still be handled as a pool.
> 
> To answer your original questions:
> 
> 
> >> Now, I'm *not* criticising the docs, I'm seeking
> >> clarification.  I'm not
> >> sure whether this is saying that a JDBC DataSource has to be
> >> pooled?  Or is
> >> instead saying that J2EE requires pooled JDBC connections, or
> >> maybe that
> >> J2EE requires connections via a DataSource?
> >>
> To meet the J2EE requirement the DataSource method must be 
> made avalible in 
> a pooled configuration.
> 
> 
> >> I didn't think that DataSources had to be pooled, based on
> >> what is says
> >> here:
> >> http://java.sun.com/j2se/1.4.2/docs/api/javax/sql/DataSource.html
> >>
> 
> This is only the API for the language. The language may be 
> able to do many 
> things that are not compliant with the J2EE standard 
> reguarding the server. 
> Think about if you were writing a stand alone desktop app and 
> had it talking 
> to a datasource. The J2EE requirements for the server are of 
> no interest and 
> don't apply.
> 
> >> This might sound like nit picking, but the answer to this
> >> will help me help
> >> someone else on another thread.  Thanks.
> >
> 
> Hope they get the picture.
> 
> Doug
> www.parsonstechnical.com
> 
> 
> 
> ---------------------------------------------------------------------
> 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