|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.osesb.configuration.XMLConfiguration
org.osesb.configuration.JNDIConfiguration
public class JNDIConfiguration
Parses a any configuration content model that includes JNDI properties. For example, JMSClientConfiguration and JDBCConfigurations contain JNDI content models.
| Field Summary | |
|---|---|
protected java.util.Properties |
vendorEnvironmentProperties
In addition to standard JNDI environment properties for the InitialContext, like providerURL, the <vendor-env-properties> configuration element
allows the programmer to specify vendor-specific properties,
which are passed to the InitialContext constructor. |
| Fields inherited from class org.osesb.configuration.XMLConfiguration |
|---|
configFilePath, configurationProperties, constructedFromConfigFile, contentModelElement, ftpClientConfiguration, jaxrpcClientConfiguration, jdbcConfiguration, jmsClientConfiguration, log, rootConfigurationAttributes, smtpClientConfiguration, systemProperties, thisClassName |
| Constructor Summary | |
|---|---|
JNDIConfiguration(org.w3c.dom.Element contentModelElement)
Creates a new instance of JNDIConfiguration given the content model Element. |
|
JNDIConfiguration(java.util.Properties configurationProperties)
Creates a new instance of JNDIConfiguration given the configuration Properties. |
|
JNDIConfiguration(java.lang.String configFile)
Creates a new instance of JNDIConfiguration given a XML configuration file. |
|
JNDIConfiguration(java.lang.String configFile,
java.lang.String xpathExpression)
Creates a new instance of JNDIConfiguration given a XML configuration file and a XPath expression that evaluates to the element that marks the beginning of the configuration. |
|
| Method Summary | |
|---|---|
java.lang.String |
getContextFactory()
Returns the ContextFactory className. |
java.lang.String |
getContextSecurityCredentials()
Returns the Context Security Credentials. |
java.lang.String |
getContextSecurityPrincipal()
Returns the Context Security Principal. |
java.lang.String |
getProviderURL()
Returns the JNDI Provider URL. |
java.util.Properties |
getVendorEnvironmentProperties()
Returns vendor-specific environment properties. |
protected void |
loadVendorEnvironmentProperties()
Loads a <vendor-env-properties> content model enclosed within
this configuration. |
void |
setContextSecurityCredentials(java.lang.String contextSecurityCredentials)
Sets the Context Security Credentials (password encryption). |
java.lang.String |
toString()
Returns the String representation of this JNDIConfiguration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Properties vendorEnvironmentProperties
<vendor-env-properties> configuration element
allows the programmer to specify vendor-specific properties,
which are passed to the InitialContext constructor.
loadVendorEnvironmentProperties()| Constructor Detail |
|---|
public JNDIConfiguration(java.lang.String configFile)
throws java.lang.Exception
configFile - The path to the XML configuration file, which
is specified as a resource path or as a file system
path that is relative to the path specified
by the ConfigurationConstants.CONFIG_PATH_SYSTEMPROPERTY
System Property.
java.lang.Exception - if there is a problem reading or parsing the
configuration file.
public JNDIConfiguration(java.lang.String configFile,
java.lang.String xpathExpression)
throws java.lang.Exception
configFile - The path to the XML configuration file, which
is specified as a resource path or as a file system
path that is relative to the path specified
by the ConfigurationConstants.CONFIG_PATH_SYSTEMPROPERTY
System Property.xpathExpression - A XPath expression that evaluates to the
element that marks the beginning of the
configuration.
java.lang.Exception - if there is a problem reading or parsing the
configuration file.
public JNDIConfiguration(org.w3c.dom.Element contentModelElement)
throws java.lang.Exception
contentModelElement - The top level Element for the
for the configuration.
java.lang.Exception - if there is a fatal error transversing the
configuration content model enclosed by contentModelElement.public JNDIConfiguration(java.util.Properties configurationProperties)
configurationProperties - Configuration name / value pairs as Properties.| Method Detail |
|---|
protected final void loadVendorEnvironmentProperties()
throws java.lang.Exception
<vendor-env-properties> content model enclosed within
this configuration. This method is automatically invoked by the Constructor.
In addition to standard JNDI environment properties for the InitialContext,
like providerURL, the <vendor-env-properties> configuration element
allows the programmer to specify vendor-specific properties, which are passed
to the InitialContext constructor.
The <vendor-env-properties> content model Element tag name must be
ConfigurationConstants.VENDORSPECIFIC_ENVIRONMENT_PROPERTIES_CONTENTMODEL and must
be an immediate child of the root Element of a JNDIConfiguration.
Example <vendor-env-properties>:
<vendor-env-properties>
<vendor-env-property name="name1" value="value1"/>
<vendor-env-property name="name2" value="value2"/>
</vendor-env-properties>
The 'name' and 'value' attributes are used to set the Environment Properties.
Environment properties can be loaded from a resource path or a file system path.
For example,
<vendor-env-properties propertiesFile="config/was-thinClient.properties"/>
Environment defined in a propertiesFile take precedence over
properties configured as children of <vendor-env-properties.
Note that this method should not be overridden as it is invoked from this
class's constructor.
java.lang.Exception - if there is a fatal error transversing the DOM
that contains the configuration content model.public java.lang.String getContextFactory()
public java.lang.String getContextSecurityPrincipal()
public java.lang.String getContextSecurityCredentials()
public void setContextSecurityCredentials(java.lang.String contextSecurityCredentials)
contextSecurityCredentials - The Context Security Credentials.public java.lang.String getProviderURL()
public java.util.Properties getVendorEnvironmentProperties()
<vendor-env-properties> configuration element
allows the programmer to specify vendor-specific properties,
which are passed to the InitialContext constructor.
public java.lang.String toString()
toString in class XMLConfiguration
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||