Enabling inbound event monitoring for WebSphere Business Events

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.
Important: WebSphere Business Events V7 function works with WebSphere Application Server V7.x. WebSphere Business Events is not supported in WebSphere Application Server v8.0. For information about the WebSphere Business Events, see: WebSphere Business Events Information. For information about installing WebSphere Business Events, see: WebSphere Business Events Installation and Operations Guide. The WebSphere Business Events is supported in WebSphere Application Server v7.0. For information about how to disable the event monitor function, see Disabling the event monitor.

Procedure

  1. Select File > New > Other > J2C.
  2. Select J2C Bean, and click Next.
  3. 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.
    Resource adapter selection
  4. Once you have selected the appropriate resource adapter, click Next.
  5. 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.
    Connector import page
  6. In the Connector Settings page, click Browse to select all the SAP system files:
    • sapjco3.jar
    • sapjco3.dll
  7. On the Adapter Style page, select Inbound and click Enable Inbound Event Monitoring, and click Next.
    Adapter style page
  8. On the Event and JMS Configuration page, you can configure the JMS provider the event monitoring function.
    Event configuration page
    1. In the Event type field, select WebSphere Business Events.
    2. In the Topic connectionFactory JNDI name field, accept the default value of jms/wbeTopicConnectionFactory, or type the value of your topic connectionFactory JNDI name
    3. In the Topic JNDI name field, accept the default value of jms/WBE/CbeListener, or type the value of your topic JNDI name.
    4. Click Advanced to set advanced properties:
      1. 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
        1. In the Naming provider URL Host field, type your remote server host URL.
        2. In the Naming provider URL Port field, type your remote server port number.
      2. In the Connection authentication configuration User name field, provide your user name.
      3. In the Connection authentication configuration Password field, provide your password.
  9. Click Next.
  10. On the Discovery Configuration page, provide your SAP server connection information:
    1. Host name (required): host name of the SAP server.
    2. System number (required): System number of the SAP server.
    3. Server name: of the SAP server.
    4. Port number: of the SAP server.
    5. User name (required): User name for the connection to the SAP server.
    6. Password (required): Password for the connection to the SAP server.

      To set the advanced SAP properties, click Show Advanced.

  11. On the Object Discovery and Selection page, select Discover IDoc from System and click Filter:
    Object discovery page
  12. On the Filter Properties for the Discover IDoc From System page, type ORDER* in the Find objects with this pattern field, and click OK:
  13. Select ORDERS05 and click ADD:
    Add object
  14. On the Configuration Parameters for ORDERS05 page, accept the defaults and click OK, and click Next:
    Configuration properties page
  15. 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:
    Configure composite properties
  16. 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.
  17. 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.
  18. 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:
    1. Ensure that SapInboundWBE appears in the Project name field.
    2. In the Target runtime field, select WebSphere Application Server v7.
    3. Select EAR membership field, and type WBMSAPProjectEAR in the EAR Project Name
    4. Accept the other defaults and click Finish.
      EJB project page
  19. 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.
    J2C bean creation
  20. 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.
    J2C Activation Specification page
  21. Select your EJB project, and select Project > Clean to generate and recompile the files.
  22. 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:
    1. Right-click your session bean.
    2. Select Source > Generate Event Mapping:
      Generate Event mapping
      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.
  23. 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
      Java files
      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.
  24. 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.

Feedback