org.apache.log4j.joran.action
Class JndiSubstitutionPropertyAction
java.lang.Object
|
+--org.apache.log4j.spi.ComponentBase
|
+--org.apache.log4j.joran.action.Action
|
+--org.apache.log4j.joran.action.JndiSubstitutionPropertyAction
- All Implemented Interfaces:
- Component
- public class JndiSubstitutionPropertyAction
- extends Action
This action looks up JNDI properties specified in the configuration
file and adds them to the Joran ExecutionContext
. The
element in the configuration file should have an attribute called
"name". This attribute will be the key to the naming context lookup,
as well as the key to the ExecutionContext
properties. If a value
is found whose name matches the given name, it will be placed
in the ExecutionContext's properties.
- Author:
- Yoav Shapira
Method Summary |
void |
begin(org.apache.log4j.joran.spi.ExecutionContext ec,
String name,
Attributes attributes)
Called when the parser first encounters an element. |
void |
end(org.apache.log4j.joran.spi.ExecutionContext ec,
String name)
|
protected void |
findNamingContext()
Creates the naming context. |
protected Context |
getNamingContext()
Returns the naming context for lookups. |
JndiSubstitutionPropertyAction
public JndiSubstitutionPropertyAction()
getNamingContext
protected Context getNamingContext()
- Returns the naming context for lookups.
- Returns:
- The context (may be null)
findNamingContext
protected void findNamingContext()
throws NamingException
- Creates the naming context. This is an expensive
operation.
- Throws:
NamingException
- If an error occurs
begin
public void begin(org.apache.log4j.joran.spi.ExecutionContext ec,
String name,
Attributes attributes)
- Description copied from class:
Action
- Called when the parser first encounters an element.
The return value indicates whether child elements should be processed. If
the returned value is 'false', then child elements are ignored.
- Overrides:
begin
in class Action
- See Also:
Action.begin(org.apache.log4j.joran.spi.ExecutionContext, java.lang.String, org.xml.sax.Attributes)
end
public void end(org.apache.log4j.joran.spi.ExecutionContext ec,
String name)
- Overrides:
end
in class Action
- See Also:
Action.end(org.apache.log4j.joran.spi.ExecutionContext, java.lang.String)
Copyright © 2000-2006 Apache Software Foundation.
Licensed under the Apache License, Version 2.0.