You can enable monitoring using the WebSphere® Business Monitor in your J2C
inbound applications.
Before you begin
Important: Do not install multiple
resource adapters as standalone on the same runtime server, especially
if they are for the same EIS type (for example, CICS® ECI 8.0.0.0 and CICS ECI 8.0.0.1). All standalone resource adapters
share the same class loader, and therefore cannot both be installed.
Important: Inbound event monitoring is available
to your application only if you have WebSphere Business Monitor installed in
your environment. For information about installing WebSphere Business Monitor, see:
WebSphere Business Monitor. The WebSphere Business Monitor V7 works with WebSphere Application Server V7.x. It is
not supported in WebSphere Application Server v8.0. For more information about software requirement
and configuration, see
WebSphere Business Monitor documentation. For information about how
to disable the event monitor function, see
Disabling the event monitor.
Procedure
- Select File > New > Other > J2C.
- Select J2C Bean, and click Next.
- In the Resource Adapters
Selection page, select the type of resource adapter you want to use.
Available resource adapters that support the WebSphere Business Monitor:
- JD Edwards v. 6.2.0.2 and v. 7.0.0.0.
- Oracle v. 6.2.0.2 and v. 7.0.0.0.
- PeopleSoft v. 6.2.0.1.
- SAP v. 6.2.0.2 and v. 7.0.0.0.
- Siebel v. 6.2.0.2 and v. 7.0.0.0.
- Once you have selected the appropriate resource adapter,
click Next.
- On the Connector Import page, in the Connector
project field, accept the default name or type a different
name for your project. In the Target Server field, select WebSphere Application Serve V7, and click Next.
- In the Connector Settings page, click Browse to select all the SAP system files:
- On the Adapter Style page, select Inbound and click Enable Inbound Event Monitoring, and click Next.
- On the Event and JMS Configuration page, you can configure
the JMS provider the event monitoring function.

- In the Event type field, select WebSphere Business Monitor.
- In the Queue connectionFactory JNDI name field, accept the default value of jms/cei/EventQueueConnectionFactory.
- In the Queue JNDI name field,
accept the default value of jms/cei/EventQueue.
- Click Advanced to set advanced
properties:
- Remote JNDI provider configuration: Remote
JNDI provider configuration allows you to configure the remoteTopic
(or remote Queue for WebSphere Business Monitor support).
Note: If the bus in the local cell has
same name as the bus in remote cell, the application always connects
to the local cell. It does not use any of the provider endpoints
specified on the connection factory, so the Remote Topic Configuration
information that you enter is ignored. For more information about
remote Topic Configuration, See
Configuring a connection to a non-default bootstrap
server
- In the Naming provider URL Host field,
type your remote server host URL.
- In the Naming provider URL Port field,
type your remote server port number.
- In the Connection authentication configuration User
name field, provide your user name.
- In the Connection authentication configuration Password field, provide your password.
- Click Next.
- On the Discovery Configuration page, provide your SAP server
connection information:
- Host name (required): host name of the SAP server.
- System number (required): System number of the SAP server.
- Server name:
of the SAP server.
- Port number:
of the SAP server.
- User name (required):
User name for the connection to the SAP server.
- Password (required):
Password for the connection to the SAP server.
To set
the advanced SAP properties, click Show Advanced.
- On the Object Discovery and Selection page, select Discover IDoc from System and click Filter:
- On the Filter Properties for 'Discover IDoc From System'
page, type ORDER* in the Find objects
with this pattern field, and click OK:
- Select ORDERS05 and click ADD:
- On the Configuration Parameters for ORDERS05 page, accept
the defaults and click OK, and click Next:
- On the Configure Composite Properties page, beside the Service operations for selected IDoc field, click Add and select the actions you want to perform on the
objects:
- On the Configure Composite Properties page, beside theIDoc values to identify selected operations field, click Select the value you want to use, and click OK.
- On the Configure Composite Properties page, in the Folder field, type the name of a folder to store the
generated business object, and click Next.
Note: Create a folder to contain the schema files that are generated
to make easier the export of these files to create the monitor model.
The files are generated in a subfolder eventMonitor inside your specified Folder. If you do not specify a folder name,
the schema files are generated in the root of your project without
any containing folder.
- On the J2C Bean Creation and Deployment Configuration page,
type a name for your EJB project (WBMSAPProject), and click New to create an EJB project. On the EJB project page:
- Ensure that WBMSAPProject appears in the Project name field.
- In the Target runtime field,
select WebSphere Application
Server v7.
- Select EAR membership field,
and type WBMSAPProjectEAR in the EAR Project Name
- Accept the other defaults and click Finish.
- On the J2C Bean Creation and Deployment Configuration page,
you can create an EJB local interface, helper class, session bean,
and message-driven bean to contain your inbound processes. Note that
an EJB, a session bean and a message-driven bean are all created automatically.
In an inbound model, message-driven beans are designed to receive
external EIS messages. All resource adapters must implement javax.resource.spi.ResourceAdapter,
which has five methods. The application server accesses these methods
to manage the lifecycle of the resource adapter and provide notifications
when a message endpoint is deployed or undeployed. To receive a specific
EIS message, the recipient (message-driven bean) should show interest
in consuming that message by implementing a message listener. The
ActivationSpec class represents the configuration required by the
resource adapter to establish the connection between the EIS and a
message-driven bean. Resource adapters use the deployed message-driven
bean's ActivationSpec to create and manage a relationship between
the EIS and the MDB using the resource adapter. To configure the ActivationSpec,
beside the JNDI name field, click New.

- On the Server Select page, select WebSphere
Business Monitor Server v6.2 on WebSphere Application Server, and click Next:
- In the New J2C Activation Specification page, enter the
information for connecting to the SAP System, and click Finish, and back on J2C Bean Creation and Deployment
Configuration page, click Finish.
- Select your EJB project, and select to
generate and recompile the files.
- The following artifacts are created during the creation
of this application:
- XML schema definition (.xsd) files to be used for event definitions
located in the eventMonitor folder.
- The data records are found under the ejbModule folder. Inside
each data record class, you can locate the corresponding schema definition.
- Java™ classes
Table 1. | WBMEJB.java |
Interface class |
| WBMEJBMDB.java |
J2C message-driven bean |
| WBMEJBMDBEventInterceptor.java |
Event interceptor class |
| WBMEJBMDBHelper.java |
Event interceptor class |
| WBMEJB.java |
Session bean |
The J2C bean listens to the inbound events and uses the event
interceptor to intercept the events and forward them through a JMS
queue to the server.
- Deploy the adapter application containing the message-driven
bean to a WebSphere Business
Monitor server or a remote server so that it can listen for events
coming in from the enterprise information system (EIS) and publish
the events to the Common Event Infrastructure (CEI). For information
about publishing events to the WebSphere Business Monitor, see Monitoring the events from the EIS with WebSphere Business Monitor server.