You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Peter Cipriano <ci...@us.ibm.com> on 2003/10/17 18:40:30 UTC

JMSAppender with WSAD 5.1

I have been trying to get the JMSAppender to work for quite some time now 
on the WSAD 5.1 Test Environment but cannot get the 
TopicConnectionFactoryBindingName correct (I think).  I have a MDB set up 
and I know works because I can acces it using:

topicConnFactory = 
(TopicConnectionFactory)ServiceLocator.getInstance().lookup("jms/TESTTCF");
topicConnection = topicConnFactory.createTopicConnection();
topicSession = topicConnection.createTopicSession( false, TopicSession.AUTO_ACKNOWLEDGE);
topic = (Topic)ServiceLocator.getInstance().lookup("jms/TESTTOPIC");

My Queue is named MYTOPIC

I have tried alot of different syntax and would list them all but that 
would take all day. I received mostly, "Name not Found" and "Class Cast" 
errors.  I will rerun some of the types and paste in the error messages 
anyone would like more info

The following setup causes a " java.lang.ClassCastException: com.ibm.mq.jms.MQTopic at org.apache.log4j.net.JMSAppender.activateOptions(JMSAppender.java:196)" exception

# Log4j Properties
#------------------

log4j.rootLogger= DEBUG, JMS1 
log4j.appender.JMS1                             = 
org.apache.log4j.net.JMSAppender
log4j.appender.JMS1.TopicBindingName    = jms/TESTTCF
log4j.appender.JMS1.TopicConnectionFactoryBindingName = jms/TESTTOPIC
log4j.appender.JMS1.layout                      = 
org.apache.log4j.PatternLayout 
log4j.appender.JMS1.layout.ConversionPattern    = [%-20d{M/d/yy 
HH:mm:ss.sss z}] %-25t:%-5p %-30c - %m%n

Thanks for your time,

Peter Cipriano