Contents

FioranoMQ can be integrated with Sun's GlassFish Enterprise v2.1 Application Server. The sample MDB (Message Driven Bean) can be downloaded from: http://www.fiorano.com/downloads/fmq/GlassFishIntegration.zip
The .zip file included in the download contains the following files:

  • fmqmdb.jar.
  • readme.txt.
  • A source file; FMQSenderMDB_1_4.java (which is the source of the MDB).

To observe the MDB, follow the steps below:

  1. Start the FioranoMQ Server.
  2. Run the Application Server as admin start-domains domain1
  3. Deploy the FioranoMQ Resource Adapater (fmq-connector-ra.rar) as a connector module. This can be done through the command line or by logging into the administration console at http://<ip>:4848. The connector module is available in the side pane of the frame under Applications.
Icon

As mentioned at the beginning of this chapter, the resource adapter has to be configured before deployment. By default the resource adapter assumes that the FMQ Server is running at http://localhost:1856. Properties can be modified as per the requirement before deploying the resource adapter.

4. Configure Connector-connection-pools (available under Resources -> Connectors in the side pane of the admin console) and Connector-resources (available under Resources -> Connectors) based on whether outbound communication from MDB is necessary.

The sample MDB demonstrated here requires that there be a Non-Transaction based Connection Factory named FMQNonXA which will be used to lookup its target destination upon which it will publish the messages received from FioranoMQ.

5. Create a new connector-connection-pool named 'outpool' and select the resource adapter as 'fmq-connector-ra' and connection definition as 'javax.jms.ConnectionFactory'. Set transaction support to 'No Transaction' in the next page as we require a non transaction based connection factory.

6. Create a new connector resource named FMQNonXA which uses the 'outpool' connection pool created.

Icon

These two resources can also be configured/created through the command line.

7. Deploy the sample MDB fmqmdb.jar (Applications → EJB Applications → Deploy).

8. Start a FioranoMQ publisher on the primaryTopic and a subscriber on the secondaryTopic. The MDB reroutes all messages from the primaryTopic to the secondaryTopic.

Adaptavist ThemeBuilder EngineAtlassian Confluence