Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

de.danet.an.util.log4j
Class EJBAppender  view EJBAppender download EJBAppender.java

java.lang.Object
  extended byorg.apache.log4j.AppenderSkeleton
      extended byde.danet.an.util.log4j.EJBAppender
All Implemented Interfaces:
org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler

public class EJBAppender
extends org.apache.log4j.AppenderSkeleton

This class implements the Appender interface. The EJBAppender forwards the log message to the EJBSink bean.


Field Summary
private  java.lang.String beanName
          The name of the logging session bean.
private  EJBSink ejbSink
          The remote interface of the session bean.
 
Fields inherited from class org.apache.log4j.AppenderSkeleton
closed, errorHandler, headFilter, layout, name, tailFilter, threshold
 
Constructor Summary
EJBAppender()
          Constructor for the EJBAppender object.
 
Method Summary
 void append(org.apache.log4j.spi.LoggingEvent event)
          Forwards the message to the EJBSink bean.
 void close()
          Internal method.
 boolean requiresLayout()
          Internal method.
 void setEjbJNDIName(java.lang.String beanName)
          Sets the JNDI name of the session bean.
 
Methods inherited from class org.apache.log4j.AppenderSkeleton
activateOptions, 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
 

Field Detail

beanName

private java.lang.String beanName
The name of the logging session bean.


ejbSink

private EJBSink ejbSink
The remote interface of the session bean.

Constructor Detail

EJBAppender

public EJBAppender()
Constructor for the EJBAppender object.

Method Detail

setEjbJNDIName

public void setEjbJNDIName(java.lang.String beanName)
Sets the JNDI name of the session bean.


append

public void append(org.apache.log4j.spi.LoggingEvent event)
Forwards the message to the EJBSink bean.


close

public void close()
Internal method. Close the database connection and flush the buffer.


requiresLayout

public boolean requiresLayout()
Internal method. Returns true, you may define your own layout...