JBOSS Messaging Integration Guide

Published on February 2017 | Categories: Documents | Downloads: 90 | Comments: 0 | Views: 516
of 23
Download PDF   Embed   Report

Comments

Content

JBoss Messaging Integration Guide

Applies to: Vordel Gateway v6.0 and higher Appliance and Software

Contacting Vordel We are dedicated to producing appliances and software of excellent quality and we welcome feedback on any of our products. For more information about Vordel and our advanced suite of SOA appliances and software, visit our web site: www.vordel.com. If you encounter an issue, please contact Vordel and provide the following information: • Description of the issue • Any relevant messages provided by the system • Appliance / Software product and version

Customer Support email: [email protected] Sales Enquiry: [email protected] General Enquiry: [email protected] Technical Support: [email protected] Website: www.vordel.com Customer Extranet: extranet.vordel.com

PLEASE NOTE: All examples in this document refer to the latest Vordel Server build as of writing, which is version 6.0. Therefore it may contain references to features not included in earlier versions.

Vordel Implementation Guide, Copyright © 2000 – 2010 Vordel Limited. All rights reserved. The trademarks, logos and service marks displayed herein are registered and unregistered trademarks of Vordel and others.

JBOSS Messaging Integration Guide

Table of Contents
Table of Contents ..........................................................................................................1 1. Introduction..............................................................................................................1 1.1. Purpose..............................................................................................................1 1.2. JMS Architecture .................................................................................................1 1.3. Prerequisites .......................................................................................................2 1.4. Setup Used for this Guide: ....................................................................................2 1.5. Configuration Steps .............................................................................................2 2. Setting up the JBoss Messaging environment ...............................................................2 2.1. Download JBoss Application Server and JBoss Messaging .........................................2 2.2. Installation JBoss Application Server and JBoss Messaging .......................................3 2.3. Configuring the environment and JBoss AS and JBoss Messaging ..............................3 2.4. Starting JBoss Server ...........................................................................................5 3. Setting up the Vordel environment ..............................................................................5 3.1. Obtain a VX4000 appliance or download Vordel Gateway software ...........................5 3.2. Insert the JBoss JMS Provider into the Vordel Gateway ............................................5 3.2.1 Instructions for Vordel Appliance:.....................................................................6 3.2.2. Instructions for Software install .......................................................................8 3.3. Add JAR file classpath reference to JVM.xml ...........................................................9 4. Configuring the Gateway to place messages on JBoss Messaging Queue ..........................9 4.1. Creating a JMS Session ........................................................................................9 4.2. Create a “Route to JBoss” Policy.......................................................................... 10 4.3. Ensure policies are updated on the Gateway......................................................... 13 4.4. Test the configuration to place message on JBoss Messaging Queue ....................... 13 4.5. Using SOAPbox to send a message to JBoss Messaging queue ................................ 13 4.6. Send Message and check JBoss Messaging Queue ................................................. 14 5. Configuring the Gateway to read from a JBoss Messaging queue .................................. 16 5.1. Create Policy that will be invoked with message read from JBoss queue .................. 16 5.2. Creating a JMS Session: ..................................................................................... 18 5.3. Ensure policies are updated on the Gateway......................................................... 19 5.4. Testing to read messages from a queue ............................................................... 19 6. Conclusion .............................................................................................................. 20

Vordel Implementation Guide, Copyright © 2000 – 2010 Vordel Limited. All rights reserved. The trademarks, logos and service marks displayed herein are registered and unregistered trademarks of Vordel and others.

JBOSS Messaging Integration Guide

1. Introduction
1.1. Purpose
This document describes how to configure the Gateway to perform protocol translation. This will be demonstrated by the following: 1. The Gateway will listen for messages on a HTTP interface. Messages read from this interface will be placed on a message queue. 2. The Gateway will listen for messages on a message queue. Messages read from the queue will be sent to an email account via SMTP. The message flow is as follows:

1. HTTP
Client

Vordel Gateway

2. JMS
JBoss Messaging

4. SMTP 3. JMS

SMTP Server

This guide applies to Vordel‟s hardware and software products, from version 6.0 upwards. This includes builds of the VX appliance range, which use the Gateway v6.0 or later. In this guide the message queuing system that will be used is JBoss Messaging.

1.2. JMS Architecture
The Gateway utilises JMS (Java Message Service) for sending and receiving messages from messaging systems. JMS API which was developed by Sun defines a common set of interfaces and associated semantics that allow the Gateway to communicate with various messaging applications in a standard way. Messaging system products (IBM WebSphere MQ, JBOSS, SonicMQ, TIBCO EMS, Fiorano, and OpenJMS) provide implementations of JMS which can be plugged into the Gateway.

1

JBOSS Messaging Integration Guide

The Gateway has been designed to allow 3rd party JMS providers to be "plugged in". To plug in new JMS providers, you must install the JMS provider on the Gateway machine. The messaging system vendors can provide an implementation of the JMS provider which is normally in the form of jar files and configuration settings to be entered in the Vordel Policy Studio.

1.3. Prerequisites
1. JBoss Messaging is available from http://www.jboss.org 2. Vordel‟s Gateway Appliance or Software available from www.vordel.com 3. Java Developer Kit (JDK) 1.5.0.22 or above 4. Apache Ant

1.4. Setup Used for this Guide:
   JBoss Messaging is installed on Windows to C :\thirdparty\jboss-messaging1.4.5.GA JBoss Application Server 4.2.3 GA installed to C:\thirdparty\jboss-4.2.3.GA Apache Ant installed to C:\thirdparty\apache-ant-1.8.0

 Vordel Gateway 6.0.3 software installed to c:\vordel\v6.0.3\vordelgateway on Windows  Vordel VX4000 Appliance v6.0.3

1.5. Configuration Steps
1. Download and install JBoss 2. Download and install JBoss Messaging 3. Configure JBoss Messaging and JBoss AS 4. Install Vordel Gateway 5. Configure Gateway to send messages to JBoss Messaging 6. Configure Gateway to listen for messages from JBoss Messaging queue 7. Test Setup

2. Setting up the JBoss Messaging environment
2.1. Download JBoss Application Server and JBoss Messaging
JBoss Application Server and JBoss Messaging is available from http://www.jboss.org The version of JBoss Application Server used for this guide is JBoss 4.2.3 GA. The version of JBoss Messaging used for this guide is JBoss Messaging 1.4.5 GA

2

JBOSS Messaging Integration Guide

2.2. Installation JBoss Application Server and JBoss Messaging
Once Jboss Application Server and Jboss Messaging has been downloaded they can simply be extracted to a desired location. Please refer to Jboss Messaging documentation detailed information on integrating Jboss Messaging with JBoss Application Server. For the purpose of this guide default installation options were used on a Windows platform.

2.3. Configuring the environment and JBoss AS and JBoss Messaging
NOTE: From release 1.4.0 JBoss messaging is designed for JBoss 4.2 AS only. Once JBoss Application Server and JBoss Messaging have been extracted to the desired locations there are some preparations to make sure that they are integrated with one another. This guide is based on a “clean” installation of JBoss 4.2 AS and will use the automated installation procedure as per the JBoss messaging implementation guide available from http://www.jboss.org/jbossmessaging/docs/ (refer to 1.4.0 user guide for version 1.4.0 SP3) NOTE: Following examples are based on a Windows environment 1. Set up Home Environments: a. Set up the JBOSS_HOME environment variable to point to the JBoss 4.2 installation you want to use JBoss Messaging with.

Example: prompt>set JBOSS_HOME=C:\thirdparty\jboss-4.2.3.GA
b. Set up JAVA_HOME environment to point to Java JDK 1.5.0.14 or above

Example: prompt>set JAVA_HOME=c:\java\jdk1.5.0_22
c. Set up ANT_HOME to point to any installation of Apache Ant

Example: prompt> set ANT_HOME=c:\thirdparty\apache-ant-1.8.0
d. Set up the PATH

Example: prompt>set
PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%JBOSS_HOME%\bin;%PATH% 2. Run the JBoss Messaging installation script: a. Change to the the /JBoss_Messaging_Install_Dir/Util directory b. Run the following command: prompt> ant –f release-admin.xml 3. Edit the jms-ds.xml file: a. Browse to the /JBoss_ApplicationServer_Install_Dir/deploy/ directory b. Replace jboss.mq by jboss.messaging on every occurrence

3

JBOSS Messaging Integration Guide

4. Edit the standardjboss.xml file: a. Browse to the /JBoss_ApplicationServer_Install_Dir/conf/ directory b. Set CreateJBossMQDestination to false on every occurrence

Example: <CreateJBossMQDestination>false</CreateJBossMQDestination>
5. Edit the jboss-service.xml: a. Browse to the /JBoss_ApplicationServer_Install_Dir/conf/ directory b. Remove the reference to JBoss MQ on JSR-77 Management Bean:

Example:
--------------------------------------------------------------------<!--==============================================================--> <!-- JSR-77 Single JBoss Server Management Domain --> <!--============================================================ --> <mbean code="org.jboss.management.j2ee.LocalJBossServerDomain" ... Remove this line ... <attribute name="JMSService">jboss.mq:service=DestinationManager</attribute> --------------------------------------------------------------------6. Edit the login-config.xml file: a. Browse to the /JBoss_ApplicationServer_Install_Dir/conf/ directory b. Remove jboss-mq security policies

Example:
--------------------------------------------------------------------### Remove these lines: <!-- Security domain for JBossMQ --> <application-policy name = "jbossmq"> <authentication> <login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule" flag = "required"> <module-option name = "unauthenticatedIdentity">guest</moduleoption> <module-option name = "dsJndiName">java:/DefaultDS</moduleoption> <module-option name = "principalsQuery"> SELECT PASSWD FROM JMS_USERS WHERE USERID=?</moduleoption> <module-option name = "rolesQuery"> SELECT ROLEID, 'Roles' FROM JMS_ROLES WHERE USERID=?</module-option> </login-module> </authentication> </application-policy> <!-- Security domain for JBossMQ when using file-state-service.xml

4

JBOSS Messaging Integration Guide

<application-policy name = "jbossmq"> <authentication> <login-module code = "org.jboss.mq.sm.file.DynamicLoginModule" flag = "required"> <module-option name = "unauthenticatedIdentity">guest</moduleoption> <module-option name = "sm.objectname">jboss.mq:service=StateManager</module-option> </login-module> </authentication> </application-policy> --> ---------------------------------------------------------------------

2.4. Starting JBoss Server
To start JBoss Server: For Windows: 1. Browse to /JBoss_ApplicationServer_Install_Dir/bin 2. Run the following command: prompt>run -c messaging For Linux: 1. Browse to /JBoss_ApplicationServer_Install_Dir/bin 2. Run the following command: prompt> ./run.sh -c messaging NOTE: Due to the integration of Tomcat with JBoss it will use port 8080 by default. If there are any other applications on the host listening on port 8080, this would need to be switched off or changed. It is recommended if the Vordel Gateway is running on the same host as JBoss; to change the Default Services port on the Vordel Gateway from 8080 to any other port not is use. (for example 8085)

3. Setting up the Vordel environment
3.1. Obtain a VX4000 appliance or download Vordel Gateway software
Vordel provides copies of Gateway software to partners, customers, and evaluators. Vordel VX appliances are also available for evaluation and purchase.

3.2. Insert the JBoss JMS Provider into the Vordel Gateway
JBoss provides a particular JMS provider which is used to connect to JBoss Messaging. The JMS provider takes the form of Java JAR files (.jar). Third-parties such as Vordel do not have licensing rights to distribute these JBoss product components to end customers directly. But, once a customer has a JBoss installed, it is a simple matter to insert the JBoss provider files into the Vordel Gateway. The following JAR files are required: Available from /jboss-4.2.3.GA/client/  javassist.jar (also from http://repository.jboss.com/javassist/3.5.0.GAbrew/lib/)  jbossall-client.jar

5

JBOSS Messaging Integration Guide

 jboss-client.jar Available from http://repository.jboss.com/jboss/aop/1.5.5.GA/lib/  jboss-aop.jar  jboss-aop-jdk50.jar  jboss-aop-jdk50-client.jar Available from http://repository.jboss.com/jboss/remoting/2.2.2.SP11-brew/lib/  jboss-remoting.jar Available from /jboss-4.2.3.GA/lib/  concurrent.jar Available from /jboss-messaging-1.4.5.GA/  jboss-messaging.jar Available from http://logging.apache.org/log4j/1.2/download.html  log4j-1.2.15.jar Available from /jboss-4.2.2.GA/client/  trove.jar

3.2.1 Instructions for Vordel Appliance:
i. Preparing the jar files for upload: The first thing to do is to prepare the JAR files that the Gateway requires. For Windows: Open an application capable of creating tar files. Select the directories above and archive to a tar file. For Linux: Add the two directories files to a tar file by using the tar command. Browse to the directory where the jar files reside and run the following command: >tar –cvf jar.tar *.jar ii. Upload the files via the Web Interface: 1. 2. 3. 4. 5. Log on to the Web Administrator Interface via a browser at the following URL: https://IP_OF_Appliance:10000 Login using the user credentials assigned. The default Username is “admin” with a default password of “changeme”. Click on the Upload and Download option on the top menu options. Click on the Browse button and browse to the tar file that contains all the two directories with the JAR files. Upload the file to the /opt/vordel/vordel_product_dir/ext/lib/directory

6

JBOSS Messaging Integration Guide

6.

For ease of use it is recommended to select “Yes” when prompted and then click the Delete button next to the Extract Tar files option. Click on Upload. This will upload the tar file, extract it, and then delete the tar file from the appliance.

7.

8. If this has succeeded, a confirmation screen will be displayed showing the list of files that were uploaded. The following screenshot shows the Upload and Download screen on the Web Administrator Interface of the Appliance:

iii. Alternatively upload the jar files via the command line: On Unix/Linux: Run SCP using the following command syntax to perform the upload: 1. Browse to directory where the tar file was created. 2. At the prompt type: scp [options] [[user@]host1:]filename1 ... [[user@]host2:]filename2

Example: > scp JBossJars.tar root@IP_OF_APPLIANCE: /opt/vordel/
vordel_product_dir/ext/lib 3. You will be prompted for the user (root) password before the transfer begins. For more information on how to use the scp command type scp –help or man scp at the prompt. Extracting TAR file manually: 1. Use SSH to connect to the appliance securely by typing the following command from the prompt: > ssh root@IP_OF_APPLIANCE

Example: > ssh [email protected]
2. You will be prompted for the user (root) password to complete the connection.

7

JBOSS Messaging Integration Guide

3. Browse to /opt/vordel/vordel_product_dir/ext/lib to extract the file from the tar file with the following command: > tar -xvvf myfile.tar

Example: > tar –xvvf jar.tar
On Windows: Use PSCP to copy files to the Appliance: 1. PSCP can be used to transer files securely from Windows to the Appliance. It can be downloaded from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html. 2. Open a Windows command prompt and run pscp using the following syntax: > pscp filename username@ipadress:what directory

Example: >pscp JBossJars.tar [email protected]: /opt/vordel/
vordel_product_dir/ext/lib

Extracting the TAR file manually: 1. Use SSH to connect to the appliance securely using a program like Putty. 2. Browse to /opt/vordel/vordel_product_dir/ext/lib 3. Extract the tar file with the following command: tar -xvvf myfile.tar

Example: > tar –xvvf jar.tar

3.2.2. Instructions for Software install
1. Copy the following JAR files Available from /jboss-4.2.3.GA/client/  javassist.jar (also from http://repository.jboss.com/javassist/3.5.0.GAbrew/lib/)  jbossall-client.jar  jboss-client.jar Available from http://repository.jboss.com/jboss/aop/1.5.5.GA/lib/    jboss-aop.jar jboss-aop-jdk50.jar jboss-aop-jdk50-client.jar

Available from http://repository.jboss.org/jboss/remoting/2.2.3/lib/  jboss-remoting.jar Available from /jboss-4.2.3.GA/lib/  concurrent.jar

Available from /jboss-messaging-1.4.5.GA/  jboss-messaging.jar Available from http://logging.apache.org/log4j/1.2/download.html

8

JBOSS Messaging Integration Guide

 

log4j-1.2.15.jar trove.jar

Available from /jboss-4.2.2.GA/server/messaging/lib/ 2. Browse to the /Vordel_Install_Dir/ext/lib directory. 3. Copy the files into the /vordel/vordel_product_dir/ext/lib directory

3.3. Add JAR file classpath reference to JVM.xml
For the JBoss log4j classpath to load first the JVM.xml file located in the following directory would need to be added: For Windows: /vordel/vordel_product_dir/conf For Appliance: /opt/vordel/vordel_product_dir/conf Create the JVM.xml file and edit it as follows: Add the following entry to the JVM.xml file as shown below: <ConfigurationFragment> <ClassPath name="ext/lib/log4j-1.2.16.jar" /> </ConfigurationFragment>

4. Configuring the Gateway to place messages on JBoss Messaging Queue
The gateway will be configured to place messages it receives on a queue (i.e. destination) named “/queue/testQueue” in JBoss Messaging.

4.1. Creating a JMS Session:
1. Start the Gateway and Policy Studio (for more details refer to getting Started in the Help Configuration Guide). 2. Click on the External Connections navigation panel in Policy Studio 3. Right click on the JMS Services and click Add a JMS Service 4. Configure the following fields for the JMS Service:  Name: JBoss Messaging  Provider URL: jnp://IP_OF_HOST:1099  Initial Context Factory: org.jnp.interfaces.NamingContextFactory  Connection Factory: /ConnectionFactory  Username: guest  Password: guest 5. Click on OK

9

JBOSS Messaging Integration Guide

6. Open the JMS Service again and configure the following Custom Message Properties:  Name: java.naming.factory.initial Value: org.jnp.interfaces.NamingContextFactory  Name: java.naming.factory.url.pkgs Value: org.jnp.interfaces:javax.jnp  Name: java.naming.provider.url Value: jnp://IP_OF_HOST:1099 7. Open Policy Studio, select the Services navigation panel then right click on the Vordel Gateway process and select Messaging System->Add JMS Session 8. In the popup window by the JMS Service drop down select the JBOSS Messaging service that was created earlier. 9. Do not select Allow Duplicates and default 1 listener. Click OK The JMS Session configuration for Windows:

4.2. Create a “Route to JBoss” Policy
Create a small test policy to route messages on to the JBoss Messaging queue by completing the following steps:

10

JBOSS Messaging Integration Guide

1. Open Policy Studio and select Policies navigation panel. Create a new Policy titled “Route to JBoss” by right clicking on Policies and select Add Policy. 2. Create a new relative path on the Gateway Process called /ToJBoss by selecting Services navigation panel, then expand Vordel Gateway and right click on Default Services to Add Relative Path. 3. Create a new relative path on the Gateway Process called “/ToJBoss”. 4. Map the /ToJBoss path to the policy called “Route to JBoss”. This means that when a message is received by the Gateway on the path “/JBoss”, it will be passed to the “Route to JBoss” policy, which will then process the message.

Configuring the Messaging System Filter
When a policy that routes to a JMS provider (such as JBoss Messaging) is created, the policy must contain a Messaging System filter, which can be found under the Routing category of filters in the Policy Studio. To configure this filter, complete the following steps: NOTE: Make sure that the JMS Service has been configured already (see section 4.1) as the available JMS service will need to be referred to when configuring the Messaging System Filter 1. Go back to the “Route to JBoss” policy under Policies. (the TAB should still be open) 2. Drag a Messaging System filter from the Routing group located in the palette on the right of the Policy Studio. 3. Under the Request tab select the JMS Service that has been configured above (titled JBoss Messaging) from the JMS Session dropdown. 4. Set the Destination to: 5. Set the Message ID to: /queue/testQueue ID:${id}

6. The Message Type should be specified. Change this to “Use content.body attribute to create a message in the format specified in the „SOAP OVER Java Message Service‟". 7. All other settings may be left at default. 8. Click on the Response tab and select „No Response‟ 9. Click on Ok To complete the test policy create the following flow: 1. Messaging System Filter: Located in the Routing group. This filter should be configured as described above. This is a mandatory filter in the policy.

2. Set Message Filter: Located in the Conversion group. Used to set the content of an XML response message that can be returned to the client to acknowledge that the message has been placed on the JBoss Messaging queue. This step is not mandatory, but generates an acknowledgement of the message placed on the queue.

11

JBOSS Messaging Integration Guide

Example of the configuration of the Set Message filter:

3. Reflect Filter: Routes the customized response back to the client if necessary. The Reflect filter can be found under the Utility category of filters.

Once configured, the Route to JBoss policy will appear as follows:

12

JBOSS Messaging Integration Guide

4.3. Ensure policies are updated on the Gateway
 Open the Policy Studio.  Click on Settings.  Select Deploy to ensure that the changes made are propagated to the running Gateway.

4.4. Test the configuration to place message on JBoss Messaging Queue
Vordel SOAPbox will be used as the client to test the integration. The entire transaction will be tested from the client, through the Gateway, and on to the JBoss Messaging queue. The following diagram shows the solution architecture:

1. HTTP
Client

Vordel Gateway

2. JMS
JBoss Messaging

4. SMTP 3. JMS

SMTP Server

4.5. Using SOAPbox to send a message to JBoss Messaging queue
Load a sample XML message into SOAPbox. Ensure that the URL field in SOAPbox points to the Gateway and in particular to the “ToJBoss” path on the Gateway.

13

JBOSS Messaging Integration Guide

The screenshot below shows a sample SOAP Request loaded in the SOAPbox:

Having sent the SOAP request, the response will be displayed in the SOAP Response panel, as displayed in the screenshot below:

4.6. Send Message and check JBoss Messaging Queue
By sending messages using SOAPbox, the Gateway will route the messages to the JBoss Messaging queue, in this case: /queue/testQueue Once test messages have been sent, open JBoss by entering the URL of the JBoss installation and port as follows: http://localhost:8080 (assuming that JBoss is installed on the localhost and that the port it is using is 8080) JBoss Administration Console opened in browser:

14

JBOSS Messaging Integration Guide

To check the queue in JBoss: 1. 2. 3. 4. 5. 6. Open JBoss Administration Console in browser Expand System component Expand JMX MBeans Expand jboss.messaging.destination Click on jboss.messaging.destination:service=Queue, name=testQueue Scroll down the page to the option called java.lang.StringlistMessageCounterAsHTML( ) 7. Click Invoke 8. This will display the depth of the message queue The list of queues and the list all messages option in JBoss Administration Console:

15

JBOSS Messaging Integration Guide

The message queue displayed in the JBoss Administration Console. 10 Messages has been sent to JBoss Messaging.

5. Configuring the Gateway to read from a JBoss Messaging queue
The Gateway will be configured to read the messages from: /queue/testQueue

5.1. Create Policy that will be invoked with message read from JBoss Messaging queue
1. 2. To create the second policy that the JMS consumer will point to: In Policy Studio go to the External Connections panel and right click on SMTP Servers

16

JBOSS Messaging Integration Guide

3.

Select Add a SMTP Server and configure the filter with credentials and settings of a mail server and account that can be used to send emails to. (e.g. below) With the Policies panel selected right click on Policies Click Add Policy and create a new policy titled “Read from JBoss queue”. Click on the newly created Policy. Drag an SMTP filter from the Routing group located in the palette on the right of the Policy Studio. Configure the filter with newly created SMTP server setting and test message settings.

4. 5. 6. 7. 8.

SMTP Server Settings:

17

JBOSS Messaging Integration Guide

SMTP Filter settings used for test:

5.2 Creating a JMS Session:
NOTE: If a JMS Session has already been created as per section 4.1, skip to number 4 below to add a JMS consumer to the existing JMS Session. 1. In Policy Studio External Connections navigation panel, right click on JMS Services and Add a JMS Service then configure the following fields Click on Ok to save the JMS service before proceeding with the Custom Message Properties  Name: JBoss Messaging  Provider URL: jnp:IP_OF_HOST:1099  Initial Context Factory: org.jnp.interfaces.NamingContextFactory  Connection Factory: /ConnectionFactory  Username: guest  Password: guest 2. Click on Ok to save the JMS service before proceeding with the Custom Message Properties  Name: java.naming.factory.initial  Value: org.jnp.interfaces.NamingContextFactory 18

3. The following Custom Message Properties should be configured:

JBOSS Messaging Integration Guide

 Name: java.naming.factory.url.pkgs  Value: org.jnp.interfaces:javax.jnp  Name: java.naming.provider.url l  Value: jnp:IP_OF_HOST:1099 4. Right click on the Gateway process select “Messaging system->Add JMS session”. Select “JBoss Messaging” and not to allow duplicates. 5. Right click on the JMS Session and add a JMS Consumer and configure as follows:  Destination: /queue/testQueue  Extraction Method: For simplicity, select "Create a content.body attribute based on SOAP Over JMS draft specification"  Point the JMS Consumer to the “Read from JBoss Queue” policy. The JMS Consumer configuration window:

5.3. Ensure policies are updated on the Gateway
Complete the following steps to refresh the policies: 1. Open the Policy Studio. 2. Click on Settings. 3. Select Deploy to ensure that the changes made are propagated to the live Gateway. Click Yes to deploy changes to the server.

5.4. Testing to read messages from a queue
The Gateway has also been configured to let the JMS service consume the message on the queue and to forward it to a mail client via SMTP.

19

JBOSS Messaging Integration Guide

By creating the JMS consumer and the policy that it pointed to (i.e. “Read from JBoss Queue”) that contains a SMTP filter, the messages have been read from “/queue/testQueue” and sent to a mail client as configured in the SMTP filter. To check the queue in JBoss Messaging: 1. 2. 3. 4. 5. 6. Open JBoss Administration Console in browser Expand System component Expand JMX MBeans Expand jboss.messaging.destination Click on jboss.messaging.destination:service=Queue, name=testQueue Scroll down the page to the option called java.lang.StringlistMessageCounterAsHTML( ) 7. Click Invoke 8. This will display the depth of the message queue The messages have now been “consumed” from the JBoss messaging queue and there are no more messages on the queue.

The screenshot below shows the inbox of the email recipient that is configured in the SMPT filter that reads all messages off the queue and sends it over SMTP:

6. Conclusion
This document is a simplistic demonstration on how to setup the connection from a Vordel Gateway to the JBoss Messaging provider using the JMS Service and filter options in the Gateway. This connection can be part of a larger policy, including features such as XML threat detection and conditional routing, features which are out of scope in this document but are covered in other documents which can be obtained from the Vordel Extranet at http://extranet.vordel.com. Please direct any support questions to [email protected]. 20

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close