|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.websphere.brb.mgmt.RuleMgmtHelper
This class provides useful methods for managing BRBeans rules and folders.
Constructor Summary | |
RuleMgmtHelper()
|
Method Summary | |
static IRuleFolder |
getRootFolder()
Get the root IRuleFolder for the rule server. |
static IRuleFolder |
getRootFolder(javax.naming.InitialContext ic)
Deprecated. Use the getRootFolder method taking no parameters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RuleMgmtHelper()
Method Detail |
public static IRuleFolder getRootFolder() throws BusinessRuleBeansException
IRuleFolder
for the rule server. The host and port
for the name server can be specified in a BRBeans properties file, where the
file can be specified on the command line as -DbrbPropertiesFile=file-name.
If no BRBeans properties file is specified, then the name server specified for the
container in which we are running will be used. The properties file can
also be used to specify the JNDI names of the BRBeans EJBs if these names
have not been set in the client container in which we are running. The
properties file must be in the following format (entries can be specified
in any order):
host=host-name-for-name-server port=port-number-for-name-server RuleJndi=JNDI-name-for-Rule-EJB RuleFolderJndi=JNDI-name-for-RuleFolder-EJB RuleHelperJndi=JNDI-name-for-RuleHelper-EJB
A default properties file is shipped as \WebSphere\AppServer\Enterprise\bin\brbeansDefaultProperties. This default file contains default names that are used in the BRBeans.jar files that are shipped with BRBeans. This file can be used if that jar file is installed without changing the names. Note that the file name still must be specified even if you want to use the default file. There is no file that is used automatically if the brbPropertiesFile property is not set.
BusinessRuleBeansException
- if the BRBeans EJB homes cannot be found
for any reason.public static IRuleFolder getRootFolder(javax.naming.InitialContext ic) throws BusinessRuleBeansException
IRuleFolder
for the given
javax.naming.InitialContext
. An IllegalArgumentException
is thrown if null is passed for the InitialContext
.
The following example gets the root IRuleFolder
connecting
to the default factory for Websphere Advanced Edition
where the server is running locally on port 900:
Properties props = new Properties(); props.setProperty(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory"); props.setProperty(javax.naming.Context.PROVIDER_URL, "iiop://localhost:900"); InitialContext ic = new javax.naming.InitialContext(props); IRuleFolder root = RuleMgmtHelper.getRootFolder(ic);
ic
- the initial contextjava.lang.IllegalArgumentException
- if null is passed for the InitialContext
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |