aspose file tools*
The moose likes JDBC and the fly likes Do you have to have a datasource to allow connection pooling? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Do you have to have a datasource to allow connection pooling?" Watch "Do you have to have a datasource to allow connection pooling?" New topic
Author

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

Fergus Red
Ranch Hand

Joined: Apr 25, 2002
Posts: 42
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

Joined: Sep 27, 2002
Posts: 71
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



John Carnell<br />Principal Architect<br /> <br />Netchange, LLC<br />1161 HillCrest Heights<br />Green Bay, WI 54313<br /> <br />john.carnell@netchange.us<br /> <br /> <br />Author of <a href="http://www.amazon.com/exec/obidos/ASIN/159059228X/ref=jranch-20" target="_blank" rel="nofollow">Pro Jakarta Struts, Second Edition</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Do you have to have a datasource to allow connection pooling?
 
Similar Threads
Invoking Data Source Remotely
Questions Regarding Connection Pooling
Connection Pooling samples
Web application goes extremely slow with more than 5 users logged in
Help for Connection Pool