org.apache.activemq.util
Class JndiJmsLogAppender

java.lang.Object
  extended by org.apache.log4j.AppenderSkeleton
      extended by org.apache.activemq.util.JmsLogAppenderSupport
          extended by org.apache.activemq.util.JndiJmsLogAppender
All Implemented Interfaces:
Appender, OptionHandler

public class JndiJmsLogAppender
extends JmsLogAppenderSupport

A JMS 1.1 log4j appender which uses JNDI to locate a JMS ConnectionFactory to use for logging events.


Field Summary
 
Fields inherited from class org.apache.activemq.util.JmsLogAppenderSupport
JMS_PUBLISH_ERROR_CODE
 
Fields inherited from class org.apache.log4j.AppenderSkeleton
closed, errorHandler, headFilter, layout, name, tailFilter, threshold
 
Constructor Summary
JndiJmsLogAppender()
           
 
Method Summary
protected  Connection createConnection()
           
protected  InitialContext createInitialContext()
           
 String getInitialContextFactoryName()
           
 String getJndiName()
           
 String getPassword()
           
 String getProviderURL()
           
 String getSecurityCredentials()
           
 String getSecurityPrincipalName()
           
 String getUrlPkgPrefixes()
           
 String getUserName()
           
 void setInitialContextFactoryName(String initialContextFactoryName)
           
 void setJndiName(String jndiName)
           
 void setPassword(String password)
           
 void setProviderURL(String providerURL)
           
 void setSecurityCredentials(String securityCredentials)
           
 void setSecurityPrincipalName(String securityPrincipalName)
           
 void setUrlPkgPrefixes(String urlPkgPrefixes)
           
 void setUserName(String userName)
           
 
Methods inherited from class org.apache.activemq.util.JmsLogAppenderSupport
activateOptions, append, close, createMessage, createProducer, createSession, getConnection, getDestination, getProducer, getSession, requiresLayout, setConnection, setProducer, setSession
 
Methods inherited from class org.apache.log4j.AppenderSkeleton
addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JndiJmsLogAppender

public JndiJmsLogAppender()
Method Detail

getJndiName

public String getJndiName()

setJndiName

public void setJndiName(String jndiName)

getUserName

public String getUserName()

setUserName

public void setUserName(String userName)

getPassword

public String getPassword()

setPassword

public void setPassword(String password)

getInitialContextFactoryName

public String getInitialContextFactoryName()

setInitialContextFactoryName

public void setInitialContextFactoryName(String initialContextFactoryName)

getProviderURL

public String getProviderURL()

setProviderURL

public void setProviderURL(String providerURL)

getUrlPkgPrefixes

public String getUrlPkgPrefixes()

setUrlPkgPrefixes

public void setUrlPkgPrefixes(String urlPkgPrefixes)

getSecurityPrincipalName

public String getSecurityPrincipalName()

setSecurityPrincipalName

public void setSecurityPrincipalName(String securityPrincipalName)

getSecurityCredentials

public String getSecurityCredentials()

setSecurityCredentials

public void setSecurityCredentials(String securityCredentials)

createConnection

protected Connection createConnection()
                               throws JMSException,
                                      NamingException
Specified by:
createConnection in class JmsLogAppenderSupport
Throws:
JMSException
NamingException

createInitialContext

protected InitialContext createInitialContext()
                                       throws NamingException
Throws:
NamingException


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.