You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Dejan Bosanac (JIRA)" <ji...@apache.org> on 2009/11/18 16:08:52 UTC

[jira] Commented: (AMQ-2495) Issue with JMSAppender using Activemq

    [ https://issues.apache.org/activemq/browse/AMQ-2495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55552#action_55552 ] 

Dejan Bosanac commented on AMQ-2495:
------------------------------------

Just did some research on the topic. The problem is that 5.3.0 added some logging in the BrokerInfo class which is used during connection init, so log4j and amq lock each other.

Some possible solutions:

* avoid using logs in during connection init
* see is JmsAppender can be improved to handle this kind of situations

More research will be done to find the best solution and workaround.



> Issue with JMSAppender using Activemq 
> --------------------------------------
>
>                 Key: AMQ-2495
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2495
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JMS client
>    Affects Versions: 5.3.0
>         Environment: jdk1.6, log4j 1.2.15, activemq 5.3.0
>            Reporter: Jeffrey Yin
>            Priority: Blocker
>
> Tried to use JMSAppender with Activemq 5.3.0. The program stucked at line: 
> topicSession = topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE); 
> Even the default example (Log4jJMSAppenderExample.java) comes with the activemq 5.3 has the same problem. 
>  Below is the output when I run the default example with the log4j.debug flag on:
> After start the activemq server, I tried to run the jmsappender example comes with activemq version 5.3. The program hangs, below is the debug info: 
> C:\apache\apache-activemq-5.3.0\example>ant log4j-jms 
> Buildfile: build.xml 
> init: 
> compile: 
> log4j-jms: 
>      [echo] Running a Log4j JMS Appender example 
>      [java] log4j: Trying to find [log4j-jms.properties] using context classloader sun.misc.Launcher$AppClassLoader@11b86e7. 
>      [java] log4j: Using URL [file:/C:/apache/apache-activemq-5.3.0/example/target/classes/log4j-jms.properties] for automatic log4j configuration. 
>      [java] log4j: Reading configuration from URL file:/C:/apache/apache-activemq-5.3.0/example/target/classes/log4j-jms.properties 
>      [java] log4j: Parsing for [root] with value=[INFO, stdout, jms]. 
>      [java] log4j: Level token is [INFO]. 
>      [java] log4j: Category root set to INFO 
>      [java] log4j: Parsing appender named "stdout". 
>      [java] log4j: Parsing layout options for "stdout". 
>      [java] log4j: Setting property [conversionPattern] to [%d %-5p %c - %m%n]. 
>      [java] log4j: End of parsing for "stdout". 
>      [java] log4j: Parsed "stdout" options. 
>      [java] log4j: Parsing appender named "jms". 
>      [java] log4j: Setting property [initialContextFactoryName] to [org.apache.activemq.jndi.ActiveMQInitialContextFactory]. 
>      [java] log4j: Setting property [topicBindingName] to [logTopic]. 
>      [java] log4j: Setting property [topicConnectionFactoryBindingName] to [ConnectionFactory]. 
>      [java] log4j: Setting property [providerURL] to [tcp://localhost:61616]. 
>      [java] log4j: Getting initial context. 
>      [java] log4j: Looking up [ConnectionFactory] 
>      [java] log4j: About to create TopicConnection. 
>      [java] log4j: Creating TopicSession, non-transactional, in AUTO_ACKNOWLEDGE mode. 
> No error or exception showed, the program just hangs over here.

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