Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

DataSource and Connection Pooling

 
alex reznik
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, everybody
I have a webapp that uses several JavaBeans, one on which is a DBConnection bean and is called from other beans to execute queries, updates, etc.
I tried to register a DataSource on Tomcat 4 and call it from the bean, but it looks like since its not going from jsp, the DataSource is outside the Context. I am aware that there is a way to do it thru servlets, but what if i need to do some server-side processing only.
Anyway, my question is:"has anybody successfully set up a bean that does a connection thru DataSource pooling and is called from other classes on the server?"
Thanks in advance
Alex
 
Hartmut Ludwig
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check this out!
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!