Managing WebLogic Integration Solutions
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:
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:
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.
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.
wli.jmseg.EatSoapActionElement
property for event generators.
The following table lists the pages you can access from the Event Generator module. The tasks and topics associated with each are provided:
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:
Note: Names are case insensitive. Leading or trailing spaces are removed.
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.
The Create New page for the selected type is displayed.
For example, the Create New File Event Generator page shown in the following figure.
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.
Note: This functionality is provided for convenience only. Channel rule sequence is not functionally significant for Email or File event generators.
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:
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. |
|
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. |
|
Location of the FTP server (IP address or host name) if the File Type is set to FTP. |
||
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. |
||
Specifies the path to a directory to which files from the FTP server are copied. |
||
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. |
||
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. |
||
From the Scan Subdirectories drop-down list, select Yes or No. |
||
Optional pattern to filter on. Use |
||
If set to Yes, the files are sorted by arrival time. This maintains the sequence (files are processed by arrival time). |
||
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. |
|
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. |
|
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. |
|
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 |
|
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. |
||
In the Description field, enter a description of the channel rule. |
||
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 |
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:
From the Server Protocol drop-down list, select IMAP or POP3. |
||
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. |
|
The default is -1, which indicates the default port number for the mail server (143 for IMAP, 110 for POP3). |
||
Username for the email account. The event generator polls the inbox for this account. |
||
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. |
||
Specifies how attachments are handled. If Archive is selected, attachments are saved to the Archive Directory. |
||
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. |
||
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. |
|
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. |
|
If Post Read Action is set to Move, the IMAP Move Folder specifies the folder to which the message is moved. |
||
If Post Read Action is set to Archive, the Archive Directory specifies the path to the archive location. |
||
Specifies the file system directory path to write the message and any attachments if there is a problem. |
||
In the Description field, enter a description of the channel rule. |
||
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 |
The JMS Generator Channel Rule Definition page allows you to define the properties for the channel rule.
The following table summarizes the available settings:
The Timer Event Generator Channel Rule Definition page allows you to define the properties for the channel rule.
The following table summarizes the available settings:
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. |
|
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. |
|
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. |
||
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. |
||
The date and time the configured schedule expires. If the Never Expires option is selected, the configured schedule remains in effect indefinitely. |
||
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. |
|
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. |
|
In the Description field, enter a description of the channel rule. |
||
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 |
||
To recover the timer events that were missed because of server shutdown, select the Is Recoverable check box. |
The MQSeries Generator Channel Rule Definition page allows you to define the properties for the channel rule.
The following table summarizes the available settings:
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. |
|
In the Description field, enter a description of the channel rule. |
||
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. |
|
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. |
|
In the MQSeries Queue Manager field, enter the name of the queue manager. |
||
In the MQSeries Server Host Address field, enter the IP address or host name. |
||
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. |
|
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. |
|
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. |
|
In the MQSeries Queue Name field, enter the name of the queue. |
||
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. |
|
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 |
|
When checked, the |
||
In the Specify Number of Threads field, enter the number of processing threads. |
||
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. |
|
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. |
|
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. |
|
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. |
|
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. |
||
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 |
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.
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
.
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.Note: This class is present in the mqegEjbUtil.jar
file that you extracted in step 1.
AbstractContentFilter
class from the mqegEjbUtil.jar
and store in a directory in your file system by maintaining the package structure.
The HTTP Generator Channel Rule Definition page allows you to define the properties for the channel rule.
The following table summarizes the available settings:
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:
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 ( If you select a RawData channel type from the Channel Name drop-down list, the event generator publishes a serialized |
|
In the Description field, enter a description of the channel rule. |
||
Identifies a unique event name across channels and across RDBMS Event Generators. |
||
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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 |
||
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). |
|
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: 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. |
|
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. |
||
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. |
|
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'. |
||
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. " The Post Query is only executed if the Query specified in the SQL Query field returns a 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 |
The View All page displays the following information for each configured event generator:
Note: The status column is not included for RDBMS event generators.
?
to match any single character or *
to match zero or more characters.), then click Search. The generators matching the search criteria are displayed.
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.
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.
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.
You can reset the read and error counters from the View All page.
You can delete any channel rules from the Event Generator Definition page.
You can delete an event generator from the View All page.