pooling the JDBC connection

T

timasmith

Hi,

I have entity beans which act purely in a stateless service fashion -
essentially executing SQL and performing business logic and then
returning business objects.

I establish the JDBC connection manually and all the beans *seem* to be
using the same connection since it is accessed statically. I dont know
whether that creates a problem if the beans are all their own threads..
anyway.

I am all for some pooling - I vaguely remember someone suggesting that
standalone JDBC can easily pool for you - without a container or
anything else.

If so I am not sure what I would get from an EJB datasource beyond some
transaction management possibilities down the road if I cant architect
around it.

So my question is a) can I pool with POJO and b) is it far better to
have the container do it?

Note I generate and execute my own SQL - no real entity beans here.

thanks

Tim
 
M

Marc E

I can tell you that pooling with POJO is pretty easy. I've been using c3p0
pool for over a year now with much success. No need for jndi or
anything...just straight up driver/url stuff that you pass when you
configure the pool and it handles the rest.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top