Quantcast

tomcat connection pool - status and future?

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

tomcat connection pool - status and future?

Jason Pringle

I've recently become aware of the new-ish tomcat connection pool (http://people.apache.org/~fhanik/jdbc-pool/) which appears to be at version 1.0.8.5 (a January 2010 release?).

Before I recommend we begin using this in a production situation, I'd like to gather a bit of data on it.  As a bit of background, we're migrating off of Weblogic server to Tomcat (simplification!), but one of the things we have been very happy with in Weblogic is the robust connection pool management.  We have some environments in which we use "multipools", some where we connect to Oracle RAC and some where we use Oracle's Fast Start Failover to transparently (to the application) cut over to a standby database at the connection pool level in an extremely short amount of time (compared to modifying connection descriptors and bouncing a farm of servers).

I started by researching available connection pools for tomcat, and it seems most folks either use DBCP (which has a host of issues) or C3PO (which has its own issues, including that it is LGPL licensed).  The "feature page" of the tomcat connection pool (http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html) seems quite promising, but to be honest, it concerns me that the module is only readily available from a commiter's pages or from source.


1)      Is the tomcat community committed to this new module?  (We've been burned by too many abandoned FOSS projects to discount this issue)

2)      When will it be available as a standard tomcat module?

3)      Is it considered "released" or still in a beta stage (I found the beta announcement from 2008)?

4)      Although I don't see anything like multipools, are there any plans to support something like them?  Could they be implemented within the interceptor framework?

5)      What are the implications for using with RAC?

6)      What are the implications for using with FSF (Fast Start Failover)?

7)      What are the implications for using within and XA environment (though we work hard to avoid XA it's important to know of any limitations etc)?

Thanks!

Jason Pringle




This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement,
you may review at http://www.amdocs.com/email_disclaimer.asp
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: tomcat connection pool - status and future?

Mark Thomas-2
On 23/09/2010 13:26, Jason Pringle wrote:
>
> I've recently become aware of the new-ish tomcat connection pool (http://people.apache.org/~fhanik/jdbc-pool/) which appears to be at version 1.0.8.5 (a January 2010 release?).
>
> Before I recommend we begin using this in a production situation, I'd like to gather a bit of data on it.  As a bit of background, we're migrating off of Weblogic server to Tomcat (simplification!), but one of the things we have been very happy with in Weblogic is the robust connection pool management.  We have some environments in which we use "multipools", some where we connect to Oracle RAC and some where we use Oracle's Fast Start Failover to transparently (to the application) cut over to a standby database at the connection pool level in an extremely short amount of time (compared to modifying connection descriptors and bouncing a farm of servers).
>
> I started by researching available connection pools for tomcat, and it seems most folks either use DBCP (which has a host of issues) or C3PO (which has its own issues, including that it is LGPL licensed).  The "feature page" of the tomcat connection pool (http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html) seems quite promising, but to be honest, it concerns me that the module is only readily available from a commiter's pages or from source.
>
>
> 1)      Is the tomcat community committed to this new module?  (We've been burned by too many abandoned FOSS projects to discount this issue)

Several release attempts have failed due to a lack of interest.

That said, $work is using this as the default pool in a commercial
product based on Tomcat with minimal issues.

> 2)      When will it be available as a standard tomcat module?

No idea.

> 3)      Is it considered "released" or still in a beta stage (I found the beta announcement from 2008)?

Unreleased.

> 4)      Although I don't see anything like multipools, are there any plans to support something like them?  Could they be implemented within the interceptor framework?

No. Don't know.

> 5)      What are the implications for using with RAC?

If you want the features of RAC, you are better off using Oracle's
built-in connection pooling rather than an external solution.

> 6)      What are the implications for using with FSF (Fast Start Failover)?

Not supported.

> 7)      What are the implications for using within and XA environment (though we work hard to avoid XA it's important to know of any limitations etc)?

It works with XA.

Overall, I'd suggest you take another look at DBCP. The historical
issues with deadlocks have been fixed and syncs reduced to the bare
minimum. jdbc-pool will easily beat it for performance in highly
concurrent apps running on multi-core servers but apart from that, DBCP
and jdbc-pool are pretty comparable and there are a number of areas
where DBCP does a better job of making the pooled connection look like a
normal connection. There are a few places where jdbc-pool requires extra
(user written) interceptors to do this.

The next generation of DBCP will be based on Pool 2.0 which will be
based on the Java 5 concurrency features. Current thinking is to
'borrow' code from jdbc-pool to update Commons Pool but that work has
not been started.

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: tomcat connection pool - status and future?

Christopher Schultz-2
In reply to this post by Jason Pringle
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jason,

On 9/23/2010 4:26 PM, Jason Pringle wrote:
> I started by researching available connection pools for tomcat, and
> it seems most folks either use DBCP (which has a host of issues)

What issues are you thinking of, specifically. These?
http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html

Of those 10 objections, only 4 of them are actual objections. "#5 No
releases in a while" is not a valid complaint, and the remainder are
actually talking about what the new CP has to offer, not judgments
against DBCP.

What the heck is a static interface, by the way?

Note that Tomcat's default connection pool is based upon DBCP.

> or
> C3PO (which has its own issues, including that it is LGPL licensed).

The biggest problem with C3P0 is that it's unsupported (I heard... I
can't find anywhere that it says the project is actually dead, but it's
been over 3 years since their last release, and it's clearly labeled
"beta"). It looks like they might be thinking about another point release.

What's wrong with LGPL? I'm not trying to start a holy war... just
curious about your objections.

> The "feature page" of the tomcat connection pool
> (http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html) seems
> quite promising, but to be honest, it concerns me that the module is
> only readily available from a commiter's pages or from source.

That is a shame.

> 3)      Is it considered "released" or still in a beta stage (I found
> the beta announcement from 2008)?

Don't be fooled by the 1.0.8.5 version number: the fact that it's
greater than 1 or doesn't have "beta" or "alpha" or "pre" in it's name
has no bearing on its stability or quality. At least, that appears to be
how the Tomcat team versions things.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyctJwACgkQ9CaO5/Lv0PD15wCgrFjgCYifhkwPZ6r50CYTCVv4
jmMAn0IoBYBvSUT+sGRP+EJidfE1U/Vt
=kocK
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: tomcat connection pool - status and future?

Jeff Hubbs-2
  On 9/24/10 10:24 AM, Christopher Schultz wrote:
>
> The biggest problem with C3P0 is that it's unsupported (I heard... I
> can't find anywhere that it says the project is actually dead, but it's
> been over 3 years since their last release, and it's clearly labeled
> "beta"). It looks like they might be thinking about another point release.
>
>
Just jumping in here - given this and given my case of a legacy Java app
that really needs a platform refresh in a bad way before app problems
can be addressed, is a migration path away from c3p0 called for and if
so, toward what?

- Jeff

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: tomcat connection pool - status and future?

Christopher Schultz-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeff,

On 9/24/2010 11:14 AM, Jeff Hubbs wrote:

>  On 9/24/10 10:24 AM, Christopher Schultz wrote:
>>
>> The biggest problem with C3P0 is that it's unsupported (I heard... I
>> can't find anywhere that it says the project is actually dead, but it's
>> been over 3 years since their last release, and it's clearly labeled
>> "beta"). It looks like they might be thinking about another point
>> release.
>>
>>
> Just jumping in here - given this and given my case of a legacy Java app
> that really needs a platform refresh in a bad way before app problems
> can be addressed, is a migration path away from c3p0 called for and if
> so, toward what?

That's tough to tell. See Mark's comments regarding DBCP, which are
positive in my view.

Also, the C3P0 folks had another semi-release back in April, so maybe
they're actually coming back. I would highly recommend talking to the
people on that team to see what their plans are.

I can see that their forum is full of complaints about deadlock, though
that may be due to misconfiguration or their applications' interference
with the library. I wouldn't be surprised to hear a lot of complaints
about DBCP deadlocking, too.

It's like buying a wireless router on Amazon: half the reviews for X say
"best router I ever had, I switched away from Y which was a POS" and
then you go look at the reviews for Y and they say the same thing with X
and Y reversed.

I would say that if things are working for you, there's no reason to
switch at all: it's not like a connection pool is a significant part of
your infrastructure (meaning that switching shouldn't be too traumatic
to your code).

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyc2ocACgkQ9CaO5/Lv0PD3GwCcDg4k8rbtMcGC1kEhiptwuhEi
iVwAnAr/T/27ID+qG9r97wPjN328A/Lx
=vtD1
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: tomcat connection pool - status and future?

Jason Pringle
In reply to this post by Mark Thomas-2

On 09/23/2010 2:27 PM, Mark Thomas wrote:

> Several release attempts have failed due to a lack of interest.

Lack of interest by whom?  The development team or the tomcat community?


> That said, $work is using this as the default pool in a commercial
> product based on Tomcat with minimal issues.

Ah yes, I do see that jar file in a commercial tomcat I downloaded recently.....


> Overall, I'd suggest you take another look at DBCP. The historical
> issues with deadlocks have been fixed and syncs reduced to the bare
> minimum. jdbc-pool will easily beat it for performance in highly
> concurrent apps running on multi-core servers but apart from that, DBCP
> and jdbc-pool are pretty comparable and there are a number of areas
> where DBCP does a better job of making the pooled connection look like
> a
> normal connection. There are a few places where jdbc-pool requires
> extra
> (user written) interceptors to do this.

Will do


> The next generation of DBCP will be based on Pool 2.0 which will be
> based on the Java 5 concurrency features. Current thinking is to
> 'borrow' code from jdbc-pool to update Commons Pool but that work has
> not been started.

Ah - a roadmap :)  Is there some chatter on the dev list to read up on here?



This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement,
you may review at http://www.amdocs.com/email_disclaimer.asp

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: tomcat connection pool - status and future?

Jason Pringle
In reply to this post by Christopher Schultz-2

Chris,

On 9/24/2010 7:24 AM, Christopher Schultz wrote:

> What issues are you thinking of, specifically. These?
> http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html

Googling around shows many complaints about multithreaded behavior and connection dropping.
Which (to me) suggests at least pockets of instability.

 
> The biggest problem with C3P0 is that it's unsupported (I heard... I
> can't find anywhere that it says the project is actually dead, but it's
> been over 3 years since their last release, and it's clearly labeled
> "beta"). It looks like they might be thinking about another point
> release.

Unsupported (or weakly supported) is likely a deal breaker for us.

> What's wrong with LGPL? I'm not trying to start a holy war... just
> curious about your objections.

Our legal department detests LGPL (lack of case law scares lawyers - nobody wants to BE the
case law) and getting approval to use anything LGPL is near impossible.  In some cases, for
well known products (say Hibernate) our company has made legal arrangements with the owner
(I don't know details, just that "something's been done").

I don't necessarily agree with the rules, I just have to follow them.

> > The "feature page" of the tomcat connection pool
> > (http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html) seems
> > quite promising, but to be honest, it concerns me that the module is
> > only readily available from a commiter's pages or from source.
>
> That is a shame.

Which part is a shame? That I don't want to propose we put big $$$ at risk on a component that does not have a solid community of support, or that the community hasn't supported a promising component?

NB: I'm not passing any judgement on the component itself, but a criterion for us to pull in FOSS is the level of community support etc.

--Jason


This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement,
you may review at http://www.amdocs.com/email_disclaimer.asp
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: tomcat connection pool - status and future?

Christopher Schultz-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jason,

On 9/24/2010 1:26 PM, Jason Pringle wrote:
> On 9/24/2010 7:24 AM, Christopher Schultz wrote:
>> What's wrong with LGPL? I'm not trying to start a holy war... just
>> curious about your objections.
>
> Our legal department detests LGPL (lack of case law scares lawyers -
> nobody wants to BE the case law) and getting approval to use anything
> LGPL is near impossible. In some cases, for well known products (say
> Hibernate) our company has made legal arrangements with the owner (I
> don't know details, just that "something's been done").

Wow, I thought RMS was the craziest person out there when it came to OSS
licenses. Apparently your legal department is even crazier.

I would be shocked if any LGPL-licensed project came after you for using
their library, assuming you didn't take their code, slap an interface on
top of it, and then sell it as "See Three Pee Oh".

At any rate, it looks like the LGPL will be a blocker for you. Bummer.

> I don't necessarily agree with the rules, I just have to follow them.

I understand.

>>> The "feature page" of the tomcat connection pool
>>> (http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html) seems
>>> quite promising, but to be honest, it concerns me that the module is
>>> only readily available from a commiter's pages or from source.
>>
>> That is a shame.
>
> Which part is a shame?

The part about having to build it yourself or trust a build on a
committer's page (though, if you don't trust the committer, I'm not sure
you should trust the code).

> That I don't want to propose we put big $$$ at risk on a component
> that does not have a solid community of support

At least you don't have to buy a license :)

> or that the community hasn't supported a promising component?

Technically speaking, the promising component hasn't even emerged from a
beta state, so it's not really available for support.

To answer your question of markt: tomcat-dbcp has stagnated due to lack
of interest from the Tomcat dev team itself. If you are motivated to
pick up where Filip left-off, you are more than welcome to join the dev
mailing list, start doing your own testing, and possibly even making
over the project module.

> NB: I'm not passing any judgement on the component itself, but a
> criterion for us to pull in FOSS is the level of community support
> etc.

Fair enough. I wonder why Filip lost interest.

> This message and the information contained herein is proprietary and
> confidential and subject to the Amdocs policy statement, you may
> review at http://www.amdocs.com/email_disclaimer.asp

Does your legal team know that these messages are archived and
re-published? They might have a stroke if they knew... :)

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyc5fYACgkQ9CaO5/Lv0PB3UQCdHt7tA881R/d7TSgulaYo1eNf
r4gAoJ9eYCtO34jdQDX7HrG4jb0tAf6F
=Bx3o
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: tomcat connection pool - status and future?

Caldarale, Charles R
> From: Christopher Schultz [mailto:[hidden email]]
> Subject: Re: tomcat connection pool - status and future?

> To answer your question of markt: tomcat-dbcp has stagnated due
> to lack of interest from the Tomcat dev team itself.

Also note that Filip is off on National Guard duty for some extended period of time, so his ability to continue development at the moment is rather limited.

> Does your legal team know that these messages are archived and
> re-published? They might have a stroke if they knew... :)

Now that would be a positive outcome, wouldn't it?  (I'm also struggling with a legal department that seems to be blissfully unaware of how OSS actually works.)

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: tomcat connection pool - status and future?

Christopher Schultz-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chuck,

On 9/24/2010 2:04 PM, Caldarale, Charles R wrote:
>> From: Christopher Schultz [mailto:[hidden email]]
>> Subject: Re: tomcat connection pool - status and future?
>
>> To answer your question of markt: tomcat-dbcp has stagnated due to
>> lack of interest from the Tomcat dev team itself.
>
> Also note that Filip is off on National Guard duty for some extended
> period of time, so his ability to continue development at the moment
> is rather limited.

Good to know. Is he in the /US/ National Guard? He lives in Colorado, right?

>> Does your legal team know that these messages are archived and
>> re-published? They might have a stroke if they knew... :)
>
> Now that would be a positive outcome, wouldn't it?

Probably not: their health insurance premiums would probably go up in
response.

> (I'm also struggling with a legal department that seems to be
> blissfully unaware of how OSS actually works.)

So sad. I'm lucky to be working in a small group where they really
/trust/ the engineers to make decent engineering decisions.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyc/rkACgkQ9CaO5/Lv0PBoFACfbe9oB25FjJr6ILxN4/NHhJfa
590AniQxD91EhbUBM6awZfuyg7u9YKgm
=tnJI
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: tomcat connection pool - status and future?

Caldarale, Charles R
> From: Christopher Schultz [mailto:[hidden email]]
> Subject: Re: tomcat connection pool - status and future?

> Is he in the /US/ National Guard?

Yes.

> He lives in Colorado, right?

Last I heard.  (Haven't actually seen him in about two years.)

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: tomcat connection pool - status and future?

Mark Thomas-2
In reply to this post by Jason Pringle
On 24/09/2010 18:11, Jason Pringle wrote:
>
> On 09/23/2010 2:27 PM, Mark Thomas wrote:
>
>> Several release attempts have failed due to a lack of interest.
>
> Lack of interest by whom?  The development team or the tomcat community?

Anyone apart from the original developer. You'll see a little recent
activity from me but that was because work needed a new version with
some bug fixes.

>> The next generation of DBCP will be based on Pool 2.0 which will be
>> based on the Java 5 concurrency features. Current thinking is to
>> 'borrow' code from jdbc-pool to update Commons Pool but that work has
>> not been started.
>
> Ah - a roadmap :)  Is there some chatter on the dev list to read up on here?

There is a little. It is on the commons dev mailing list.

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How best to get some data from a Servlet to Apache access log. . .

David Dabbs
Hello.

I'm running Tomcat fronted by Apache httpd via mod_proxy_ajp.
There's a small bit of data from my Servlet response I'd like to
get into the Apache access_log.

I know I could set a response header, say X-MyData, and log
that using a CustomLog directive. But I don't want this header
cruft going out with the response from Apache. Would I use mod_headers
to remove this header (and yet still log to access_log)?

Another possibility is to use a "note," which I can also log
using CustomLog. It's not clear though, how I would set this note
using the Response obj available to my servlet code and have it
propagate back through AJP.

Looking for the best way to skin this cat.

Thanks!

David



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How best to get some data from a Servlet to Apache access log. . .

Rainer Jung-3
On 02.10.2010 20:40, David Dabbs wrote:

> Hello.
>
> I'm running Tomcat fronted by Apache httpd via mod_proxy_ajp.
> There's a small bit of data from my Servlet response I'd like to
> get into the Apache access_log.
>
> I know I could set a response header, say X-MyData, and log
> that using a CustomLog directive. But I don't want this header
> cruft going out with the response from Apache. Would I use mod_headers
> to remove this header (and yet still log to access_log)?
>
> Another possibility is to use a "note," which I can also log
> using CustomLog. It's not clear though, how I would set this note
> using the Response obj available to my servlet code and have it
> propagate back through AJP.
>
> Looking for the best way to skin this cat.

Notes can only be set from within an Apache module. A response header is
the only thing that survives passing the response from Tomcat to Apache.
And yes, you should be able to remove the header with mod_headers, but:
I would expect that the header is then gone for Apache mod_log_config to :(

Would it suffice to log things in a Tomcat access log (can log e.g.
request attributes, which are not sent to the client), and generate a
unique ID there that you send back to Apache (and the client) and log
there too, so that you can correlate one to one?

Regards,

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...