Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

This docs is for v0.2+


  1.  Start from v0.2, it is not longer a mandatory to provide a JMS ConnectionFactory. For a single JVM simple usage, you may use the default in-memory, non-persistent ActiveMQ connection factory, or you could configure your JMSProvider in several ways.


Configure JMSProvider

  • To use GroovyJMS, you need to decide which JMS implementation you'll use. There are several options:
    1. use the default in-memory, not-persistent ActiveMQ broker and connection factory, this is created by the ActiveMQJMSProvider class. Notice that the ActiveMQJMSProvider will start a ActiveMQ broker if it is not existed already, and will add a "vm://localhost" transport connector URL if not existed
    2. Provide a JMSProvider by
      1. specific a "groovy.jms.provider" system property that point to a class that implements groovy.jms.provider.JMSProvider
      2. set a JMSProvider to the JMS.provider static variable, e.g.
    3. Provide Connection Factory or Connection in runtime by using the following syntax


There are three ways to construct a JMS instance.

  1. no argument
    • A JMS Connection Factory must be come from somewhere. If you don't specify it, an in-memory ActiveMQ broker and connection factory will be created by teh default ActiveMQJMSProvider
    • Example

Unsupported Features or Limitation

  • nested usage is not supported yet. you may still use the lib in nested manner but you have manage the Connection and Session carefully.
    • For example:
    • you are recommended to avoid nestled usage. If you use it, try to use a multiple connection.
  • No labels