Use this task to enable container-managed persistence (CMP)
entity beans to share the database connections used by the data store
of a messaging engine. Performing this task has been estimated to
provide a potential performance improvement of 15% for overall message
throughput, but can only be used for entity beans connected to the
application server that contains the messaging engine.
About this task
To enable CMP entity beans to share the database connections
used by the data store of a messaging engine, complete the following
steps.
Procedure
- Configure the data store to use a data source that is not
XA-capable. For more information about configuring a data
store, see Configuring a JDBC data source for a messaging engine.
- Select the Share data source with CMP option.
This option is provided on the JMS connection factory or JMS
activation specification used to connect to the service integration
bus that hosts the bus destination that is used to store and process
messages for the CMP bean.
For example, to select the option on
a unified JMS connection factory, complete the following steps:
- Display the default messaging provider. In
the navigation pane, click .
- Select the default provider for which you want to configure
a unified connection factory.
- Optional: Change the Scope check
box to set the level at which the connection factory is to be visible,
according to your needs.
- In the content pane, under Additional Properties, click Connection
factories.
- Optional: To create a new unified JMS connection
factory, click New.
Specify the
following properties for the connection factory:
- Name
- Type the name by which the connection factory is known for administrative
purposes.
- JNDI name
- Type the JNDI name that is used to bind the connection factory
into the namespace.
- Bus name
- Type the name of the service integration bus that the connection
factory is to create connections to. This service integration bus
hosts the destinations that the JMS queues and topics are assigned
to.
- Optional: To change the properties of an
existing connection factory, select its name from one of the connection
factories displayed. The properties for the connection
factory are displayed in the content pane.
- Select the check box for the Share data source with CMP field.
- Click OK.
- Save your changes to the master configuration.
The JMS connection factory can only be used to connect to a "local" messaging
engine that is in the application server on which the CMP beans are
deployed.
- Deploy the CMP beans onto the application server that contains
the messaging engine, and specify the same data source as that used
by the messaging engine. You can use the administrative
console to complete the following steps:
- Optional: To determine the data source used
by the messaging engine, click .
The
Data source name field displays
the name of the data source, which is by default:
jdbc/com.ibm.ws.sib/engine_name
- Click .
- On the first Preparing for the application installation
page, specify the full path name of the source application file (.ear
file, otherwise known as an EAR file), then click Next.
- On the second Preparing for the application installation
page, complete the following steps:
- Select the check box for Generate Default Bindings.
Data source bindings (for EJB 1.1 JAR files) are generated based on
the JNDI name, data source, user name, and password options. This
results in default data source settings for each EJB JAR file. No
bean-level data source bindings are generated.
- Under Connection Factory Bindings, select the check box for Default
connection factory bindings:, then type the JNDI name
for the data source and optionally select a Resource authorization value.
- Click Next to display the Install New Application
pages. The contents of the application that you are installing determines
which pages are available.
- If your application uses EJB modules that contain CMP beans
that are based on the EJB 1.x specification, for Map default
data sources for modules containing 1.x entity beans,
specify a JNDI name for the default data source for the EJB modules.
The default data source for the EJB modules is optional if data sources
are specified for individual CMP beans.
- If your application has CMP beans that are based on the
EJB 1.x specification, for Map data sources for all 1.x
CMP, specify a JNDI name for data sources to be used for
each of the 1.x CMP beans. The data source attribute is optional for
individual CMP beans if a default data source is specified for the
EJB module that contains CMP beans.
- Click Finish. If neither a default
data source for the EJB module nor a data source for individual CMP
beans are specified, a validation error displays and the installation
is cancelled.
- Complete other pages as needed.
- On the Summary page, verify the cell, node, and server
onto which the application modules will install.
- Beside Cell/Node/Server, click Click
here.
- Verify the settings on the Map modules to servers page that is
displayed. Ensure that the application server that is specified contains
the messaging engine and its data store.
- Specify the web servers as targets that will serve as routers
for requests to this application. This information is used to generate
the plug-in configuration file (plugin-cfg.xml) for each web server.
- Return to the Summary page.
- Click Finish.