Skip navigation.

Managing WebLogic Integration Solutions

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

Event Generators

This section provides the information you need to use the Event Generator module of the WebLogic Integration Administration Console to:

Note: You must be logged in as a member of the Administrators, IntegrationAdministrators, or IntegrationOperators group to create, change, or delete event generators. See Default Groups, Roles, and Security Policies.

The following topics are provided:

 


About the Event Generators

Event generators publish messages to Message Broker channels in response to system events (for example, files arriving in a directory, or messages arriving in an email account or JMS queue). The following event generators can be created from the WebLogic Integration Administration Console:

A set of channel rules is configured for each event generator. For a JMS event generator, the rules are applied to incoming JMS messages in the user-designated order. For example, suppose the following rules are configured for a JMS event generator:

Channel

Property

Value

myapp/orders/AllOrders

VendorId


myapp/orders/ACMEOrders

VendorId

ACME Trading Corp


 

In this case, a message with a JMS header property "VendorId" set to "ACME Trading Corp" would be posted to the myapp/orders/AllOrders channel because the presence of the "VendorId" property triggers the first rule. The order must be reversed to achieve the desired result.

Channel

Property

Value

myapp/orders/ACMEOrders

VendorId

ACME Trading Corp

myapp/orders/AllOrders

VendorId



 

Now a message with a JMS header property "VendorId" set to "ACME Trading Corp" is properly posted to the myapp/orders/ACMEOrders channel.

Channel rule sequence is only significant for JMS event generators. The sequence is not significant for Email or File event generators.

Additional information regarding the configuration of event generators is also found in the following sections of Deploying WebLogic Integration Solutions.

 


Overview of the Event Generator Module

The following table lists the pages you can access from the Event Generator module. The tasks and topics associated with each are provided:

Page

Associated Tasks

Topics

File

View All File Event Generators

View a list of File event generators. Generator name, number of channels, files read, last reset time, number of errors, error reset time, and status (running or suspended) are displayed.

Listing and Locating Event Generators

Filter the list by generator name. Use ? to match any single character or * to match zero or more characters.

Suspend or resume the event generator. It is important to note that the suspended status of an event generator is not preserved when the server is restarted. If the event generator is in the suspended state when the server is restarted, the event generator remains suspended and no events are processed. You must resume the event generator from the WebLogic Integration Administration Console.

Suspending and Resuming Event Generators

Reset the files read or error count.

Resetting the Counters

Delete one or more event generators.

Deleting Event Generators

Create New File Event Generator

Create and deploy a File event generator. The event generator initially has no channel rules.

Creating and Deploying Event Generators

File Event Generator Definition

Access the File Event Generator Channel Rule Definition page to add channel rules to a newly created or existing event generator.

Defining Channel Rules for a File Event Generator

View the channel rules for an existing event generator. Select a channel rule to view or update details.

Viewing and Updating Event Generator Channel Rules

Delete one or more channel rules.

Deleting Channel Rules

File Event Generator Channel Rule Definition

Create a new channel rule or view and update an existing channel rule.

Defining Channel Rules for a File Event Generator

Email

View All Email Event Generators

View a list of Email event generators. Generator name, number of channels, emails read, last reset time, number of errors, error reset time, and status (running or suspended) are displayed.

Listing and Locating Event Generators

Filter the list by generator name. Use ? to match any single character or * to match zero or more characters.

Suspend or resume the event generator. It is important to note that the suspended status of an event generator is not preserved when the server is restarted. If the event generator is in the suspended state when the server is restarted, the event generator remains suspended and no events are processed. You must resume the event generator from the WebLogic Integration Administration Console.

Suspending and Resuming Event Generators

Reset the emails read or error count.

Resetting the Counters

Delete one or more event generators.

Deleting Event Generators

Create New Email Event Generator

Create and deploy an Email event generator. The event generator initially has no channel rules.

Creating and Deploying Event Generators

Email Event Generator Definition

Access the Email Event Generator Channel Rule Definition page to add channel rules to a newly created or existing event generator.

Defining Channel Rules for an Email Event Generator

View the channel rules for an existing event generator. Select a channel rule to view or update details.

Viewing and Updating Event Generator Channel Rules

Delete one or more channel rules.

Deleting Channel Rules

Email Event Generator Channel Rule Definition

Create a new channel rule or view and update an existing channel rule.

Defining Channel Rules for an Email Event Generator

JMS

View All JMS Event Generators

View a list of JMS event generators.

Listing and Locating Event Generators

Filter the list by generator name. Use ? to match any single character or * to match zero or more characters.

Suspend or resume the event generator. It is important to note that the suspended status of an event generator is not preserved when the server is restarted. If the event generator is in the suspended state when the server is restarted, the event generator remains suspended and no events are processed. You must resume the event generator from the WebLogic Integration Administration Console.

Suspending and Resuming Event Generators

Reset the messages read or error count.

Resetting the Counters

Delete one or more event generators.

Deleting Event Generators

Create New JMS Event Generator

Create and deploy a JMS event generator. When you create the generator, you specify the destination topic or queue, message selector, and default channel rule.

Creating and Deploying Event Generators

JMS Event Generator Details

Update the default channel rule for the event generator.

Viewing and Updating Event Generator Channel Rules

JMS Event Generator Definition

Access the JMS Event Generator Channel Rule Definition page to add channel rules to a newly created or existing event generator.

Defining Channel Rules for a JMS Event Generator

View the channel rules for an existing event generator. Select a channel rule to view or update details.

Viewing and Updating Event Generator Channel Rules

Delete one or more channel rules.

Deleting Channel Rules

JMS Event Generator Channel Rule Definition

Create a new channel rule or view and update an existing channel rule.

Defining Channel Rules for a JMS Event Generator

Timer

View All Timer Event Generators

View a list of Timer event generators. Generator name, number of channels, messages read, last reset time, number of errors, error reset time, and status (running or suspended) are displayed.

Listing and Locating Event Generators

Filter the list by generator name. Use ? to match any single character or * to match zero or more characters.

Suspend or resume the event generator. It is important to note that the suspended status of an event generator is not preserved when the server is restarted. If the event generator is in the suspended state when the server is restarted, the event generator remains suspended and no events are processed. You must resume the event generator from the WebLogic Integration Administration Console.

Suspending and Resuming Event Generators

Reset the messages read or error count.

Resetting the Counters

Delete one or more event generators.

Deleting Event Generators

Create New Timer Event Generator

Create and deploy a Timer event generator. The event generator initially has no channel rules.

Creating and Deploying Event Generators

Timer Event Generator Definition

Access the Timer Event Generator Channel Rule Definition page to add channel rules to a newly created or existing event generator.

Defining Channel Rules for a Timer Event Generator

View the channel rules for an existing event generator. Select a channel rule to view or update details.

Viewing and Updating Event Generator Channel Rules

Delete one or more channel rules.

Deleting Channel Rules

Timer Event Generator Channel Rule Definition

Create a new channel rule or view and update an existing channel rule.

Defining Channel Rules for a Timer Event Generator

MQ Series

View All MQSeries Event Generators

View a list of MQSeries event generators. Generator name, number of channels, messages read, last reset time, number of errors, error reset time, and status (running or suspended) are displayed.

Listing and Locating Event Generators

Filter the list by generator name. Use ? to match any single character or * to match zero or more characters.

Suspend or resume the event generator. It is important to note that the suspended status of an event generator is not preserved when the server is restarted. If the event generator is in the suspended state when the server is restarted, the event generator remains suspended and no events are processed. You must resume the event generator from the WebLogic Integration Administration Console.

Suspending and Resuming Event Generators

Reset the messages read or error count.

Resetting the Counters

Delete one or more event generators.

Deleting Event Generators

Create New MQSeries Event Generator

Create and deploy a MQSeries event generator. The event generator initially has no channel rules.

Creating and Deploying Event Generators

MQSeries Event Generator Definition

Access the MQSeries Event Generator Channel Rule Definition page to add channel rules to a newly created or existing event generator.

Defining Channel Rules for an MQ Series Event Generator

View the channel rules for an existing event generator. Select a channel rule to view or update details.

Viewing and Updating Event Generator Channel Rules

Delete one or more channel rules.

Deleting Channel Rules

MQSeries Event Generator Channel Rule Definition

Create a new channel rule or view and update an existing channel rule.

Defining Channel Rules for an MQ Series Event Generator

HTTP



View All HTTP Event Generators

View a list of HTTP event generators. Generator name, number of channels, HTTP requests read, last reset time, number of errors, error reset time, and status (running or suspended) are displayed.

Listing and Locating Event Generators

Filter the list by generator name. Use ? to match any single character or * to match zero or more characters.

Suspend or resume the event generator. It is important to note that the suspended status of an event generator is not preserved when the server is restarted. If the event generator is in the suspended state when the server is restarted, the event generator remains suspended and no events are processed. You must resume the event generator from the WebLogic Integration Administration Console.

Suspending and Resuming Event Generators

Reset the messages read or error count.

Resetting the Counters

Delete one or more event generators.

Deleting Event Generators

Create New HTTP Event Generator

Create and deploy a HTTP event generator. The event generator initially has no channel rules.

Creating and Deploying Event Generators

HTTP Event Generator Definition

Access the HTTP Event Generator Channel Rule Definition page to add channel rules to a newly created or existing event generator.

Defining Channel Rules for an HTTP Event Generator

View the channel rules for an existing event generator. Select a channel rule to view or update details.

Viewing and Updating Event Generator Channel Rules

Delete one or more channel rules.

Deleting Channel Rules

HTTP Event Generator Channel Rule Definition

Create a new channel rule or view and update an existing channel rule.

Defining Channel Rules for an HTTP Event Generator

RDBMS



View all RDBMS Event Generators

View a list of RDBMS event generators. Generator name, number of channels, messages read, last reset time, number of errors, and error reset time are displayed.

Listing and Locating Event Generators

Filter the list by generator name. Use ? to match any single character or * to match zero or more characters.

Suspend or resume the event generator. It is important to note that the suspended status of an event generator is not preserved when the server is restarted. If the event generator is in the suspended state when the server is restarted, the event generator remains suspended and no events are processed. You must resume the event generator from the WebLogic Integration Administration Console.

Suspending and Resuming Event Generators

Reset the messages read or error count.

Resetting the Counters

Delete one or more event generators.

Deleting Event Generators

Create New RDBMS Event Generator

Create and deploy a RDBMS event generator. The event generator initially has no channel rules.

Creating and Deploying Event Generators

RDBMS Event Generator Definition

Access the RDBMS Event Generator Channel Rule Definition page to add channel rules to a newly created or existing event generator.

Defining Channel Rules for a RDBMS Event Generator

View the channel rules for an existing event generator. Select a channel rule to view or update details.

Viewing and Updating Event Generator Channel Rules

Delete one or more channel rules.

Deleting Channel Rules

RDBMS Event Generator Channel Rule Definition

Create a new channel rule or view and update an existing channel rule.

Defining Channel Rules for a RDBMS Event Generator


 

 


Creating and Deploying Event Generators

The Event Generator module allows you to create and deploy the event generators included as part of WebLogic Integration. When you create a new event generator as described in this section, it is packaged and deployed as an EJB (JMS, File, Email, Timer, MQ, and RDBMS event generators) or Web application module (HTTP event generator) on a single managed server. Once the event generator has been created and deployed, you can suspend, resume, or add additional channel rules as required.

Note: JMS, HTTP, MQ, and RDBMS event generators can be targeted to any number of managed servers in a cluster. For JMS and MQ event generators, it is typical to target the generator to a single managed server when using a physical JMS destination, or to the cluster when using distributed destinations. To deploy to a single managed server, see the procedures in this section.

This section includes the following:

To create and deploy a JMS event generator:

  1. From the home page, select the Event Generator module.
  2. From the left panel, select JMS.
  3. Select Create New.
  4. The Create a New JMS Event Generator page is displayed.


     
  5. In the Generator Name field, enter a unique name for the event generator.
  6. Note: Names are case insensitive. Leading or trailing spaces are removed.

  7. From the Destination Type drop-down list, select javax.jms.queue, javax.jms.topic, or foreign_jms_destination.
  8. Do one of the following:
  9. In the Message Selector field, specify the JMS message selector. See http://java.sun.com/dtd/ejb-jar_2_0.dtd.
  10. From the Default Rule Channel drop-down list, select the default channel. Messages that do not match any other channel rule are published to this channel.
  11. Click Submit to create and deploy the event generator.
  12. The Event Generator Definition page is displayed.

    Note: The event generator is created and deployed without channel rules, therefore, the first task is to define channel rules for the generator.

  13. Select Define a New Channel Rule.
  14. Set the properties as required. See Defining Channel Rules for a JMS Event Generator.
  15. Click Submit to add the channel rule to the event generator.
  16. If required, repeat steps 10 to 12 to add additional channels.
  17. If multiple rules are defined, you can reorder them as required. Click the up or down arrow button to move entries up or down the list. Changes take effect immediately.

To create and deploy a File, Email, Timer, MQ Series, HTTP, or RDBMS event generator:

  1. From the home page, select the Event Generator module.
  2. From the left panel, select the type of event generator (File, Email, Timer, MQ Series, HTTP, or RDBMS).
  3. Select Create New.
  4. The Create New page for the selected type is displayed.

    For example, the Create New File Event Generator page shown in the following figure.


     
  5. In the Generator Name field, enter a unique name for the event generator. If you selected HTTP in step 2, you must also enter the Web Application Context Root.

  6.  


     
  7. Click Submit to create and deploy the event generator.
  8. The Event Generator Definition page is displayed.

    Note: The event generator is created and deployed without channel rules, therefore, the first task is to define channel rules for the generator.

  9. Select Define a New Channel Rule.
  10. Set the properties as required. For a description of the available properties, see the topic applicable to the event generator you are creating:
  11. Click Submit to add the channel rule to the event generator.
  12. If required, repeat steps 6 to 8 to add additional channels.
  13. If multiple rules are defined, you can reorder them. Click the up or down arrow button to move entries up or down the list. Changes take effect immediately.
  14. Note: This functionality is provided for convenience only. Channel rule sequence is not functionally significant for Email or File event generators.

 


Defining Channel Rules for a File Event Generator

The File Generator Channel Rule Definition page allows you to define the properties for the channel rule.


 

Note: The settings displayed are dependent on the File Type selected.

The following table summarizes the available settings:

Setting

Description

Required/
Optional

From the File Type drop-down list, select Disk File or FTP.

Type of file event.

Required

From the Channel Name drop-down list, select a Message Broker channel.

The name of the Message Broker channel to which messages matching the configured criteria are published.

Required

In the Message Encoding field, if you do not want to select the default value, enter the name of the character set.

Note: This property can only be set if the message broker channel type is string.

The character set, if other than the default. This property applies only if the selected Channel Name is of type string. See http://www.iana.org/assignments/character-sets for valid values.

Optional

In the FTP Host Location field, enter the FTP server.

Location of the FTP server (IP address or host name) if the File Type is set to FTP.

Required if the File Type is set to FTP

In the FTP User Name field, enter the name.

Name required to access the FTP account.

Required if the File Type is set to FTP

Do one of the following to specify the FTP User Password:

  • Select the Use Alias option button, then select the password alias from the drop-down list.

  • Select the Use Value option button, then enter the password in the field.

If you enter the password in the Use Value field, it is stored in clear text in the event generator configuration file. To secure the password, add it to the password store. See Password Aliases and the Password Store. After the alias has been added to the password store, it is available for selection from the Use Alias drop-down list.

Required if the File Type is set to FTP

In the FTP Local Directory field, enter the path.

Specifies the path to a directory to which files from the FTP server are copied.

Required if the File Type is set to FTP

In the Directory field, enter a valid path.

If File Type is set to Disk, specifies the path to the directory to poll for files.

If File Type is set to FTP, specifies the path on the FTP server to poll for files.

Whether the File Type is Disk or FTP, we highly recommend that you specify a location that is writeable.

If the File Type is Disk, the system verifies that the directory is writeable before polling. If it is not writeable, the error count is incremented, and the reading and publishing process is skipped.

If the File Type is FTP, the files in the directory are read and published at each polling interval. If an error is encountered in deleting a file, the error is logged, and the error count is incremented. The inability to delete files will result in the same files being published at every polling interval.

Required

From the Pass by filename drop-down list, select Yes or No.

If set to Yes, the file is staged to the Archive directory and is passed as reference in the FileControlPropertiesDocument, which is sent as the payload of the message. If set to Yes, you must specify an Archive directory.

The default is No.

Required

From the Scan Subdirectories drop-down list, select Yes or No.

Specifies whether or not subdirectories are to be scanned.

Optional

In the File Pattern field, enter the pattern.

Optional pattern to filter on. Use ? to match any single character or * to match zero or more characters.

Optional

From the Sort by Arrival field, select Yes or No.

If set to Yes, the files are sorted by arrival time. This maintains the sequence (files are processed by arrival time).

The default is No.

Required

Specify the Polling Interval in days, hours, minutes, and/or seconds.

How often to poll the specified directory. Enter the number of days (if the interval is greater than one day) in the days field, then select the number of hours, minutes, and/or seconds from the drop-down lists as required.

Required

In the Read Limit field, enter the maximum number of files to read per polling sweep.

Maximum number of files to read per polling sweep. Valid values are 0 or greater. If set to 0 all files are read.

Required

From the Post Read Action drop-down list, select Delete or Archive.

Specifies what the event generator does with a file after it has been read.

The default is Delete.

Required

In the Archive Directory field, enter a valid path.

Specifies the path to a directory to which files are archived.

Required if Post Read Action is set to Archive, or Pass by filename is set to Yes

In the Error Directory field, enter a valid path.

Specifies the file system directory path to write the file if there is a problem reading it or publishing its contents to the Message Broker channel.

Required

In the Description field, enter a description of the channel rule.

A user-friendly description of the channel rule.

Optional

From the Publish As drop-down list, select a user name.

The Publish As property allows the file event generator to publish its messages as a specific user. Setting this property enables messages to be delivered to a secured message broker channel.

If Publish As is not specified, messages are published as Anonymous.

Optional


 

 


Defining Channel Rules for an Email Event Generator

The Email Generator Channel Rule Definition page allows you to define the properties for the channel rule.


 

Note: The settings displayed are dependent on the Server Protocol selected.

The following table summarizes the available settings:

Setting

Description

Required/
Optional

From the Server Protocol drop-down list, select IMAP or POP3.

Server type for the Email account. The default is POP3.

Required

From the Channel Name drop-down list, select a Message Broker channel.

The name of the Message Broker channel to which messages matching the configured criteria are published.

Required

In the Hostname field, enter the server name.

The mail server to poll.

Required

In the Port Number field, enter the email server port.

The mail server port.

The default is -1, which indicates the default port number for the mail server (143 for IMAP, 110 for POP3).

Required

In the Username field, enter the username for the account.

Username for the email account. The event generator polls the inbox for this account.

Required

Do one of the following to specify the Password:

  • Select the Use Alias option button, then select the password alias from the drop-down list.

  • Select the Use Value option button, then enter the password in the field.

If you enter the password in the Use Value field, it is stored in clear text in the event generator configuration file. To secure the password, add it to the password store. See Password Aliases and the Password Store. After the alias has been added to the password store, it is available for selection from the Use Alias drop-down list.

Optional

From the Attachments field, select Archive or Ignore.

Specifies how attachments are handled. If Archive is selected, attachments are saved to the Archive Directory.

Required

In the Polling Interval field, enter the number of seconds.

How often to poll the account. Enter the number of days (if the interval is greater than one day) in the days field, then select the number of hours, minutes, and/or seconds from the drop-down lists as required.

Required

In the Read Limit field, enter the maximum number of messages to read per polling sweep.

Maximum number of messages to read per polling sweep. Valid values are 0 or greater.

Required

From the Post Read Action drop-down list, select Delete, Archive, or Move.

Specifies what the event generator does with a message after it has been read. Move is only available with the IMAP protocol.

The default is Delete.

Optional

In the IMAP Move Folder field, enter a valid IMAP folder.

If Post Read Action is set to Move, the IMAP Move Folder specifies the folder to which the message is moved.

Required if Post Read Action is set to Move

In the Archive Directory field, enter a valid path.

If Post Read Action is set to Archive, the Archive Directory specifies the path to the archive location.

Required if Post Read Action is set to Archive

In the Error Directory field, enter a valid path.

Specifies the file system directory path to write the message and any attachments if there is a problem.

Required

In the Description field, enter a description of the channel rule.

A user-friendly description of the channel rule.

Optional

From the Publish As drop-down list, select a user name.

The Publish As property allows the email event generator to publish its messages as a specific user. Setting this property enables messages to be delivered to a secured message broker channel.

If Publish As is not specified, messages are published as Anonymous.

Optional


 

 


Defining Channel Rules for a JMS Event Generator

The JMS Generator Channel Rule Definition page allows you to define the properties for the channel rule.


 

The following table summarizes the available settings:

Setting

Description

Required/
Optional

From the Channel Name drop-down list, select a Message Broker channel.

The name of the channel to which messages matching the configured criteria are published.

Required

In the Property Name field, enter the name of the required JMS property.

If both Property Name and Property Value (below) are specified, the value of the property must match Property Value to trigger a match.

If only Property Name is specified, then the presence of the property triggers a match.

If both Property Name and Property Value are blank, all message on the JMS queue are a match.

Optional

In the Property Value field, enter the required property value.

If Property Name is specified, Property Value can be used to specify the value required for a match.

Optional

In the Description field, enter a description of the channel rule.

A user-friendly description of the channel rule.

Optional

From the Publish As drop-down list, select a user name.

The Publish As property allows the JMS event generator to publish its messages as a specific user. Setting this property enables messages to be delivered to a secured message broker channel.

If Publish As is not specified, messages are published as Anonymous.

Optional


 

 


Defining Channel Rules for a Timer Event Generator

The Timer Event Generator Channel Rule Definition page allows you to define the properties for the channel rule.

o


 

The following table summarizes the available settings:

Setting

Description

Required/
Optional

From the Channel Name drop-down list, select a Message Broker channel.

The name of the Message Broker channel to which messages matching the configured criteria are published.

Required

From the Effective Time drop-down lists, select the month, day, year, and time to initiate the first event.

The date and time the first event is to be generated. If the effective time has already passed, the event generator will not publish an event until the next Runs Every interval (see next setting). If the Runs Once option is selected, you must enter a valid, future, Effective Time or no event will be generated.

Required

Do one of the following:

  • Select the Timer handles DST option button.

  • Select the Timer ignores DST option button.

If you want to create an event that fires at the same time, every day, for the calendar year, you need to consider the impact of Daylight Savings Time (DST). That is, when standard time is switched to the DST and vice versa.

To ensure the Timer event is fired as per schedule taking DST into account, select Timer handles DST. Select Timer ignores DST to ignore the time difference attributed to DST.

Required

Do one of the following:

  • Select the Runs Once option button.

  • Select the Runs Every option button, then specify the interval in days, hours, minutes, and seconds.

Intervals from the Effective Time that each event is to be generated. If the Runs Once option is selected, the Effective Time constitutes the first and last event generated.

Note: Because the smallest time interval in a business calendar is a minute, if you specify a Business Calendar (see setting below), do not include seconds in the Runs Every interval.

Required

Do one of the following:

  • Select the Never Expires option button.

  • Select the Expires On option button, then select the month, day, year, and time from the drop-down lists.

The date and time the configured schedule expires. If the Never Expires option is selected, the configured schedule remains in effect indefinitely.

Required

In the Message field, enter the XML message to be delivered.

The content of the message to be delivered to the specified Message Broker channel. Message content is a single element of any type. Messages published are always XML messages.

Optional

From the Business Calendar drop-down list, select a business calendar.

If a business calendar is selected, the Runs Every interval represents business time calculated against the specified calendar. See About Business Calendars and Business Time Calculations.

If no calendar is selected, the Runs Every interval represents an absolute period (24 hour day, every day).

If you want to modify event generator channel rules and the business calendar associated with the channel rules, you must suspend the corresponding timer event generator before you make any changes. For information on suspending a timer event generator, see Suspending and Resuming Event Generators.

Optional

In the Description field, enter a description of the channel rule.

A user-friendly description of the channel rule.

Optional

From the Publish As drop-down list, select a user name.

The Publish As property allows the Timer event generator to publish its messages as a specific user. Setting this property enables messages to be delivered to a secured message broker channel.

If Publish As is not specified, messages are published as Anonymous.

Optional

Select or clear the Is Recoverable check box.

To recover the timer events that were missed because of server shutdown, select the Is Recoverable check box.

Optional


 

 


Defining Channel Rules for an MQ Series Event Generator

The MQSeries Generator Channel Rule Definition page allows you to define the properties for the channel rule.


 

The following table summarizes the available settings:

Setting

Description

Required/
Optional

From the Channel Name drop-down list, select a Message Broker channel.

The name of the Message Broker channel to which messages matching the configured criteria are published.

Required

In the Description field, enter a description of the channel rule.

A user-friendly description of the channel rule.

Optional

Specify the Polling Interval in days, hours, minutes, and/or seconds.

How often to poll the specified message queue. Enter the number of days (if the interval is greater than one day) in the days field, then select the number of hours, minutes, and/or seconds from the drop-down lists as required.

Required

From the Connection Type drop-down list, select TCP-IP or Bindings.

The connection mode to be used to connect to the WebSphere MQ queue manager. Select TCP-IP or Bindings.

Bindings is shared memory protocol that can only be used to connect to queue managers on the local system.

If TCP/IP is selected, you must also specify the MQSeries Server Host Address, Queue Manager Channel Name, and Queue Manager Port.

Required

In the MQSeries Queue Manager field, enter the name of the queue manager.

Name of the WebSphere MQ queue manager to connect to.

Required

In the MQSeries Server Host Address field, enter the IP address or host name.

IP address or host name for the WebSphere MQ server.

Required if the Connection Type is set to TCP-IP

In the MQSeries Queue Manager Channel Name, enter the MQ channel name for the connection.

Specifies the name of the server connection channel used to connect to the WebSphere MQ queue manager.

Required if the Connection Type is set to TCP-IP

In the MQSeries Queue Manager Port Number field, enter the port number of the queue manager.

The TCP/IP port number used to connect to the WebSphere MQ queue manager.

Required if the Connection Type is set to TCP-IP

In the MQSeries Queue Manager CCSID field, enter the CCSID for the locale expected by the application.

Specifies a Coded Character Set Identifier (CCSID) supported by WebSphere MQ. For example, for the en_US.iso88591 locale, the CCSID is 819, for the ja_JP.SJIS locale, it is 932.

For more information about supported CCSIDs, and about converting between message data from one coded character set to another, see the WebSphere MQ documentation for your platform.

Optional

In the MQSeries Queue Name field, enter the name of the queue.

Name of the WebSphere MQ queue to monitor for messages.

Required

In the MQSeries Error Queue Name field, enter the name of the queue.

Specifies the name of the queue for messages that cannot be processed due to an error condition.

For example, if the message type retrieved from the queue does not match the message type set for the Message Broker channel, an exception would be generated during processing.

If you specify the name of an error queue, such errored messages are moved to the specified queue.

If you do not specify the name of an error queue, the errored message will remain in the original queue.

Optional

To enable content filtering, enter the fully qualified name of the content filter class in the Content Filter Class field.

The fully qualified name of the class implementing the event content filtering logic. As described in Content Filtering, this class is an extension of the com.bea.wli.mbconnector.mqseries.AbstractContentFilter class.

Optional

Select or clear the Require MQ Data Conversion check box.

When checked, the MQGMO_CONVERT option is enabled, and directs the queue manager to convert the contents of the message retrieved from the queue. This option must be checked when retrieving messages in a cross platform environment involving mainframes (for example, a mainframe application puts a message on the queue that is retrieved by the event generator on a PC). This option is typically enabled to convert messages to the native character set as specified by the CCSID.

Optional

In the Specify Number of Threads field, enter the number of processing threads.

Number of event generator processing threads.

Required

In the Message Per Poll field, indicate the number of messages to be retrieved by each thread in each polling cycle.

The number of messages to be retrieved by each event generator thread in each polling cycle. Specify -1 to retrieve all the messages available on the queue in each polling cycle.

Optional

If WebSphere MQ authorization is enabled, specify the user name in the MQSeries User Name field.

The WebSphere MQ user name used to connect to the WebSphere MQ queue manager.

Optional

If WebSphere MQ authorization is enabled, specify the password in the MQSeries User Password field.

The WebSphere MQ user password used to connect to the Web sphere MQ queue manager.

Optional

Select the SSL Required check box if you want to configure a SSL port for the MQ Series event generator.

When the SSL Required check box is selected, the message data from the queue is sent via a secure port.

Only one-way SSL is supported.

Optional

Enter the MQ Cipher Suite.

The cipher suite algorithm is used to encrypt and decrypt message communication between the MQSeries server and the MQSeries client. You must provide the SSL cipher suite information before you put or get messages from the queue.

Required only for SSL Connection

Enter the SSL Trust Store.

This value represents the location of the trust store.

Optional

Enter the SSL Trust Store Type

This value represents the type of trust store.

Optional

Enter the SSL Trust Store Password

The password used for the SSL trust store.

Required only when SSL trust store location is specified.

From the Publish As drop-down list, select a user name.

The Publish As property allows the event generator to publish its messages as a specific user. Setting this property enables messages to be delivered to a secured message broker channel.

If Publish As is not specified, messages are published as Anonymous.

Optional


 

Content Filtering

Filtering the messages in a queue based on message contents requires a custom content filter class that extends the com.bea.wli.mbconnector.mqseries.AbstractContentFilter class.

Listing 6-1 Content Filter

package com.bea.wli.mqseries.eventgen.contentfilter;

import com.bea.wli.mbconnector.mqseries.AbstractContentFilter;

public class ContentFilter extends AbstractContentFilter

{

    public ContentFilter()
    {
    }

    public boolean matchContent(byte abyte[])
    {
        /*This function always returns true, ensuring that all
           messages generate the event. However the user should
           put in his content filtering logic based on the
           contents of the message here. The abyte[] byte array
           parameter to this function is the byte array
           representation of the message. Return true if the
           message should generate an event, otherwise return
           false*/
       return true;
    }

The parameter to this function is the byte array representing the message retrieved from the queue by the event generator. You can create content filtering logic by performing required checks on the contents of the message represented by the byte array. Return a Boolean value of True from the function if the message should generate an event. Otherwise return a Boolean value of False.

Once it is defined, the class implementing the content filtering logic should be bundled in a jar file and included in the WebLogic CLASSPATH.

To create a custom content filter class:

  1. Extract the mqegEjbUtil.jar from the WL_HOME\integration\egs\mqEG.ear file and include it in the CLASSPATH variable of the environment where the custom content filter class will be developed.
  2. Create the class by extending com.bea.wli.mbconnector.mqseries.AbstractContentFilter
  3. Note: This class is present in the mqegEjbUtil.jar file that you extracted in step 1.

  4. Write the Code for the Content Filter Class. Listing 6-1 provides an example.
  5. Compile the custom content filter class.
  6. Extract the AbstractContentFilter class from the mqegEjbUtil.jar and store in a directory in your file system by maintaining the package structure.
  7. Create a JAR, for example, mycontentfilter.jar, which contains the com.bea.wli.mbconnector.mqseries.AbstractContentFilter class and the custom content filter class compiled in step 4.
  8. Include this JAR file in the CLASSPATH variable in the WebLogic Start Server script.
  9. Start the WebLogic Server.
  10. When you create the channel rule for the event generator, specify the fully qualified class name of the content filter. For example, com.bea.wli.mqseries.eventgen.ContentFilter.

 


Defining Channel Rules for an HTTP Event Generator

The HTTP Generator Channel Rule Definition page allows you to define the properties for the channel rule.


 

The following table summarizes the available settings:

Setting

Description

Required/
Optional

From the Channel Name drop-down list, select a Message Broker channel.

The name of the Message Broker channel to which HTTP events are published.

Required

In the Description field, enter a description of the channel rule.

A user-friendly description of the channel rule.

Optional

From the Publish As drop-down list, select a user name.

The Publish As property allows the event generator to publish its messages as a specific user. Setting this property enables messages to be delivered to a secured message broker channel.

If Publish As is not specified, messages are published as Anonymous.

Optional


 

 


Defining Channel Rules for a RDBMS Event Generator

The RDBMS Event Generator Channel Rule Definition page allows you to define the properties for the channel rule.


 

The following table summarizes the available settings:

Setting

Description

Required/Optional

From the Channel Name drop-down list, select a Message Broker channel.

The name of the Message Broker channel to which messages matching the configuration criteria are published. If you are publishing to an XML or string channel, then an XML schema (.xsd) file will be created in the WebLogic domain folder under a directory with the same name as the channel rule definition. You can use this .XSD for validations.

If you select a RawData channel type from the Channel Name drop-down list, the event generator publishes a serialized weblogic.jdbc.rowset.WLCachedRowSet containing the database rows that were polled/processed.

Required

In the Description field, enter a description of the channel rule.

A user-friendly description of the channel rule.

Optional

In the Event Name field, enter a unique event name.

Identifies a unique event name across channels and across RDBMS Event Generators.

Required

Specify the Polling Interval in days, hours, minutes, and/or seconds.

Specifies how often the Database is polled. Enter the number of days (if the interval is greater than one day) in the days field, and select the number of hours, minutes, and/or seconds from the drop-down lists provided.

Required

From the Datasource JNDI Name drop-down list, select a jndi name.

Identifies the jndi name of the data source connection for the database. The list is populated based on the data sources configured in the Weblogic Server where the event generator is running.

For more information on configuring data sources, see the RDBMS Event Generator User Guide.

Required

In the Max Rows Per Poll field, enter the number of records to be retrieved by each thread in each polling cycle.

Specifies the number of records to be retrieved by each thread in each polling cycle. This number must be a valid integer greater than 1 and less than 10,000.

Note: The default value is 1. Please change this value to a value that suits your requirements.

Required

In the Max Rows Per Event field, enter the number of records that will be part of the payload of a single event.

For example, if there are 10 records of interest and the Maximum Rows Per Event is 3, there will be 3 events with 3 records each, and an event with the remaining record. If there are 2 records of interest and the Maximum Rows Per Event is 3, there will still be an event with 2 records.

Required

Event Type Selection:

Select the required event type; Trigger or Query/Post Query.

A Trigger event notifies an Insert, Update, or Delete event occurring in a database table.

Query/Post Query notifies records of interest based on a select query given on a database table and executes the SQL specified in the Post Query for each event posted.

Required

Select a user name from the Publish As drop-down list.

The Publish As property enables the event generator to publish its messages as a specific user. Setting this property allows messages to be delivered to a secured message broker channel.

If Publish As is not specified, messages are published as Anonymous.

Optional

For a Trigger Event

From the Trigger drop-down list, select Insert, Delete, or Update.

Specifies that an Insert, Update, or Delete event has occurred in a database table using the trigger mechanism.

Note: While creating Trigger Type Events, the Login ID/Password supplied for the data source must have permission to CREATE/DROP Tables, Triggers, and Sequences (Sequence for Oracle only).

Required (Default is Insert)

In the Table Name field, enter the database table name on which the trigger event will be defined.

Enter the name of the database table. Use the corresponding syntax for the following databases:

Oracle: SCHEMA.TABLENAME

DB2 UDB: SCHEMA.TABLENAME

Informix Dynamic Server: Catalog.Schema.Table

SQL Server: Catalog.Schema.Table

Sybase Adaptive: Catalog.Schema.Table

Note: Click the Table Name link to view the schemas and table names. Select the radio button next to the table name you require and click Submit to confirm your selection.

Required

Select Table Columns to publish

Click this link to browse the columns of the database table entered in the Table Name field. Select the desired columns by selecting the check box beside the desired column. Click Select Columns to choose the checked columns.

Only those columns of the row you select are published when an Event occurs. For example, when 2 of 4 columns are selected for an Update Event, this does NOT mean that the Event is going to listen for updates on those 2 columns alone. The two are not connected. When a Trigger Type Event is configured, it is for an entire Row. An Event will be fired even if only 1 column is chosen and even if it is not one of the updated columns. For Delete and Insert Trigger Events, the selected columns of the Inserted/Deleted row will be published.

If you select Update Event, every column chosen will get published along with a similar column with "OLD_" as the prefix. The "OLD_" column will contain the column value before the update occurred.

If no columns are selected, all the columns in the table will be published.

Optional

In the No of Threads field, enter the number of processing threads.

Specifies the number of event generator processing threads. If the number entered is greater than 1, then the events may not be delivered in the same order as they were in the database. The greater the number of threads, the better the concurrency, as with any concurrent system, order is sacrificed for higher throughput.

The maximum number of rows and maximum number of events specified above are related to the number of processing threads. The maximum number of rows per poll is equal to the maximum number of rows per event multiplied by the maximum number of threads.

Required

For a Query/Post Query event type

In the first text area, specify the SQL Query.

This SQL Query is executed and returns records of interest. The Query must be a Select Query. The Query is not validated for correctness.

For example, SELECT FIRST_NAME, LAST_NAME, EMPLOYEE_ID FROM RDBMS_USER.EMP_TBL WHERE STATUS = `Intern'.

Required

In the Post Query text area, specify the Post Query.

Specifies a Post Query that will be executed for every row returned by the SQL Query above. You must enter the exact names of the columns and the @ prefix to provide runtime values. Post Query is not validated for correctness.

For example, DELETE FROM RDBMS_USER.EMP_TBL WHERE FIRST_NAME = @FIRST_NAME.

"SELECT *" will not work if the Post Query refers to a column in the Query. The selected columns must be listed individually. All SQL statements must use fully qualified table names.

The Post Query is only executed if the Query specified in the SQL Query field returns a ResultSet and if it contains one or more rows.

If you leave the Post Query field empty and enter a SELECT query in the SQL Query field, the selected row is deleted after it gets published. If no-op, meaning "No Operation", is specified in the Post Query field, the selected rows are not deleted automatically. If you do not want to specify a Post Query and also do not want the selected rows to be deleted automatically, then you must enter no-op in the Post Query field. Also, automatic-delete only works if a SELECT query refers to a single Table (SELECT DEPT. NAME, EMP.ADDRESS FROM DEPT., EMP WHERE DEPT.NAME = EMP NAME refers multiple tables). Automatic delete does not work for DB2 and Informix.

Optional


 

 


Listing and Locating Event Generators

The View All page displays the following information for each configured event generator:


 

Note: The status column is not included for RDBMS event generators.

Property

Description

Name

Name assigned to the event generator. This is a link to the Event Generator Definition page.

Channel Count

The number of channel rules defined for the generator.

Files Read (File)
Emails Read (Email)
Messages Read (JMS, Timer, MQ, RDBMS, and HTTP)

Number of items read by the event generator since the read counter was last reset or the server was last restarted.

Note: Suspending and resuming an event generator also resets the counters.

Last Reset Time

Time the read counter was last reset.

Error Count

Number of errors since the error counter was last reset or the server was last restarted. The number is the total across all channel rules (an error directory is configured for each channel rule).

Error Reset Time

Time the error counter was last reset.

Status

Status of the event generator (running or suspended).

Note: The status for the RDBMS event generator is displayed on the RDBMS Event Generator Definition page.


 

To list and locate File, Email, JMS, or Timer event generators:

  1. From the home page, select the Event Generator module.
  2. From the left panel, select the type of event generator (File, Email, JMS, or Timer).
  3. To locate a specific event generator, do one of the following:

To list and locate HTTP, MQSeries, or RDBMS event generators:

  1. From the home page, select the Event Generator module.
  2. From the left panel, select the type of event generator (HTTP, MQ Series or RDBMS).
  3. To locate a specific event generator, do one of the following:

 


Viewing and Updating Event Generator Channel Rules

The Event Generator Definition page allows you to view and update the channel rules. For a JMS event generator, you can also update the default rule channel.

To update the default rule channel for a JMS event generator:

  1. Locate the event generator. See Listing and Locating Event Generators.
  2. Click the event generator name to display the Event Generator Definition page.
  3. Click Edit Generator Details.
  4. The JMS Event Generator Details page is displayed.


     
  5. Select a new channel from the Default Rule Channel drop-down list.
  6. Click Submit to update.

To view channel rules:

  1. Locate the event generator. See Listing and Locating Event Generators.
  2. Click the event generator name to display the Event Generator Definition page.

To add or update channel rules:

  1. Do one of the following to display the Generator Channel Rule Definition page:
  2. Set the properties as required. For a description of the available properties, see the topic applicable to the event generator you are creating:
  3. Defining Channel Rules for a File Event Generator.

    Defining Channel Rules for an Email Event Generator.

    Defining Channel Rules for a JMS Event Generator.

    Defining Channel Rules for a Timer Event Generator.

    Defining Channel Rules for an MQ Series Event Generator.

    Defining Channel Rules for an HTTP Event Generator.

  4. Click Submit to add or update the channel rule.

To delete channel rules:

  1. Click the check box to the left of the channel rules to be deleted.
  2. Click Delete.
  3. A confirmation dialog box is displayed.

  4. Click OK to confirm.
  5. The selected channel rules are deleted.

To reorder channel rules:

Note: Not available for all event generator types.

Click the up or down arrow button to move entries up or down the list. Changes in list order take effect immediately.

 


Suspending and Resuming Event Generators

You can suspend or resume an event generator from the View All page. Suspending a generator moves it to the deactivated state. Resuming redeploys the event generator.

Note: The messages read and error counts are stored in memory only; the counts are not stored to disk or other persistent store. Therefore, when you suspend and resume an event generator, the messages read and error counts are reset to zero.

Note: If you attempt to resume a generator that is already running, or suspend a generator that is already suspended, the command is ignored.

Note: When an event generator is suspended before a server restart, it automatically switches to Running mode on restart. This functionality is uniform across all event generators.

To suspend an event generator:

  1. Locate the event generators to be suspended. See Listing and Locating Event Generators.
  2. Click the check box to the left of the event generators you want to select.
  3. Click Suspend.
  4. The selected generators are suspended.

    Note: For all event generators, when an event generator is suspended, the counter resets to 0. However, when you suspend a RDBMS event generator, the event generator resets to 0 AND the message changes to "Last-Reset-Time".

To resume an event generator:

  1. Locate the event generators to be resumed. See Listing and Locating Event Generators.
  2. Click the check box to the left of the event generators you want to select.
  3. Click Resume.
  4. The selected generators are resumed.

 


Resetting the Counters

You can reset the read and error counters from the View All page.

To reset the read counter:

  1. Locate the event generators to be reset. See Listing and Locating Event Generators.
  2. Click the check box to the left of the event generators you want to select.
  3. Do one of the following:

To reset the error counter:

  1. Locate the event generators to be reset. See Listing and Locating Event Generators.
  2. Click the check box to the left of the event generators you want to select.
  3. Click Reset Error Count.

 


Deleting Channel Rules

You can delete any channel rules from the Event Generator Definition page.

To delete a channel rule:

  1. Locate the event generator. See Listing and Locating Event Generators.
  2. Click the event generator name to display the Event Generator Definition page.
  3. Click the check box to the left of the channel rules to be deleted.
  4. Click Delete Selected Channel Rules.
  5. The selected channel rules are deleted.

    Note: You cannot delete a RDBMS event generator channel rule if a transaction is inserting rows into the User Table on which the event in question has been configured. You must wait for the transaction to complete before deleting the channel rule.

 


Deleting Event Generators

You can delete an event generator from the View All page.

To delete an event generator:

  1. Locate the event generators to be deleted. See Listing and Locating Event Generators.
  2. Click the check box to the left of the event generators you want to delete.
  3. Click Delete.
  4. The selected generators are deleted.

 

Skip navigation bar  Back to Top Previous Next