portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Sean Taylor <da...@bluesunrise.com>
Subject Re: WAS 6.1 JDBC connection leak with Jetspeed
Date Tue, 04 Dec 2007 00:16:18 GMT

On Nov 29, 2007, at 8:34 AM, Keshavan, Rango wrote:

>   void releaseConnection(Connection con)
>     {
>         try
>         {
>             if (con != null) con.close();
>         } catch (SQLException e)
>         {
>         }
>     }


If I were to add a rollback in releaseConnection it would run for  
even successful cases
What if instead:

         }
         catch (SQLException e)
         {
             // todo log to standard Jetspeed logger
             e.printStackTrace();
             try
             {
                 con.rollback();
             }
             catch (Exception e2) {}
         }
         finally
         {
... same as usual
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message