|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.components.modules.input.AbstractInputModule org.apache.cocoon.components.modules.input.NamingInputModule
public class NamingInputModule
NamingInputModule accesses values stored in the JNDI context.
This module accept any configuration parameters and passes them as properties to the InitialContext. When connecting to the Naming context of the server Cocoon is running in, no parameters are required.
Example module configuration when connecting to external WebLogic server:
<java.naming.factory.initial>weblogic.jndi.WLInitialContextFactory</java.naming.factory.initial> <java.naming.provider.url>t3://localhost:7001</java.naming.provider.url>
Example usage:
<map:generate src="{naming:java:comp/env/greeting}"/>This lookups
greeting
entry from the environment of the webapp.
Webapp's web.xml should define this entry:
<env-entry> <env-entry-name>greeting</env-entry-name> <env-entry-value>Hello, World</env-entry-value> <env-entry-type>java.lang.String</env-entry-type> </env-entry>
Field Summary |
---|
Fields inherited from class org.apache.cocoon.components.modules.input.AbstractInputModule |
---|
settings |
Fields inherited from interface org.apache.cocoon.components.modules.input.InputModule |
---|
ROLE |
Constructor Summary | |
---|---|
NamingInputModule()
|
Method Summary | |
---|---|
void |
configure(Configuration conf)
Fill in InitialContext properties from passed configuration. |
void |
dispose()
Close InitialContext. |
Object |
getAttribute(String name,
Configuration modeConf,
Map objectModel)
Look up name from the InitialContext. |
Iterator |
getAttributeNames(Configuration modeConf,
Map objectModel)
Returns empty iterator |
void |
initialize()
Creates InitialContext with configured properties. |
Methods inherited from class org.apache.cocoon.components.modules.input.AbstractInputModule |
---|
getAttributeValues |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NamingInputModule()
Method Detail |
---|
public void configure(Configuration conf) throws ConfigurationException
configure
in interface Configurable
configure
in class AbstractInputModule
ConfigurationException
public void initialize() throws Exception
initialize
in interface Initializable
Exception
public void dispose()
dispose
in interface Disposable
dispose
in class AbstractInputModule
public Object getAttribute(String name, Configuration modeConf, Map objectModel) throws ConfigurationException
name
from the InitialContext.
getAttribute
in interface InputModule
getAttribute
in class AbstractInputModule
name
- a String that specifies what the caller thinks
would identify an attribute. This is mainly a fallback if no
modeConf is present.modeConf
- column's mode configuration from resource
description. This argument is optional.
ConfigurationException
public Iterator getAttributeNames(Configuration modeConf, Map objectModel) throws ConfigurationException
getAttributeNames
in interface InputModule
getAttributeNames
in class AbstractInputModule
modeConf
- column's mode configuration from resource
description. This argument is optional.
ConfigurationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |