Progress SonicMQ

SonicMQ is a complete messaging framework primarily designed for Java applications by Progress Software. SonicMQ is available for free download from http://www.sonicMQ.com. SonicMQ comes in three flavors:

  • Developer Edition
    This version is designed for easy installation. The developer edition restricts the connections from a single IP address and number of connections to 100. Developer edition doesn't provide the advanced security features available in the other editions.

  • Professional Developer Edition
    This version supports unlimited client connections, clustering, DRA (Dynamic Routing Architecture) - which is explained later - and security with 40 and 56 bit encryption. But this edition doesn't support application deployment.

  • E-Business Edition
    This version provides all the features in the aforementioned editions plus a complete deployment environment.

Product Features

On top of providing the basic messaging infrastructure, SonicMQ provides many other features for enterprise application development. A brief list of the features provided by SonicMQ is shown below:

  • JMS implementation supporting both PTP and Pub/Sub models

  • Support for hierarchical security management

  • Guaranteed message persistence over the Internet

  • High scalability for volume of messages

  • Message security, encryption and security management

  • Built-in integration with XML parsers; also provides an interface called XMLMessage that is a specialized sub-interface of TextMessage

  • Dynamic Routing Architecture (DRA), which let enterprises exchange messages between each other dynamically through a single message server

  • SonicMQ provides clustering of message servers to ensure 7/24 uptime

SonicMQ Binaries

SonicMQ comes with a set of applications for running the message server, administering the server, configuring and storing Administered objects, etc. These applications are available in the Start menu for Windows installation.

startbr

This batch file is used for starting the SonicMQ message broker. For windows installation this batch file is available using the shortcut Start Broker as shown below:

click to expand

By default, the broker listens on the TCP/IP port 2506. The message broker is responsible for accepting messages from, and delivering messages to, the clients.

The screenshot below shows the SonicMQ message broker up and running:

click to expand

admin

This is a text-based tool for administering the message server or a cluster. For Windows installation, the batch file is available via the shortcut Admin Shell. The screenshot below shows the administration tool running with the help command executed:

click to expand

The admin shell can be used for the following tasks:

  • Adding and deleting clusters, brokers to clusters, users, groups, queues, queue access control lists, topics, topic access control lists, etc.

  • Connecting to and disconnecting from the broker

  • Connecting to and disconnecting from the administered object store

  • Showing the details about users, destinations, etc.

Note 

Please refer to the SonicMQ documentation for further details on the usage of the administration tool.

explorer

This is a graphical tool for performing all the features provided by the admin tool discussed above. For Windows installation the batch file is available by the shortcut Explorer. The screenshot below shows the explorer running with the screen for adding destinations:

click to expand

Other Utilities

SonicMQ also provides other utilities for creating and configuring security databases. It also comes with Cloudscape RDBMS and can interface with Oracle and Microsoft SQL Server for running the security databases.

Running the Portable JMS Client

For SonicMQ we will be storing the Administered objects in an external LDAP server. The server I've used here is a standalone LDAP server for WinNT, which is available for download from http://www.eudora.com/free/ldap.html. (For Unix/Linux any one can obtain a copy of the openLDAP server from http://www.openldap.org.)

Configuring and Running the LDAP Server

First extract the contents of the downloaded archive to a directory on your local file system. Let us call the directory <LDAP_HOME> from here onwards:

  • Copy the file QcSlapd.exe from the directory <LDAP_HOME>\binaries to <LDAP_HOME>\bin

  • Copy the files libdb226.dll and libdb226.lib from the directory <LDAP_HOME>\lib\Release to <LDAP_HOME>\bin

  • Copy the files SLAPD.AT.CONF, slapd.conf and SLAPD.OC.CONF from the directory <LDAP_HOME>\conf to <LDAP_HOME>\bin

  • Create two directories named dbfiles and logs under the directory <LDAP_HOME>\bin

  • Edit slapd.conf file and make the changes highlighted in the listing below. The prefix C:/ldap should be replaced with the value of <LDAP_HOME>:

     ################################################################     #     Global options     #################################################################     include "C:/ldap/bin/slapd.at.conf"     include "C:/ldap/bin/slapd.oc.conf"     schemacheck on     #referral ldap://localhost     #################################################################     #     ldbm database definitions     ##################################################################     database ldbm     index default     suffix " "     rootdn "cn=manager"     rootpw pass 

Run the executable QcSlapd.exe with the -debug switch. The screenshot below shows the LDAP server up and running:

click to expand

Configuring the Administered Objects

We will be storing the Administered objects in the namespace of an LDAP server. For this, first start the LDAP server as explained in the previous section. Then start the SonicMQ explorer by running the explorer.bat/explorer.sh file available in the bin directory under SonicMQ installation. Click on the JMS Administered Objects Store item in the tree on the left panel and then click on the JNDI radio button on the right panel. Enter the following text in the text box in the right panel without any line breaks:

     java.naming.provider.url="ldap://localhost: 389"     java.naming.factory.initial="com.sun.jndi.ldap.LdapCtxFactory"     java.naming.security.authentication="simple"     java.naming.security.principal="cn=manager"     java.naming.security.credentials="pass" 

The text above defines the environment properties required for connecting to the LDAP server. Now click on the Connect button:

click to expand

Now click on the ldap://localhost:389 item in the left-hand tree. The panel on the right will show the destination and the connection factory tabs. In the Destination tab click on the New button and enter the text myTopic for lookup name and destination name. Select Topic from the destination type picklist and hit enter:

click to expand

Click on the Connection Factories tab and then click on the New button. Enter the text TCFactory for the lookup name, select the type as TopicConnectionFactory and enter the host on which the SonicMQ message broker will be listening as localhost:2506. Click on the Update button:

click to expand

Running the Client

For running the client first start the LDAP server as explained in the last section and the SonicMQ message broker by running the startbr.bat/startbr.sh binary as explained in one of the previous sections. Now invoke the Java interpreter on the class PortableJMSClient with all the required classes in the classpath and passing the JNDI provider URL and the JNDI initial context factory as command-line arguments.

The required JAR files are:

  • jms.jar - The JMS library.

  • client.jar - This JAR file contains SonicMQ's JMS implementation classes. This file can be found in the lib directory under the SonicMQ installation.

  • jndi.jar/ldap.jar -JNDI 1.2.1, or any LDAP provider.

The following command-line arguments should be passed to the program for running the client:

  • com.sun.jndi.ldap.LdapCtxFactory - This is the initial context factory for the JNDI LDAP

  • ldap://localhost:389 - This is the JNDI service provider URL

The screen below shows the JMS client running against SonicMQ:

click to expand



Professional JMS
Professional JMS
ISBN: 1861004931
EAN: 2147483647
Year: 2000
Pages: 154

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net