You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "fabrizio giustina (JIRA)" <ji...@apache.org> on 2007/02/23 22:18:05 UTC

[jira] Created: (JCR-765) DatabasePersistenceManager: don't log exceptions for each statement when a connection needs to be reestablished

DatabasePersistenceManager: don't log exceptions for each statement when a connection needs to be reestablished
---------------------------------------------------------------------------------------------------------------

                 Key: JCR-765
                 URL: https://issues.apache.org/jira/browse/JCR-765
             Project: Jackrabbit
          Issue Type: Improvement
          Components: core
    Affects Versions: 1.2.2
            Reporter: fabrizio giustina
             Fix For: 1.2.3


This is just a "cosmetic" fix: when reestablishConnection() is called in DatabasePersistenceManager all the statements are closed but if an error occurs two exceptions are logged for each statement.
Since reestablishConnection() is already called when an exception has been caught and its only purpose is to cleanup an existing connection and to reopen a new one is pretty common that the connection is already not valid and that each statement close will throw an exception.

For example if the connection has been broken due to a network problem DatabasePersistenceManager  will log *40* exceptions (2 for each statement) before trying to establish a connection, and that's pretty annoying (expecially if you use a mail appender for log4j....)


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


[jira] Resolved: (JCR-765) DatabasePersistenceManager: don't log exceptions for each statement when a connection needs to be reestablished

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting resolved JCR-765.
-------------------------------

    Resolution: Fixed

Committed the patch in revision 511478 with a minor comment change (mentioned this issue to explain the code).

Thanks for the improvement idea and the patch! I tagged this for the 1.3 release instead of 1.2.3, since the issue is not really a bug that would need an immediate fix.

> DatabasePersistenceManager: don't log exceptions for each statement when a connection needs to be reestablished
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-765
>                 URL: https://issues.apache.org/jira/browse/JCR-765
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: core
>            Reporter: fabrizio giustina
>         Assigned To: Jukka Zitting
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: statementclose.diff
>
>
> This is just a "cosmetic" fix: when reestablishConnection() is called in DatabasePersistenceManager all the statements are closed but if an error occurs two exceptions are logged for each statement.
> Since reestablishConnection() is already called when an exception has been caught and its only purpose is to cleanup an existing connection and to reopen a new one is pretty common that the connection is already not valid and that each statement close will throw an exception.
> For example if the connection has been broken due to a network problem DatabasePersistenceManager  will log *40* exceptions (2 for each statement) before trying to establish a connection, and that's pretty annoying (expecially if you use a mail appender for log4j....)

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


[jira] Updated: (JCR-765) DatabasePersistenceManager: don't log exceptions for each statement when a connection needs to be reestablished

Posted by "fabrizio giustina (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

fabrizio giustina updated JCR-765:
----------------------------------

    Attachment: statementclose.diff

simple patch that simply remove the logException() at statement close during reestablishConnection()

> DatabasePersistenceManager: don't log exceptions for each statement when a connection needs to be reestablished
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-765
>                 URL: https://issues.apache.org/jira/browse/JCR-765
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.2.2
>            Reporter: fabrizio giustina
>             Fix For: 1.2.3
>
>         Attachments: statementclose.diff
>
>
> This is just a "cosmetic" fix: when reestablishConnection() is called in DatabasePersistenceManager all the statements are closed but if an error occurs two exceptions are logged for each statement.
> Since reestablishConnection() is already called when an exception has been caught and its only purpose is to cleanup an existing connection and to reopen a new one is pretty common that the connection is already not valid and that each statement close will throw an exception.
> For example if the connection has been broken due to a network problem DatabasePersistenceManager  will log *40* exceptions (2 for each statement) before trying to establish a connection, and that's pretty annoying (expecially if you use a mail appender for log4j....)

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


[jira] Updated: (JCR-765) DatabasePersistenceManager: don't log exceptions for each statement when a connection needs to be reestablished

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting updated JCR-765:
------------------------------

        Fix Version/s:     (was: 1.2.3)
                       1.3
             Assignee: Jukka Zitting
             Priority: Minor  (was: Major)
    Affects Version/s:     (was: 1.2.2)

> DatabasePersistenceManager: don't log exceptions for each statement when a connection needs to be reestablished
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-765
>                 URL: https://issues.apache.org/jira/browse/JCR-765
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: core
>            Reporter: fabrizio giustina
>         Assigned To: Jukka Zitting
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: statementclose.diff
>
>
> This is just a "cosmetic" fix: when reestablishConnection() is called in DatabasePersistenceManager all the statements are closed but if an error occurs two exceptions are logged for each statement.
> Since reestablishConnection() is already called when an exception has been caught and its only purpose is to cleanup an existing connection and to reopen a new one is pretty common that the connection is already not valid and that each statement close will throw an exception.
> For example if the connection has been broken due to a network problem DatabasePersistenceManager  will log *40* exceptions (2 for each statement) before trying to establish a connection, and that's pretty annoying (expecially if you use a mail appender for log4j....)

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