logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LOG4J2-367) JMS appenders send two messages for one append
Date Fri, 23 Aug 2013 13:11:53 GMT

     [ https://issues.apache.org/jira/browse/LOG4J2-367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gary Gregory updated LOG4J2-367:
--------------------------------

    Description: 
When using the JMSTopicAppender or JMSQueueAppender calls to append result in JMSTopicManager
calling send twice.

I can see that the code was refactored to support cleanup after exceptions, however the original
call to send was not removed after a try/catch was introduced. 
{noformat}
Index: core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicManager.java
===================================================================
--- core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicManager.java	(revision 1516828)
+++ core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicManager.java	(revision )
@@ -104,7 +104,7 @@
         if (info == null) {
             info = connect(context, factoryBindingName, topicBindingName, userName, password,
false);
         }
-        super.send(object, info.session, info.publisher);
+
         try {
             super.send(object, info.session, info.publisher);
         } catch (final Exception ex) {
{noformat}


  was:
When using the JMSTopicAppender or JMSQueueAppender calls to append result in JMSTopicManager
calling send twice.

I can see that the code was refactored to support cleanup after exceptions, however the original
call to send was not removed after a try/catch was introduced. 

Index: core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicManager.java
===================================================================
--- core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicManager.java	(revision 1516828)
+++ core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicManager.java	(revision )
@@ -104,7 +104,7 @@
         if (info == null) {
             info = connect(context, factoryBindingName, topicBindingName, userName, password,
false);
         }
-        super.send(object, info.session, info.publisher);
+
         try {
             super.send(object, info.session, info.publisher);
         } catch (final Exception ex) {

    
> JMS appenders send two messages for one append
> ----------------------------------------------
>
>                 Key: LOG4J2-367
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-367
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 2.0-beta4, 2.0-beta5, 2.0-beta6, 2.0-beta7, 2.0-beta8
>            Reporter: David Parry
>              Labels: patch
>             Fix For: 2.0-beta9
>
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> When using the JMSTopicAppender or JMSQueueAppender calls to append result in JMSTopicManager
calling send twice.
> I can see that the code was refactored to support cleanup after exceptions, however the
original call to send was not removed after a try/catch was introduced. 
> {noformat}
> Index: core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicManager.java
> ===================================================================
> --- core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicManager.java	(revision
1516828)
> +++ core/src/main/java/org/apache/logging/log4j/core/net/JMSTopicManager.java	(revision
)
> @@ -104,7 +104,7 @@
>          if (info == null) {
>              info = connect(context, factoryBindingName, topicBindingName, userName,
password, false);
>          }
> -        super.send(object, info.session, info.publisher);
> +
>          try {
>              super.send(object, info.session, info.publisher);
>          } catch (final Exception ex) {
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message