You should get the connection from the pool when you need it and not hang onto it.
Make sure you close it before returning from a session bean method.
void mymethod()
| {
| Object obj = (DataSource)ctx.lookup(jndiName);
| Connection conn = (Connection) ds.getConnection();
| try
| {
| //Use conn
| }
| catch(Exception e)
| {
| }
| finally
| {
| conn.close();
| }
| }
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3839713#3839713
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839713
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user