Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Do you have to have a datasource to allow connection pooling?

 
Fergus Red
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I just wondered - Do you need a datasource to exist before you canuse connection pooling?
I just can't seem to get my datasources created correctly (I'm using Jrun 3.1 web application server) and SQL Server database.
I can get my MSSQL Server 200 JDBC driver to work without a Datasource, so I thought - if I can use this with connection pooling then that would be great.
Cheers for any help
 
John Carnell
Author
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Fergus Red:
Hi, I just wondered - Do you need a datasource to exist before you canuse connection pooling?

Hi Fergus,
It is going to be dependent on the environment you are running in and the connection pooling API provided. Usually, you are going to use the DataSource object to connect to the Application Server or Servlet container who will then return a connection defined in a deployment descriptor.
For instance, if you use JBoss you are going to configure a datasource in JBoss and the DataSource acts as a middleman to hand out connections in a connection pool being managed by JBoss.
I am not too familiar with JRun, but it sounds like you need to use the DataSource object to get access to the connection pool managed by JRun.
The other alternative of you have is to use a database pool manager that is independent of the application server. For instance, the struts development framework provides a rudimentary connection pool implementation and the Oracle JDBC drivers give you the ability to do connection pooling without having to tie them into a DataSource talking to an app server/servlet container.
Hope that helps.
Thanks,
John Carnell

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic