Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / May 2006

Tip: Looking for answers? Try searching our database.

pooling the JDBC connection

Thread view: 
timasmith@hotmail.com - 23 May 2006 00:34 GMT
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
Marc E - 23 May 2006 01:09 GMT
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.

> Hi,
>
[quoted text clipped - 23 lines]
>
> Tim


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.