You can enable monitoring using the WebSphere® Business Events 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.
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 Events:
- 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 Events.
- In the Topic connectionFactory JNDI name field, accept the default value of jms/wbeTopicConnectionFactory, or type the value of your topic connectionFactory JNDI name
- In the Topic JNDI name field,
accept the default value of jms/WBE/CbeListener, or type the value of your topic JNDI name.
- 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 the 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, select the
actions you want to perform on the objects, and then click Add:
- 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 a EJB project. On the EJB project page:
- Ensure that SapInboundWBE 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 ActivationSpec of the
deployed message-driven bean 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.

- 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 eventMapping file provides the mapping between the
event and the business Object schema that the WebSphere Business Event requires for monitoring
the event. (This is an explicit action, it is not generated together
with the other artifacts). To generate EventBOTypeMapping.xml and EventBOTypeMapping.xsd:
- Right-click your session bean.
- Select :The EventMapping files are generated in
the same folder as your business object schema files. In this example,
the files are generated in the BOFolder. if you modify or refactor
any of your business objects or methods, you need to regenerate the
eventMapping file.
- 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. | SAPInboundEJB.java |
Interface class |
| SAPInboundEJBMSB.java |
Session bean |
| SAPInboundEJBMDB.java |
Message-driven bean |
| SAPInboundEJBMDBEventInterceptor.java |
Event interceptor class |
| SAPInboundEJBMDBHelper.java |
MDBHelper class |
| EventBOTypeMapping.xml |
eventBOType Mapping |
| EventBOTypeMapping.xsd |
eventBOType schema |
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
Events 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). You need to perform
additional steps on the WebSphere Business Event server in order to be able to monitor the specific
events. The J2C bean listens to the inbound events and uses the event
interceptor to intercept the events and forward them through a JMS
Topic to the server. For information about publishing events to the WebSphere Business Events,
see Monitoring the events from the EIS with WebSphere Business Events server.