You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juddi.apache.org by "Kurt T Stam (JIRA)" <ju...@ws.apache.org> on 2009/05/14 05:24:46 UTC

[jira] Created: (JUDDI-231) Fix potential db connection leaks

Fix potential db connection leaks
---------------------------------

                 Key: JUDDI-231
                 URL: https://issues.apache.org/jira/browse/JUDDI-231
             Project: jUDDI
          Issue Type: Bug
          Components: core
    Affects Versions: 3.0alpha
         Environment: any 
            Reporter: Kurt T Stam
            Assignee: Kurt T Stam
             Fix For: 3.0beta


We should follow the following template where connections are close in a finally block.

try
{
    tx.begin();

    Product product = new Product("Sony Discman", "A standard discman from Sony", 49.99);
    em.persist(product);

    tx.commit();
}
finally
{
    if (tx.isActive())
    {
        tx.rollback();
    }

    em.close();
}

most of the code that needs fixing lives in the org.apache.juddi.api.impl package.





-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (JUDDI-231) Fix potential db connection leaks

Posted by "Kurt T Stam (JIRA)" <ju...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/JUDDI-231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kurt T Stam closed JUDDI-231.
-----------------------------

    Resolution: Fixed

> Fix potential db connection leaks
> ---------------------------------
>
>                 Key: JUDDI-231
>                 URL: https://issues.apache.org/jira/browse/JUDDI-231
>             Project: jUDDI
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.0alpha
>         Environment: any 
>            Reporter: Kurt T Stam
>            Assignee: Kurt T Stam
>             Fix For: 3.0beta
>
>
> We should follow the following template where connections are close in a finally block.
> try
> {
>     tx.begin();
>     Product product = new Product("Sony Discman", "A standard discman from Sony", 49.99);
>     em.persist(product);
>     tx.commit();
> }
> finally
> {
>     if (tx.isActive())
>     {
>         tx.rollback();
>     }
>     em.close();
> }
> most of the code that needs fixing lives in the org.apache.juddi.api.impl package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.