Re: About connection pooling



Juha Laiho wrote:
> Mika Myllyvirta <mika.REMOVEmyllyvirtaTHE@xxxxxxxxxxxxxxxx> said:
>> Could somebody explain the connection pooling for me a bit more? Or
>> to
>> be specific, how do I obtain the correct connection pooling for my
>> servlet.
>
>> I have been aware of connection pooling and the benefits of pooled
>> connections. Every time I read about this subject I get a different
>> answer(!). So here is what I have found out: (the question mark
>> stands
>> for your correction if I am wrong :)
>>
>> 1. jTDS (and jdbc) has a builtin connection pooling (?)
>
> jdbc doesn't define connection pooling;

http://java.sun.com/j2se/1.4.2/docs/api/javax/sql/PooledConnection.html

> jTDS could still very well
> have
> an implementation of connection pooling included.

http://jtds.sourceforge.net/faq.html

>> 2. Apache Tomcat has a builtin connection pooling (?)
>
> Yes. See f.ex.
>
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations
>
>> 3. and there are other classes that I can use to make my servlet to
>> pool connections (eg. DBPool, DBCP, JNDI (?))?
>
> Not JNDI (it's again a specification, with multiple implementations),
> but DBCP and DBPool are packages providing connection pooling
> implementation. Actually DBCP is what is used by Tomcat, if I'm not
> grossly mistaken.
>
>> Which of these pools should I use?
>
> Either jTDS pooling or Tomcat pooling. The former in case it provides
> some
> functionality Tomcat (DBCP) pooling doesn't provide, and that
> functionality
> is important to you. If this is the case, I recommend to write enough
> code to be able to configure the jTDS pool through Tomcat (as the
> default
> Tomcat pool is configured), and thus keep the changes outside your
> servlet
> code. I've done this to be able to use Oracle pooling implementation
> in
> Tomcat, and it wasn't too hard.
>
> If you need to have something fast (or "just yesterday"), then go
> ahead
> with Tomcat pooling - and migrate to jTDS pooling later on -
> remembering
> that your application code will not see the difference.

I don't see any jTDS connection pooling on the horizon so I'd stick with
the most general in this case, Tomcat pooling. It comes with the servlet
container and needs no additional packages.

Kind regards

robert

.



Relevant Pages

  • Re: When will IBM practice what they preach?
    ... Connection pooling is very important for good speeds with java apps. ... The good thing is that you chose Tomcat. ... I runs like hell - the iSeries is a wicked database server - and tomcat on ... then I know they are still trying to sell sell sell... ...
    (comp.sys.ibm.as400.misc)
  • DBCP Configuration with Tomcat 4.1.27 and mySQL
    ... I'm a Java Web developer NEWBIE that has inherited a website that ... another replica DEVELOPMENT website and upgraded it to Tomcat 4.1.27. ... I was told this version of Tomcat supports Database Connection Pooling ...
    (comp.lang.java)
  • Re: [JDBC] Connection pooling
    ... of course you should only use a tomcat when your app is a webapp. ... > Here are a few things I don't understand about connection pooling. ...
    (comp.lang.java.databases)
  • Re: About connection pooling
    ... how do I obtain the correct connection pooling for my servlet. ... jTDS could still very well have ... Actually DBCP is what is used by Tomcat, ...
    (comp.lang.java.databases)
  • Re: Jdbc connection pooling without app/J2ee server
    ... > BEA Weblogic appserver, we offer the best pooling there is... ... Tomcat does offer connection pooling. ... Alin. ...
    (microsoft.public.sqlserver.jdbcdriver)