aspose file tools*
The moose likes Websphere and the fly likes Connection from DataSource Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Connection from DataSource" Watch "Connection from DataSource" New topic
Author

Connection from DataSource

Madan Kulkarni
Greenhorn

Joined: Sep 23, 2002
Posts: 5
Hi,
I have a question regarding the JDBC Connection object from DataSource.

I have created the connection pooling in WAS 4.06 Application Server thr' administrative consol.

In my ConnectionWraper class, I am searching the data source object thr' JNDI search and then using datasource.getConnection() method to get the JDBC Connection object to perform Database SQLs.

When I complete the SQL execution, I am closing the resultset, statement and connection objects in respective methods.

Now, my question is, when I am closing the connection object with connection.close() method, will this connection object return to the connection pool or not?


Java Programmer
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29275
    
140

Madan,
Yes, the connection is then returned to the pool.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection from DataSource
 
Similar Threads
jdbc objects in different JVM's
Passing References and Passing Values
Design for DBInterface -- Feedback for proposed design
JDBC connection pool
Is this good approach to design DB i/f?