Channel files define the Message Broker channels available in a WebLogic Integration application. Channel files must be placed in a Schema project in your application. Otherwise, they will not be built when you build your application or be visible to your application components.
This topic includes the following sections:
To Create Channels Files in Your Application
The New File dialog box is displayed.
Note: As indicated by the file extension in the New File dialog box, the Channel file is automatically appended with channel.
Your new channel file is created and displayed in the Schemas folder in the Application tab. This file is a template file. The contents of the template file is displayed in the Source View, which you can edit to define the Message Broker channels for your application. For information about how to edit your channel file template, see To Configure Your Template Message Broker Channel File.
Channel files are XML files and are valid against an XML Schema. The Schema is available at the following location in your WebLogic Platform installation:
BEA_HOME\weblogic81\integration\lib\xmlschema\config\ChannelFile.xsd
In the preceding line, BEA_HOME represents the directory in which you installed WebLogic Platform.
To Configure Your Template Message Broker Channel File
Note the following characteristics of the channel file:
This is a namespace that references the names used in the channel file schema. Do not edit this line.
The channelPrefix uniquely identifies the channels in your file across the entire domain. To identify your channels, you can change the channelPrefix. If you want to ensure that you do not accidentally send or receive messages from other applications, we recommend that you use a ChannelPrefix that is the same as your Workshop application name. However, if you want to use the Message Broker for inter-application communication, these applications should use channels with the same prefix, such as "/sharedChannels".
This namespace refers to schemas that are used for event generator metadata references. The schemas are created for you when you create a new process application or a new Schemas project folder. This line can safely be removed if your channels do not publish messages via event generators. To learn more about how to create schemas, see To Create Additional Schema Project Folders. To learn about creating and managing event generators, see the following:
This namespace refers to schemas that are used by the file event generator to pass payload for pass-by-filename. The schemas are created for you when you create a new process application or a new schemas project folder. This line can safely be removed if you are not using your channels to publish messages via file event generators. To learn more about how to create schemas, see To Create Additional Schema Project Folders.
This namespace refers to schemas that are used by some of the sample channels. The schemas are created for you when you create a new OAG Schemas project folder. This line can safely be removed if none of the channels in your file refer to the OAG schemas. To learn more about how to create schemas, see To Create Additional Schema Project Folders.
Warning: Make sure that the namespaces you reference in your channel files exist in your application. If they do not, the channel file compiles without problems, but you will get a run-time error when you try to run your application.
Edit the attributes of this element as follows:
-xml: For channels routing XML data.
-rawData: For channels routing Raw Data.
-string: For channels routing String messages.
-none: For channels that are not going to be used to route messages but are used as place holders only.
For example, a simple channel routing XML data would look like:
There are several additional attributes that you can add to the <channel> element:
-Email event generator: qualifiedMetadataType="eg:EmailEventGenerator".
-File event generator: qualifiedMetadataType="eg:FileEventGenerator"
-JMS event generator: qualifiedMetadataType="eg:JmsEventGenerator"
-Timer event generator: qualifiedMetadataType="eg:TimerEventGenerator"
To learn about creating and managing event generators using the WebLogic Integration Administration Console, see Event Generators in Managing WebLogic Integration Solutions at the following URL:
http://download.oracle.com/docs/cd/E13214_01/wli/docs81/manage/evntgen.html
If the Message Broker is unable to resolve the URI to which it is sending a message, the message is not discarded. Rather, it is routed to one of three dead-letter channels, depending on the data type. For example, when no subscribers are found, or registered subscribers do not match because of unsatisfied filter conditions, the message is sent to the appropriate dead-letter channel. WebLogic Integration provides the following dead-letter channels:
For example, an unmatched message published to an XML channel (that is, a channel that has messageType = "xml") is routed to the /deadletter/xml channel.
At design time, the dead-letter channels are available when you create MB Publish and MB Subscription controls. Your business processes can publish and subscribe to the dead-letter channels. You can use the dead-letter channels when you design error handling. For example, you can create a business process that includes static subscriptions to the dead-letter channels and design error-handling code to handle the unmatched messages published to those channels.
The Message Broker module in the WebLogic Integration Administration Console allows you to monitor and manage all the Message Broker channels in your application, including the dead-letter channels. To learn about accessing information about the dead-letter channels and dead-letter counts in your deployed application, see Message Broker in Managing WebLogic Integration Solutions at the following URL:
http://download.oracle.com/docs/cd/E13214_01/wli/docs81/manage/msgbroker.html
Understanding the Message Broker Channels in Your Tutorial Application
Using Event Generators to Publish to Message Broker Channels
How Do I: Publish to Message Broker Channels?
How Do I: Subscribe to Message Broker Channels?
Event Generators at http://download.oracle.com/docs/cd/E13214_01/wli/docs81/manage/evntgen.html
Message Broker at http://download.oracle.com/docs/cd/E13214_01/wli/docs81/manage/msgbroker.html
![]() |
![]() |