Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
top
top

Article donated by: Krishnakumar Balachandar (mailto:), Hernan Cunico

Geronimo is bundled with an open source messaging provider called Active MQ. ActiveMQ supports JMS API and J2EE applications deployed in Geronimo can use the messaging capabilities of ActiveMQ by means of JMS. In the following article we shall see how to configure another third party messaging provider that supports JMS specification with Geronimo. The article includes two example scenarios using OpenJMS another open source messaging provider and IBM Websphere MQ as messaging provider.

Prerequisites for running this sample:

Geronimo 1.0
Websphere MQ 6.0
OpenJMS 0.7.7

...

  • Using the deployed WAR we can check outbound communication to queue or topic.
  • Go to http://localhost:8080/jms
  • Enter details and press Queue or Topic
  • The message is sent to PhysicalName for Queue - queue1 in OpenJMS and SYSTEM.DEFAULT.LOCAL.QUEUE in WebSphereMQ.
  • For Topic the message is sent to topic1 or SampleTopic.
  • A sample subscriber can be started to check if the message is received. WMQ has a sample program called JMSPubSub.java which can be used to run a subscriber to SampleTopic or topic1. This can be found in <MQ-DIR><WebSphereMQ_home>/Tools/Java/jms/PubSub.java

Test Inbound Communication

  • The deployed MDB acts as EndPoint to messages posted in a Queue.
  • Post a test message in Queue in WebSphereMQ ( SYSTEM.DEFAULT.LOCAL.QUEUE) or queue1 in OpenJMS.
  • The onMessage of MDB should be invoked and u should see a message in Console of Geronimo.
  • The same can be extended to Topic by adding another ActivationSpec for Topics.

References

The RA for JMS does not support XA. This can be added to make WebsphereMQ or OpenJMS part of distributed transactions in Geronimo.
There is a sample GenericJMS RA with XA support available in Sun java.net. This RA can be deployed in Geronimo to get XA support for JMS Providers. Visit the following link for further details, http://genericjmsra.dev.java.netImage Added

Back to Top