Hey all,
This forum is great! Lots of killer info. Thanks to all the gurus... I have aquick
question regaurding the connection pooling in version 3.0.4...
I have created a DB connection to MSSQL server 2k and I set the connection pool
parameters in the service.xml as needed. My question is do I need to do anything
special to use the pool? I am doing a JNDI look up on the DS. Can I assume that it is
pooling....
Here is my code....
DataSource ds =
(DataSource) new InitialContext().lookup("java:/MSSQLDS");
Connection con = ds.getConnection();
try {
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("select * from TEST");
while (rs.next()) {
returnVal = (rs.getString("NAMe"));
}
} catch (Exception cnfe) {
System.err.println("Unable to load MSSQL database driver!");
System.err.println("ClassNotFoundException: " +
cnfe.getMessage());
} finally {
con.close();
}
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3823208#3823208
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3823208
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user