[jboss-user] [Installation, Configuration & Deployment] - Re: AS 4.0.5 GA complains about unclosed connections

PeterJ do-not-reply at jboss.com
Wed Jan 17 14:35:38 EST 2007


You code should look like:

DataSource ds = null;
  | try {
  |  ds = ctx.lookup(...);
  |  --do database stuff --
  | } finally {
  |  if (ds != null) ds.close();
  | }

If you don't close the datasource before exiting the method, you get that warning.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4002989#4002989

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4002989



More information about the jboss-user mailing list