Contents

Objective

To demonstrate working of an application which uses JMSIn and JMSOut adapters to send and receive messages using BEA WebLogic.

Prerequisites

  • Start Fiorano Enterprise Server (FES) and Fiorano Peer Server (FPS).
  • Login to eStudio application.
    • Understand the basic menus and perspectives (panels) in the eStudio application.
  • Start Weblogic Server and note down the username, password and the URL.
  • Add the resources: wljmsclient.jar and wlthint3client.jar to JMS adapters.

    Icon

    Refer Adding Resources to a Microservice section for the instructions.

Scenario

Create JMS module 'SystemModule1' with Destination name 'Queue1' and Destination Type 'Queue' in Weblogic server. Send message using Feeder component to Destination 'Queue1' using JMSIn component in the BEA Weblogic server. JMSOut component fetches this message from Queue1.

Components Used

How it Works

JMSIn component retrieves messages (as Text, Bytes or Map) from a component and sends them to a JMS Topic/Queue and configure the component to publish or send a message on a JMS Server at runtime.
JMSOut component retrieves messages from a JMS Topic/Queue and sends the message received from a Topic/Queue to another component.

Setting up the Example

Configuring JMSIn component

To configure JMSIn component, perform the following action in eStudio:

  1. Add a new Event Process with name 'WebLogic_Example'.
  2. Drag the JMSIn component from MOMs category in the Micro Service Palette to the Fiorano Orchestrator.


    Figure 1: Adding JMSIn component to Fiorano Orchestrator
     
  3. Double-click the JMSIn component in the Orchestrator to open Configuration Property Sheet (CPS).


    Figure 2: Managed Connection Factory in CPS
     
  4. Perform the following actions under Provider URL Settings section:
    1. From JMS Provider drop-down, select 'BEA WebLogic'.
    2. Click the Connection Configuration Ellipsis button, provide the values for Server URL, JMS username and JMS password in ConnectionConfig dialog box and click OK.


      Figure 3: Component Configuration in ConnectionConfig dialog box
       
  5. Under JNDI Settings section, click the JNDI Configuration Ellipsis button.


    Figure 4: JNDI Configuration
     
  6. In the JndiConfig dialog box, provide values for JNDI Username, JNDI Password and click OK.


    Figure 5: Component Configuration in JNDIConfig dialog box
     
  7. Click the Test button to test the connection. XML message indicating successful connection appears in Test Connection Configuration dialog box. Click Close.


    Figure 6: Connection Successful message
     
  8. Under Connection Properties section, select ClientID '<auto-generated>' to generate unique ClientID (same ID for JMSIn and JMSOut may create connection issues) and click Next.


    Figure 7: ClientID changed to <auto-generated> to generate unique ID
     
  9. In the Interaction Configurations screen, click the Destination Configuration Ellipsis button.


    Figure 8: Destination Configuration
     
  10. In the DestinationConfig dialog box, provide the following values and click OK.
    1. Destination Name: ./SystemModule1!Queue1 (format is ./<ModuleName>!<DestinationName>)
    2. Destination Type: QUEUE (use QUEUE for single receiver and 'TOPIC' for multicasting the message).


      Figure 9: Component Configuration in DestinationConfig dialog box
       
  11. Click the Test button in the Interaction Configurations to send sample input message.


    Figure 10: Test message
     
  12. Click Execute in Test Interaction Specifications dialog box; a confirmation message 'Message sent to Destination' with the destination name appears.


    Figure 11: Confirmation message that the message has reached the destination

  13.  Click Close and click Finish to complete the JMSIn configuration.

JMSIn component will be ready to send messages to JMS Queue/Topic.

Configuring JMSOut component

Configure JMSOut component by performing the same actions as mentioned above. After completing the configuration, notice that only the output port will be attached to the component as Scheduling is enabled by default.


Figure 12: Scheduler Configurations settings enabled by default for JMSOut component


Figure 13: JMSOut component with only the output port after configuration

JMSIn component will be ready to receive messages from a JMS Server Queue/Topic

Composing the Event Process

To work with the JMSIn and JMSOut components, compose the Event Process by performing the below actions:

  1. Drag one Feeder component and two Display components from Util category in the Micro Service Palette to the WebLogic_Example Fiorano Orchestrator.
  2. Connect the components in the following manner:
    1. Feeder1 component output port to JMSIn component input port

      Icon

      Default configuration in Feeder component is sufficient to run WebLogic_Example successfully.

    2. JMSIn component output port to Display1 component input port; rename Display1 to 'Display_Confirmation' as JMSIn Output port sends out a confirmation message.
    3. JMSOut component output port to Display2 component input port; rename Display2 to 'Display_Message' as JMSOut output port sends out the message received on the queue.


    Figure 14: JMSIn and JMSOut after connecting with supporting components

Running the Example

To run the example, perform the following actions in the Fiorano Orchestrator:

  1. Click Check Resource and Connectivity icon (or press ALT+SHIFT+C) to check resource and connectivity.
  2. Click Run Event Process icon (ALT+SHIFT+R) to run the event process.
  3. One Feeder window and two Display windows appear.
  4. Open Feeder1, provide a custom message (replace the text 'Input Text' with 'Test Message') and click the Send button.


    Figure 15: Sending custom message using Feeder
     
  5. Confirmation message 'Message sent to Destination' with the destination name gets displayed in the Display_Confirmation window.


    Figure 16: Confirmation message displayed in the Display_Confirmation window
     
  6. The message sent to the destination through the feeder gets displayed in the Display_Message window.


    Figure 17: Message received from Destination displayed in Display_Message window

Reference

Adaptavist ThemeBuilder EngineAtlassian Confluence