Assembling applications for use with BRBeans

Why and when to perform this task

When you are ready to ship your application, include a Business Rule Beans (BRBeans) JAR file in your EAR file. There are several of these JAR files in the <WAS_HOME>/BRBeans directory; one for each supported database. Each name reflects the database type that it uses (for example, BRBeansDB2.jar). These JAR files contain three enterprise beans with the following JNDI names:In your EAR files, complete the following steps:

Steps for this task

  1. Change the JNDI names of the BRBeans enterprise beans to make them unique for your application.
    For example, if your application is called MyApp, you could change the first one to brbeans/MyApp/Rule or com/MyCompany/MyApp/Rule.
  2. Define EJB references to these three enterprise beans in any module where a trigger...() method exists in one or more of its classes.
    You can do this using the WebSphere Studio Application Developer tool or the Application Assembly tool. The Name field should contain the following and correspond to the enterprise beans listed above:
    • ejb/com/ibm/ws/brb/Rule
    • ejb/com/ibm/ws/brb/RuleFolder
    • ejb/com/ibm/ws/brb/RuleHelper

    Note: The JNDI name on the Bindings tab should be the same as the JNDI names that you gave earlier to the enterprise beans.

    Since the BRBeans enterprise beans refer to each other, there are also EJB references defined within the BRBeans JAR file itself. Each of the three BRBeans enterprise beans has two EJB references defined. These six references also need to be updated with the JNDI names you assigned earlier.

  3. If you are not using the BRBeansCloudscape.jar file, skip this step. In the BRBeansCloudscape.jar file each entity enterprise bean has a resource reference defined for the data source it will use. You must update the JNDI binding for this reference to specify the JNDI name of the actual data source you want to use for the BRBeans entity enterprise bean. The shipped BRBeansCloudscape.jar file contains a dummy JNDI name for each binding. There are two resource references that need to be updated: one for the Rule enterprise bean and one for the RuleFolder enterprise bean. You can use the WebSphere Studio Application Developer tool or the to perform this update.

What to do next

After you have an EAR file that includes your application code and the BRBeans enterprise beans, complete the following steps to install and run the application:
  1. Deploy the EAR file to generate run-time code for the BRBeans enterprise beans and any other enterprise beans that you may have in your application. Deployment can be accomplished either as a separate step (using the ejbdeploy command) or as part of the process of installing the EAR file onto an application server. Refer to the base WebSphere documentation for more information about deploying an EAR file.
  2. The deployment process generates a file named Table.ddl. Table.ddl contains database commands to create the database tables needed by the BRBeans entity enterprise beans. You must use your database software to create a database and then use the commands in the Table.ddl file to create tables in this database. Refer to your database software documentation for more information on the commands needed to set up a database and the database tables.
  3. Create a JDBC provider and a data source to access the database created in the previous step. For all of the databases except IBM Cloudscape, the BRBeans enterprise beans are configured to require a Version 4 data source. For Cloudscape, you can use a normal data source.

    Note: The JNDI name you specify for the data source also must be specified when you install the EAR file on the application server so that the server knows which data source to use.

    Refer to the base WebSphere documentation for more information on these topics.
  4. Install the EAR file on an application server. To install the EAR file, either use command line tools or the WebSphere Administrative Console.

    Note: The EAR file can be deployed either as a separate step or as part of the installation process on the server.

    Refer to the base WebSphere documentation for more information on installing an EAR file on an application server.
  5. Start the application using the WebSphere Administrative Console.
You now have an application installed and running using BRBeans.

Related tasks
Using Business Rule Beans



Searchable topic ID:   tbrb_inclbrb
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/brb/tasks/tbrb_inclbrb.html

Library | Support | Terms of Use | Feedback