Configuring and Managing Advanced Registration Flows

     Previous  Next    Open TOC in new window    View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Configuring JMS Servers for ALER

This section contains information on the following subjects:

 


Overview of JMS for the Event Manager

The Event Manager uses an embedded version of Apache ActiveMQ JMS Server that is enabled by default. The embedded JMS Server is configured to run out-of-the-box without any additional configuration. However, if an external JMS server is preferred, such as BEA Weblogic Server JMS or IBM WebSphere Application Server, then a number of ALER system settings must be configured.

Note: When ALER is deployed on WebSphere 6.x, the embedded Apache ActiveMQ JMS Server cannot be used due to conflicts in the classes used by ActiveMQ and ALER. Therefore, WebSphere 6.x customers should use the default JMS implementation that comes with WebSphere 6.x. See Configuring a JMS Provider In WebSphere 6.1.0.5.

 


Configuring Connectivity Properties for External JMS Servers

ALER's System Settings section allows administrators to configure the basic ALER operation and to enable/disable specific features. The Event Manager's JMS-related settings are under the "Eventing" group under the main "External Integrations" category. For more information about System Settings, see the ALER Administration Guide. Additional "Eventing" properties are described in Configuring the ALER Event Manager.

Enabling and Configuring an External JMS Server

The internal Apache ActiveMQ JMS Server needs to be disabled in order to configure an external JMS product. You must also configure JNDI and JMS properties for the external JMS.

Note: These steps are for configuring a single external JMS server. For instructions on configuring multiple JMS servers in a cluster, see Configuring JMS Servers In an ALER Cluster.
  1. Click System Settings in the sidebar on the ALER Admin screen.
  2. Enter Event in the System Settings Search box to view all the Event Manager related settings.
  3. Disable the internal JMS server by clicking False next to the Event Manager Embedded JMS Enable property. This forces the Event Manager to use an external JMS server.
  4. Configure the required JNDI properties:
    • JNDI URL - Specifies the JNDI URL. For example, t3://localhost:7001.
    • JNDI User Name - Specifies the JNDI user name.
    • JNDI Password - Specifies the password for the JNDI User Name.
    • JNDI Context Factory - Specifies the JNDI initial context factory. For example, weblogic.jndi.WLInitialContextFactory.
  5. Configure the following JMS properties:
    • JMS Connection Factory - Specifies the JMS connection factory to enable JMS clients to create JMS connections. For example, weblogic.examples.jms.TopicConnectionFactory.
    • JMS Topic - Specifies the JMS topic, which is a publish/subscribe destination type for a JMS server. For example, weblogic.examples.jms.TopicConnectionFactory.
  6. Click Save.
  7. Restart ALER for the configuration changes to take effect.

Configuring JMS Message Header Properties

Every JMS message contains a standard set of header fields that is included by default and available to message consumers. The Message Expiration and Delivery Mode headers can be configured using the ALER System Settings.

  1. Access the "Eventing" System Settings, as described in Enabling and Configuring an External JMS Server.
  2. Configure the JMS message header properties:
    • JMS Message Expiration - Sets the JMS message expiration time in seconds. If set, unprocessed events will expire in the specified number of seconds. The default is 0 seconds, which means that messages will never expire. However, some environments have policies that require that JMS messages cannot be stored forever if they are not selected for some reason.
    • JMS Delivery Mode - Sets the JMS message delivery mode to either PERSISTENT or NON-PERSISTENT values. If set to PERSISTENT, the JMS server will write the events to the underlying store. Although more reliable, persisting events to a store can affect performance. The default is PERSISTENT.
  3. Click Save.
  4. Restart ALER for the configuration changes to take effect.

Miscellaneous JMS Properties

Note: You must restart ALER after changing any Eventing property in order for the changes to take effect.

The following miscellaneous System Settings can also be configured.

Configuring External JMS Jar Files

If an external JMS server is being used, then the external JMS server-related JAR files should be copied to the WEB-INF\lib directory.

 


Configuring the Embedded ActiveMQ JMS Server to Use a Database

By default, the ActiveMQ JMS server uses a file-based store to store events. However, you can specify to have events stored in a database. Simply, configure the activemq.xml file in the WEB-INF\classes directory to use your database parameters.

For example:

 <persistenceAdapter>
<journaledJDBC journalLogFiles="5" dataDirectory="../activemq-data" dataSource="#oracle-ds" />
<!-- To use a different datasource, use the following syntax : -->
<!-- <journaledJDBC journalLogFiles="5" dataDirectory="../activemq-data" dataSource="#postgres-ds"/> -->
 <!--  Oracle DataSource Sample Setup  -->
- <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
<property name="url" value="jdbc:oracle:thin:@localhost:1521:AMQDB" />
<property name="username" value="scott" />
<property name="password" value="tiger" />
<property name="poolPreparedStatements" value="true" />
</bean>

 


Configuring JMS Durable Subscribers for Web Service Endpoints

The Event Manager creates one durable subscriber for each Web Service endpoint it encounters in the Subscription Manager XML file. This ensures that events are stored if the endpoints are not online and that they can be reliably delivered once the endpoints are online again. As per the JMS Specification, the durable subscriber name should be unique across the JMS server. The Event Manager gets the durable subscriber name from the name field found in the EndPointEventSubscription.xml file, as shown in this example:

<sub:EventSubscriptionData xmlns:sub="http://www.bea.com/infra/events/subscription"
<sub:eventSubscription>
<sub:endPoint name="ALBPMEndpoint">

Note: JMS servers associate the durable subscriber name with the message selectors. Therefore, if the message selector is changed, either a new durable subscriber name should be provided or the existing one should be deleted. You can use the ALER "Event Cleanup" tool, as described in Cleaning Up Stored Events. You can also use a JMS-specific tool to accomplish this.

 


Configuring JMS Servers In an ALER Cluster

Note: Before you begin, refer to the ALER Clustering Guide for information on configuring ALER in a clustered environment.

Enabling JMS Clustering Mode

If ALER is deployed on cluster mode, you must enable clustering on each ALER instance regardless of which type of JMS server being used (embedded or external).

  1. Click System Settings in the sidebar on the ALER Admin screen.
  2. Enter cmee.eventframework.clustering.enabled in the Enable New System Setting box and click Enable to reveal this hidden property.
  3. Set the Clustering Enabled property to True.
  4. Set other required properties based on the type of JMS server, as described in the following sections.

Configuring Embedded JMS Servers for Clustering

In a clustered environment, each member ALER instance in the cluster will have one embedded JMS server. For example, in case of two-node cluster, there will be two ALER instances, such as server01 and server02, with each having one embedded JMS server. Once clustering is enabled for the embedded JMS servers, you then need to specify the connection URL information for the embedded JMS servers on server01 and server02.

  1. Click System Settings in the sidebar on the ALER Admin screen.
  2. Enter cmee.eventframework.embedded.jms.url in the Enable New System Setting box and click Enable to reveal this hidden property.
  3. In the Embedded JMS Server URL property, supply the connection URL for the embedded JMS servers on the clustered ALER servers, using the following format.
  4. failover:(tcp:// $SEVER_DNS_NAME_OR_IP$:61700,tcp://$SEVER_DNS_NAME_OR_IP$:61700, ...)

    where:

    $SEVER_DNS_NAME_OR_IP$ are replaced by actual server DNS name or IP address. The entries should be repeated for each ALER server in a given cluster.

    Using the example above, this could be set to:
    failover:(tcp://server01:61700,tcp://server02:61700)

Caution: Port 61700 is the default port for the embedded JMS server, and therefore should not be used by any other application on the ALER server unless another port is configured for the embedded JSM server.
  1. Click Save.
  2. Repeat steps 1-4 for each ALER instance in a given cluster. Using the example above, the Embedded Broker URLs could be set to: failover:(tcp://server01:61700,tcp://server02:61700)
Tip: Make sure that each embedded JMS server is enabled by setting the cmee.eventframework.embedded.jms.enabled property to True.

Configuring External JMS Servers for Clustering

For external JMS servers, no additional configuration is required. However, you must make sure that the embedded JMS server is disabled, as follows:

  1. Click System Settings in the sidebar on the ALER Admin screen.
  2. Set the Event Manager Embedded JMS Enable property to False (i.e., cmee.eventframework.embedded.jms.enabled is False.

 


Configuring a JMS Provider In WebSphere 6.1.0.5

When ALER is deployed on WebSphere Application Server 6.1.0.5, the embedded Apache ActiveMQ JMS server cannot be used. Therefore, WebSphere 6.1.0.5 implementations must use the default JMS provider that comes with WebSphere 6.1.0.5.

To configure a JMS provider for ALER in WebSphere 6.1.0.5, complete the following steps in the WebSphere administration console and in your ALER application.

  1. Create a new Service Integration Bus:
    1. In the navigation pane, expand Service Integration, and then click Buses.
    2. On the Buses page, click New.
    3. On the Create a new bus page, enter alerbus as the name for the new bus.
    4. Clear the Bus security check box.
    5. Click Next, and then click Finish.
  2. Add a Bus member to the newly created alerbus:
    1. On the Buses page, click the alerbus link.
    2. Under the Topology category, click Bus members.
    3. On the Bus members page, click Add.
    4. On the Add a new bus member > Select Server, Cluster or WebSphere MQ server page, accept the default Server option and click Next.
    5. On the Add a new bus member > Select the type of message store page, accept the default File store option and click Next.
    6. On the Add a new bus member > Provide the message store properties page, accept the default values and click Next.
    7. On the Add a new bus member > Confirmation page, click Finish.
    8. On the Buses page, click Save.
  3. Create a JMS Topic Connection Factory in the default message provider:
    1. In the navigation pane, expand JMS, and then click JMS providers.
    2. Click the Default messaging provider option, with a Scope of Node=<nodename>, server=server1.
    3. On the JMS providers > Default messaging provider page, click the Topic connection factories option under Additional Properties.
    4. On the JMS providers > Default messaging provider > Topic connection factories page, click New.
    5. On the Administration page, configure the topic connection factory as follows:
      • Name - alerEventingTopicCFDefault
      • JNDI name - jms.alerEventingTopicCFDefault
      • Bus name - alerbus
      • Client identifier - ALER_JmsProducer
      • Durable subscription home - <nodename>.server1-alerbus
    6. Click Apply, and then click Save.
  4. Create a JMS Topic in the default message provider:
    1. Re-navigate to the JMS providers > Default messaging provider page.
    2. Click the Topics option under Additional Properties.
    3. On the JMS providers > Default messaging provider > Topics page, click New.
    4. On the Administration page, configure the topic as follows:
      • Name - alerEventingTopicDefault
      • JNDI name - jms.alerEventingTopicDefault
      • Topic name - alerEventingTopicDefault
      • Bus name - alerbus
      • Topic space - Default.Topic.Space
    5. Click Apply, and then click Save to save your changes.
  5. Deploy the aler.ear application file, as follows:
    1. In the navigation pane, expand Applications, and then click Enterprise Applications.
    2. On the Enterprise Applications page, click Install.
    3. On the Preparing for the application install page, click Browse, specify the aler.ear file in the path, and then click Next.
    4. Click Next on the Select installation options page.
    5. Click Next on the Map modules to servers page.
    6. On the Map resources to resource references page, click Browse in the Target Resource JNDI Name column.
    7. On the Enterprise application > Available resources page, select alerEventingTopicCFDefault, and then click Apply.
    8. Click Next on the ensuing Map resources to resource references page.
    9. On the Map resource environment entry references to resources page, enter jms/aler/alerEventingTopicDefault in Target Resource JNDI Name and then click Next.
    10. Click Finish on the Summary page.
    11. After the application is installed, click Save to save it to the Master Configuration.
  6. Follow the "Manually Installing the ALBPM Process Engine and Advanced Registration Flows" steps in the ALER Installation Guide to deploy additional files in the web-inf/classes directory and the database drivers required by the ALER application.
  7. Configure the ALER eventing.properties file for the WebSphere settings:
    1. Navigate to the <ALER Domain>\WEB-INF\classes directory.
    2. Use a text editor to modify the eventing.properties file as follows:
      • cmee.eventframework.jms.topic=jms.alerEventingTopicDefault
      • cmee.eventframework.jndi.provider.url=iiop\://localhost:2809
      • cmee.eventframework.embedded.jms.enabled=false
      • cmee.eventframework.jndi.context.factory=com.ibm.websphere.naming.WsnInitialContextFactory
      • cmee.eventframework.jms.connection.factory=jms.alerEventingTopicCFDefault
    3. Save the file.
  8. Restart the WebSphere application server to enable the modified settings.
  9. Check the WebSphere logs for possible errors: \WebSphere\AppServer\profiles\AppSrv01\logs\server1

  Back to Top       Previous  Next