Skip to main content

skip to main content

developerWorks  >  SOA and Web services | WebSphere  >

Proactive WebSphere Enterprise Service Bus (WESB) Mediation: Timing a Mediation Module

developerWorks
Go to the previous pagePage 5 of 12 Go to the next page

Document options
PDF format - Fits A4 and Letter

PDF - Fits A4 and Letter
1615 KB (37 pages)

Get Adobe® Reader®

Sample code


My developerWorks needs you!

Connect to your technical community


Rate this tutorial

Help us improve this content


Part 4 : Creating and configuring the necessary resources on WESB

We can create the following resources through the admin console of WESB using the following:

  • "SampleScheduler" Scheduler (which would invoke the messaging task periodically)
  • "SampleSIBus" Service Integration Bus (which holds the queue on which the trigger message is posted)
  • "SampleTriggerQ" queue (which holds the trigger message from the task)
  • JMS resources (Connection factory and the JNDI name pointing to the Queue) and the activation spec required by the messaging task and the JMS export of the timer mediation module respectively.

Start the test server (WESB or WPS) and open the admin console. Go to Resources > Schedulers. Create a new scheduler with the following properties (as we see in Figure 20):

  • Name: SampleScheduler
  • JNDI Name: jndi/SampleScheduler
  • Data source JNDI name : jdbc/BPEDB (it is suggested that you create your own derby DB and specify the same here)
  • Table Prefix: SB
  • Poll Interval: 30
  • Work Manager JNDI Name : wm/default


Figure 20. Creating a scheduler
Creating a scheduler

Apply this configuration and save to the master configuration. Now, we need to create the scheduler tables. Click the checkbox next to the SampleScheduler in the list of schedulers screen and click the button "Create tables". You should see the following message – "Tables for scheduler SampleScheduler created successfully" at the top of the page.

Now we will create the "SampleSIBus" bus. On the admin console, go to "Service integration > Buses". Create a new bus with the following values and save the configuration.

  • Name : SampleSIBus
  • JNDI Name: jndi/SampleScheduler

We will now create the "SampleTriggerQ" queue on the SampleSIBus bus. Go to Service Integration > Buses > SampleSIBus > Bus Members. We should first create a bus member before creating a queue. Create a new bus member with the following configuration. Server : server1, Data store, "Create default data source with generated JNDI name" radio clicked. Save to the master configuration.

Now, go back to SampleSIBus and choose "Destinations". Create a new queue with the following configuration : Identifier : SampleTriggerQ and the bus member as the one created in the previous step. Save to the master configuration. The destinations page for the SampleSIBus should look like the following.



Figure 21. Creating SampleTriggerQ on SampleSIBus
Creating SampleTriggerQ on SampleSIBus

Now, we will create the "SampleTriggerQCF" queue connection factory. On the admin console, open Resources > JMS > Queue connection factories. Create a new connection factory, with the following values and save to master configuration.

  • Default messaging provider
  • Name : SampleTriggerQCF
  • JNDI Name : jms/SampleTriggerQCF
  • Bus Name : SampleSIBus

Next, we’ll create the JMS queue resource to access the SampleTriggerQ we created on the SampleSIBus. On the admin console, open Resources > JMS > Queues. Create a new Queue, with the following values and save to master configuration.

  • Default messaging provider
  • Name : SampleTriggerQ
  • JNDI Name : jms/SampleTriggerQ
  • Bus Name : SampleSIBus
  • Queue Name : SampleTriggerQ

Now, let’s create the activation spec for the JMS export of the TimerMediationModule to pick up the trigger messages. On the admin console, open Resources > JMS > Activation specifications. Create a new activation specification with the following values and save to master configuration.

  • Default messaging provider
  • Name : SampleActivationSpec
  • JNDI Name : jms/SampleActivationSpec
  • Destination type : Queue
  • Destination JNDI Name : jms/ SampleTriggerQ
  • Bus Name : SampleSIBus

This completes the creation and configuration of the necessary resources on the WESB admin console. Restart the server once you are at this point.In the next section, we would implement the "SampleStartupBean" startup bean.



Back to top



Go to the previous pagePage 5 of 12 Go to the next page