|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.util.AbstractLogEnabled org.apache.cocoon.components.modules.input.AbstractInputModule org.apache.cocoon.components.modules.input.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.cocoon.util.AbstractLogEnabled |
getLogger, setLogger |
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
ConfigurationException
public void initialize() throws Exception
initialize
in interface Initializable
Exception
public void dispose()
dispose
in interface Disposable
public Object getAttribute(String name, Configuration modeConf, Map objectModel) throws ConfigurationException
name
from the InitialContext.
getAttribute
in interface org.apache.cocoon.components.modules.input.InputModule
ConfigurationException
public Iterator getAttributeNames(Configuration modeConf, Map objectModel) throws ConfigurationException
getAttributeNames
in interface org.apache.cocoon.components.modules.input.InputModule
ConfigurationException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |