Syslog White Paper FAQ Examples JavaDoc Classloader
Protomatter Software v1.1.7

com.protomatter.syslog.xml
Class JMSLog_Helper

java.lang.Object
  |
  +--com.protomatter.syslog.xml.BasicLogger_Helper
        |
        +--com.protomatter.syslog.xml.JMSLog_Helper
All Implemented Interfaces:
XMLConfigHelper

public class JMSLog_Helper
extends BasicLogger_Helper

XML configuration helper for JMSLog.


Constructor Summary
JMSLog_Helper()
           
 
Method Summary
 void configure(java.lang.Object o, org.jdom.Element e)
          Configure this logger given the XML element.
 org.jdom.Element getConfiguration(java.lang.Object o, org.jdom.Element element)
          Encode the given object's configuration into the given XML element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMSLog_Helper

public JMSLog_Helper()
Method Detail

configure

public void configure(java.lang.Object o,
                      org.jdom.Element e)
               throws SyslogInitException
Configure this logger given the XML element. The <Logger> element should look like this:



  <Logger class="com.protomatter.syslog.JMSLog" >

    <!--
     Config params from BasicLogger_Helper
     can get inserted here.
    -->

    <factoryName>JNDI-name</factoryName>
    <topicName>JNDI-name</topicName>

    <connectionUser>UserName</connectionUser>
    <connectionPass>Password</connectionPass>

    <persistent>true|false</persistent>
    <ttl>TimeToLive</ttl>
    <priority>Priority</priority>

  </Logger>
  

Element
name value required
topicName The JNDI location of a JMS Topic to send messages to. yes
factoryName The JNDI location of a JMS TopicConnectionFactory to use to create the JMS session and publisher. yes
connectionUser If this property is present, it is used as the username to use in creating the JMS connection. no
connectionPass If this property is present, it is used as the password to use in creating the JMS connection. no
ttl Message time to live in milliseconds. Default is 30 minutes. no
priority Message priority. Default is 5. no
persistent Should persistent JMS be used? Default is false. no

For example: If you are using BEA WebLogic, you can add the following lines to your weblogic.properties file to configure a JMS topic and connection factory:


  weblogic.jms.topic.syslog=jms.topic.syslog
  weblogic.jms.connectionFactoryName.syslog=jms.connection.syslogFactory  
  

Then set "topicName" to "jms.topic.syslog" and "factoryName" to "jms.connection.syslogFactory". You will be able to route syslog messages through that JMS topic to a remote machine that is running the SyslogServer program.

Overrides:
configure in class BasicLogger_Helper
Following copied from class: com.protomatter.syslog.xml.BasicLogger_Helper
See Also:
SimpleSyslogTextFormatter_Helper.configure(Object,Element), HTMLSyslogTextFormatter_Helper.configure(Object,Element), SimpleLogPolicy_Helper.configure(Object,Element), PerClassPolicy_Helper.configure(Object,Element)

getConfiguration

public org.jdom.Element getConfiguration(java.lang.Object o,
                                         org.jdom.Element element)
Description copied from interface: XMLConfigHelper
Encode the given object's configuration into the given XML element.
Overrides:
getConfiguration in class BasicLogger_Helper

Protomatter Software v1.1.7
Copyright 1998-2002 Nate Sammons

Protomatter Software v1.1.7 http://protomatter.sourceforge.net/1.1.7