• Post Reply Bookmark Topic Watch Topic
  • New Topic

question about DBCP example  RSS feed

Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am a little new to DBCP and trying to figure my way out. I was looking at the the following example code at DBCP Overview

In code, that might look like this:

I had trouble comprehending why the connectionFactory and poolableConnectionFactory (which uses the connectionFactory) initialized if its never used? Am I missing something here.
If all the datasource requires is connectionPool why cant we just create connectionPool and give it to the dataSource something like this

Am I missing something here?

And also is this implementation of the dataSource thread safe? can I have multiple threads call datasource.getConnection();

Any response would be appreciated


  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!