logging using JMSAppender

Hello Community,

im trying to achieve logging using JMSAppender, in this regards need some help.

I was successfully able to set the the Topic and able to send mesgs to configured topic using inbuilt JMS send methods.

I want to
1) set the TOPIC information in the log4j.xml file - Please help validate if the configuration provided is valid?

<?xml version="1.0" encoding="UTF-8" ?>

<log4j:configuration xmlns:log4j=“http://jakarta.apache.org/log4j/”>

    <appender name="jmsapp" class="org.apache.log4j.net.JMSAppender">
                <param name="InitialContextFactoryName" value="com.webmethods.jms.naming.WmJmsNamingCtxFactory" />
                <param name="ProviderURL" value="wmjmsnaming://ESB@localhost:6749" />
                <param name="TopicBindingName" value="LOG4j_Topic" />
                <param name="TopicConnectionFactoryBindingName" value="TopicConnectionFactory"/>

                
				<layout class="org.apache.log4j.PatternLayout">
					<param name="ConversionPattern" value="%d %-5p [%t] - %m%n" />
                </layout>
    </appender>

	
    <logger name="com.webmethods.jms">
            <appender-ref ref="jmsapp" />
    </logger>
	
    <root>
            <priority value="DEBUG" />
            <appender-ref ref="jmsapp" />
    </root>

</log4j:configuration>

[b]2)write a custom java service which takes care of loading the JMS appender details from log4j.xml file after the Log4J is initialized with provided TOPIC configuration

  • used DOMConfigurator to load the config : but java service fails with error (java.lang.reflect.InvocationTargetException: javax/jms/Connection)[/b]

3) how to finally pump the mesgs to TOPIC?

Your help/inputs are highly appreciated

Regards
Ram

forum, please help

Thanks