Context:
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
JMS module.
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
'loggingBrokerPlugin'.

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):
- activemq-client-5.15.2.jar
- hawtbuf-1.11.jar
- slf4j-api-1.7.21.jar
- 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.
- slf4j-log4j12-1.7.21.jar
- log4j-1.2.17.jar
- log4j.properties (log4j config file)

In log4j.properties I added this line and corresponding 'AMQ' (file)
appender:
log4j.logger.org.apache.activemq=debug, AMQ

-> 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)
required here? 
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,
Patrick

Reference: 
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:
https://community.oracle.com/thread/3903705

Following also has relevant principles for Weblogic as ActiveMQ client
setup, but describes a JMS Bridge instead of JMS Foreign Server:
https://fcosfc.wordpress.com/2015/06/11/setting-up-a-jms-bridge-between-weblogic-and-activemq/
 




--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Reply via email to