portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keshavan, Rango" <rango.kesha...@fmr.com>
Subject RE: WAS 6.1 JDBC connection leak with Jetspeed
Date Tue, 04 Dec 2007 00:50:22 GMT
Sure, that's fine, but a rollback after a commit is pretty much a noop,
anyways, with slight perf. Issues.

:)

Thanks!



-----Original Message-----
From: David Sean Taylor [mailto:david@bluesunrise.com] 
Sent: Monday, December 03, 2007 7:16 PM
To: Jetspeed Developers List
Subject: Re: WAS 6.1 JDBC connection leak with Jetspeed



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

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message