[Enterprise Extensions only]
  Next topic

The BRBeans Properties file

Applications that use the BRBeans EJBs (this includes those that trigger rules or use the rule management APIs) must specify the JNDI names for these EJBs so that the code can find them at runtime. If the application is running in a J2EE client container, in a servlet, or on the application server itself (e.g. as part of another EJB), then these names have probably already been specified by the person who configured the application.

At runtime, the BRBeans code looks for a special Java property that identifies the name of the properties file. The default name of the Java property is brbPropertiesFile, but it can be specified on the command line as -DbrbPropertiesFile=<file-name>.

When an application attempts to reference BRBeans EJBs, the code will first look for the brbPropertiesFile Java property. If this property is specified, then the names listed in that file are used to find the EJBs, overriding any EJB references that were specified in the container (if the application is running in a container). If the property is not specified, then BRBeans attempts to use the EJB references specified in the container.

The host name and port number used to access the name server can also be set in this file. If these are not specified, then the name server used by the container in which the application is running is used. If the application is not running in a container, then localhost is used for the host name, and 900 is used for the port number.

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 WAS_HOME\AppServer\Enterprise\bin\brbeansDefaultProperties. This default file contains default names that are used in the BRBeans.jar file that is 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.

The tools shipped with BRBeans (the Rule Management Application, the rule importer, and the rule exporter) all run outside of any container. Hence the JNDI names need to be specified when these tools are run. The scripts for these tools all require that a proerties file name be passed as a command line parameter. This name is then specified as the value for the brbPropertiesFile property when the tool is run.

  Next topic