Creating an event point on a local mapping service by using the command line

Service requests and responses can be monitored by other systems by using events. By setting an event point, a local mapping service can emit events when it intercepts a service request.

Before you begin

You must have a local mapping service defined. See Creating a local mapping service

You must have the JNDI name of a JMS connection factory that defines the details of the JMS provider to which you want to publish events. See Producing events for consumption by IBM Integration Bus and Producing events for consumption by JMS applications.

About this task

Use the createLMServiceEventPoint command to create an event point on an existing local mapping service.
Note: You can create event points only by using the command-line method.

Procedure

  1. Start wsadmin by starting the wsadmin scripting tool.
  2. Use the following createLMServiceEventPoint command to create an event point on the specified local mapping service:
    AdminTask.createLMServiceEventPoint('-lmService DemoLM -mustSend false -sendAtCommit true -eventData envelope -connectionFactory myJmsCF -topic myJmsTopic')

    The value that you provide for the -connectionFactory parameter must be the JNDI name that you used when you created the connection factory. See Producing and consuming service mapping events.

    This example specifies values for all the required and optional parameters of the command. For more information, see createLMServiceEventPoint command. If you do not specify a value for the -topic parameter, events are published to a topic by using the default topic string:
    $SYS/AppServer/<cell_name>/<node_name>.<server_name>|<cluster_name>/<client_application_name>/<LMS_name>/<operation_name>
    Where either <node_name>.<server_name> must be specified, or <cluster_name> must be specified, depending on your configuration.
    Note: This default topic string is passed to the Session.createTopic() method of the JMS provider. The string is compatible with both the default messaging provider for WebSphere Application Server and WebSphere MQ JMS providers. However, the string might not be compatible with other JMS providers. For JMS providers where the default topic string is not compatible with the Session.createTopic() method, you must specify a JMS topic when you create the event point.
  3. When the event point is created, you can see the details of the event point by using the showLMService command:
    AdminTask.showLMService('DemoLM') 
    The details of the local mapping service now include the event point information:
    {name=DemoLM, description=DemoLM, consumedService=[{portType=MyServicePort, namespace=http://test, serviceName=MyServiceService, targetEndpoint=http://localhost:9080/DemoJAXWSProject/MyServiceService, portName=MyServicePort}], serviceStatus=LocalMappingServiceState.STARTED, eventPoint={enabled=false, mustSend=false, sendAtCommit=true, eventData=envelope, connectionFactory=myJmsCF, topic=myJmsTopic}}  
  4. The event point is disabled by default. Use the enableLMServiceEventPoint command to enable it, as shown here:
    AdminTask.enableLMServiceEventPoint('-lmService DemoLM') 
  5. Save your configuration changes by using the following command:
    AdminConfig.save() 
  6. If you are in a clustered environment, you must synchronize the nodes. Use the syncActiveNodes script in the AdminNodeManagement script library to synchronize each active node in your environment, as the following example demonstrates:
    AdminNodeManagement.syncActiveNodes()

Results

When the local mapping service intercepts service requests, response messages, and fault messages, an event is published to the JMS provider specified by the connection factory JNDI name.

Icon that indicates the type of topic Task topic

Terms and conditions for information centers | Feedback


Timestamp icon Last updated: Tuesday, 22 April 2014
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=phil&product=was-base-iseries&topic=tsmwas_creatinganeventpoint
File name: tsmwas_creatinganeventpoint.html