|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softwareag.entirex.aci.LocationTransparencyService
public final class LocationTransparencyService
Connects to the LDAP directory via JNDI to retrieve Broker and BrokerService objects. Broker objects and BrokerService objects are configured with attributes in a directory. This locator service retrieves the objects with the help of com.softwareag.entirex.aci.ExxObjectFactory. Broker objects are named by logical Broker IDs. A broker object is returned with a real Broker ID and a dummy user ID, if the KERNELVERScall to this Broker was successful. BrokerService objects have, in addition to Broker objects, a server address in the form class/server/service.
This locator service is initialized implicitly with the file XDS.ini. Specify the location of this file in the system property 'entirex.location.transparency.ini'. Example: entirex.location.transparency.ini =C:\SoftwareAG\webMethods8\EntireX\config\XDS.ini.
An alternative is to specify the connection to the LDAP directory in a string. This string is read from the system property 'entirex.location.transparency.config'. It has the form 'ldap://<host>:<port>/<base DN> ?<key>=<value>&<key>=<value>&...'. The pairs key=value may contain any property for JNDI, i.e. 'java.naming.security.authentication=simple'. Two special keys 'AuthDN' and 'AuthPass' are mapped to 'java.naming.security.principal' and 'java.naming.security.credentials', respectively.
Only one of the system properties 'entirex.location.transparency.ini' and 'entirex.location.transparency.config' may be used. In both cases, "java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory" and "java.naming.factory.object=com.softwareag.entirex.aci.ExxObjectFactory" are included automatically.
This class is a Service Locator in the sense of the locator pattern of J2EE. For direct use of the JNDI lookup the following names for logical services or logical brokers have to be used. For a logical service use "sag-key=LogService=<logical service name>, sag-key=<set name>, sag-key=200, sag-key=LocTrans, sag-key=EntireX, sag-key=Software AG" below your base name. Here <logical service name> is the name of the logical service and <set name> is the name of the set of rules for location transparency. For a logical broker use "sag-key=LogBroker=<logical broker name>, sag-key=<set name>, sag-key=200, sag-key=LocTrans, sag-key=EntireX, sag-key=Software AG" below your base name. Here <logical broker name> is the name of the logical Broker and <set name> is the name of the set of rules for location transparency. Initialize the context for JNDI with properties including "java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory" and "java.naming.factory.object=com.softwareag.entirex.aci.ExxObjectFactory".
Method Summary | |
---|---|
static void |
init(java.util.Properties jndiProperties)
Initializes the JNDI directory context from the properties. |
static void |
init(java.lang.String jndiPropsFilename)
Initializes the JNDI directory context. |
static Broker |
lookupBroker(java.lang.String logicalBrokerName)
Retrieves the Broker bound to this logical Broker ID in the set 'DefaultSet'. |
static Broker |
lookupBroker(java.lang.String logicalBrokerName,
java.lang.String locTransSetName)
Retrieves the Broker bound to this logical Broker ID in the given set. |
static BrokerService |
lookupBrokerService(java.lang.String logicalServiceName)
Retrieves the BrokerService bound to this logical service in the set 'DefaultSet'. |
static BrokerService |
lookupBrokerService(java.lang.String logicalServiceName,
java.lang.String locTransSetName)
Retrieves the BrokerService bound to this logical service in the given set. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static BrokerService lookupBrokerService(java.lang.String logicalServiceName) throws BrokerException
logicalServiceName
- the name of the logical service.
BrokerService
bound to this logical service in the
set 'DefaultSet'.
BrokerException
- All Exceptions are wrapped into BrokerExceptions.public static BrokerService lookupBrokerService(java.lang.String logicalServiceName, java.lang.String locTransSetName) throws BrokerException
logicalServiceName
- the name of the logical service.locTransSetName
- the name of the set of rules for Location Transparency. If the
name is null
or has length 0
, the
name is set to 'DefaultSet'.
BrokerService
bound to this logical service in the
given set.
BrokerException
- All Exceptions are wrapped into BrokerExceptions.public static Broker lookupBroker(java.lang.String logicalBrokerName) throws BrokerException
logicalBrokerName
- the name of the logical Broker.
Broker
bound to this logical Broker in the set
'DefaultSet'.
BrokerException
- All Exceptions are wrapped into BrokerExceptions.public static Broker lookupBroker(java.lang.String logicalBrokerName, java.lang.String locTransSetName) throws BrokerException
logicalBrokerName
- the name of the logical Broker.locTransSetName
- the name of the set of rules for Location Transparency. If the
name is null
or has length 0
, the
name is set to 'DefaultSet'.
Broker
bound to this logical Broker in the given
set.
BrokerException
- All Exceptions are wrapped into BrokerExceptions.public static void init(java.lang.String jndiPropsFilename) throws BrokerException
jndiPropsFilename
- the name of the file with the JNDI properties. If
null
is used, 'JNDI.properties' is read.
BrokerException
- on errors in configuration.public static void init(java.util.Properties jndiProperties) throws BrokerException
jndiProperties
- the properties object with the JNDI properties.
BrokerException
- on errors in configuration.
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |