[jboss-user] [Messaging, JMS & JBossMQ] - Re: Log4j and JMS Appender Using ActiveMQ

jhowell@redhat.com do-not-reply at jboss.com
Tue Dec 4 00:02:12 EST 2007


Sorry one more time...
I have not done it, but I can imagine that it's pretty easy.  You just set up ActiveMQ like it says in the following instructions.  http://wiki.jboss.org/wiki/Wiki.jsp?page=ActiveMqIntegration

Then set up a topic you want to use as logging as an AdminObject(the example above set's up Queue's A-D, you can set a topic up the same way.  
ex..

<mbean code="org.jboss.resource.deployment.AdminObject" name="activemq.topic:name=Logging"> 
  | <attribute name="JNDIName">activemq/topic/Logging</attribute> 
  | <depends optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='activemq-ra-4.0.1.rar'</depends> 
  | <attribute name="Type">javax.jms.Topic</attribute> 
  | <attribute name="Properties"> PhysicalName=topic.Logging</attribute>  
  | </mbean>

When configuring the jms appender for log4j, you would use the following arguments...

<appender name="JMS" class="org.apache.log4j.net.JMSAppender">
  |       <param name="TopicConnectionFactoryBindingName"
  | value="activemq/TopicConnectionFactory"/>
  |       <param name="TopicBindingName" value="activemq/topic/Logging" />
  |   </appender>

http://forum.java.sun.com/thread.jspa?threadID=666018&tstart=0
Hope this gives you something to go on...
Cheers, Jay:)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4110076#4110076

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4110076



More information about the jboss-user mailing list