activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dejan Bosanac (JIRA)" <>
Subject [jira] Commented: (AMQ-2495) Issue with JMSAppender using Activemq
Date Wed, 18 Nov 2009 15:08:52 GMT


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:
>             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 ( 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 [] using context classloader sun.misc.Launcher$AppClassLoader@11b86e7.

>      [java] log4j: Using URL [file:/C:/apache/apache-activemq-5.3.0/example/target/classes/]
for automatic log4j configuration. 
>      [java] log4j: Reading configuration from URL file:/C:/apache/apache-activemq-5.3.0/example/target/classes/

>      [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.

View raw message