ActiveMQ 5.15 - How to enable activemq-client's logging for troubleshooting of Messagedriven bean deployed in Weblogic 12.1.3 JEE 6 container
I am implementing JMS messaging, having a javax.jms.MessageListener
implementing class (MDB) consume messages that are dispatched from a an
ActiveMQ-provided JMS queue on an eexternal broker.
In weblogic, this queue is configured as part of a 'JMS Foreign Server': A
'foreign' destination in WLS alongside a ‘foreign’ connection factory as
part of a JMS Foreign Server definition which is (the only) part of a WLS
The foreign connection factory configured uses as 'JNDI Initial Context
Factory' the 'org.apache.activemq.jndi.ActiveMQInitialContextFactory' and
it uses as the JNDI Connection URL 'tcp://localhost:31313?trace=true', the
adress of the broker.
Furthermore the flag 'xa=true' is set on connection factory, because we're
working in a Java EE container context.
Generally this JMS communication works, but because of some recurring
acknowledgment issues i would need logging from the ActiveMQ *client*
classes. On the broker logging is set up correctly already using the
My question is:
How do i enable activemq-client's logging for activemq's components used in
the Weblogic Foreign Server definition?
Done so far:
I have added the following classes to weblogic server instance's classpath,
as required for JMS Foreign Server operation (see 'Reference' at bottom):
- jndi.properties (contains local <> remote JNDI mappings)
I also added the following to weblogic server instance's classpath, as we
are using log4j generally as logging backend.
- log4j.properties (log4j config file)
In log4j.properties I added this line and corresponding 'AMQ' (file)
-> However, still no logfile is created for AMQ appender. Meanwhile in the
server instance logfile by weblogic, I do see the JMS managed objects
(connection factory, destinations) being constructed and registered in JNDI,
and messages are consumed and acknowledged.
But i haven't got the logging from ActiveMQ's own classes on the actual
handling of messages thru the client.
What am i missing or doing wrong? Is a log4j backend library (as i added in)
I hope someone can help me with some hints for this on the combo of ActiveMQ
(5.15+) and WLS (12.1+).
Thank you in advance,
The following thread was important for us, for defining ActiveMQ-specific
Foreign Server definition (instead of resource adapter) and registering
‘foreign’ queue and XA-transacted connection factory into local WLS
instance’s JNDI for reference from MDB: