Versions Compared

Key

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

Table of Contents

Introduction

  • A JMSFragment can be used with the configuration of notifications in order to integrate with a Java Message Queue product that is JMS compatible.

JMSFragment

JMSFragment supports the following attributes: 

...

One of the following elements must be available inside a JMSFragment element:

ElementElement descriptionDescription
ConnectionFactoryOptional or only once inside the JMSFragment elementSpecifies use of a JMS ConnectionFactory implementation
ConnectionJNDIOptional or only once inside the JMSFragment elementSpecifies use of a JNDI properties file to create a JNDI InitialContextFactory


JMS message:

ElementElement descriptionDescription
MessageRequired, only once inside of JMSFragment elementBody of a JMS notification

ConnectionFactory

Specifies use of a JMS ConnectionFactory implementation.

ConnectionFactory supports the following attributes:  

AttributeUsageDescription
java_classRequired

Java class of the JMS ConnectionFactory

e.g.: org.apache.activemq.ActiveMQConnectionFactory

user_nameOptionalThe caller's user name
passwordOptionalThe caller's password


The following element can be nested inside a ConnectionFactory element:

ElementElement descriptionDescription
ConstructorArgumentsOptional or only once inside of ConnectionFactory element  

 ConstructorArguments

The following elements can be nested inside a ConstructorArguments element:

ElementElement descriptionDescription
ArgumentRequired, repeated use allowed inside the ConstructorArguments element  JMS ConnectionFactory constructor argument

 

Code Block
languagexml
titleExample: ActiveMQConnectionFactory with 1 constructor argument
collapsetrue
...
<ConnectionFactory java_class="org.apache.activemq.ActiveMQConnectionFactory">
    <ConstructorArguments>
        <Argument type="java.lang.String"><![CDATA[tcp://localhost:61616]]></Argument>
    </ConstructorArguments>
</ConnectionFactory>
...

...

Code Block
languagexml
titleExample: ActiveMQConnectionFactory with 3 constructor arguments
collapsetrue
...
<ConnectionFactory java_class="org.apache.activemq.ActiveMQConnectionFactory">
    <ConstructorArguments>
        <Argument type="java.lang.String"><![CDATA[my_user_name]]></Argument>
        <Argument type="java.lang.String"><![CDATA[my_password]]></Argument>
        <Argument type="java.lang.String"><![CDATA[tcp://localhost:61616]]></Argument>
    </ConstructorArguments>
</ConnectionFactory>
...

 Argument

 Argument supports the following attributes: 

Attribute

Usage

Description

typeRequired

Java type of a constructor argument.

Possible values:

  • boolean
  • double
  • float
  • int
  • long
  • short
  • java.lang.Boolean
  • java.lang.Double
  • java.lang.Float
  • java.lang.Integer
  • java.lang.Long
  • java.lang.Short
  • java.lang.String


Default: java.lang.String

The value of the constructor argument will be stored as CDATA node.

Code Block
languagexml
titleExample
collapsetrue
...
<Argument type="java.lang.String"><![CDATA[tcp://localhost:61616]]></Argument>
...

 ConnectionJNDI

Specifies use of a JNDI properties file to create a JNDI InitialContextFactory.

...

ConnectionJNDI supports the following attributes:  

AttributeUsageDescription
fileRequiredPath of the JNDI properties file
lookup_nameOptional

Name to lookup JMS connection factory objects


Default: ConnectionFactory

 

Code Block
languagetext
titleExample: content of the JNDI properties file for ActiveMQ
collapsetrue
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
java.naming.provider.url=tcp://localhost:61616 

Message

Body of a JMS notification.

See : Message, Examples