Introduction
JS7 - Notifications - Configuration is performed from the Configuration->Notification sub-view of the JOC Cockpit and includes setting up the configuration for the JS7 - Monitor Service.
- The JMSFragment element is used to integrate with a JMS compatible Java Message Queue product and to parameterize messages from JS7 - Notification - Configuration, Monitor Variables.
JMSFragment
JMSFragment
supports the following attributes:
Attribute | Usage | Description |
---|---|---|
client_id | Optional | The client identifier for this connection. |
destination | Optional | A Possible values:
See: Destination Default: |
destination_name | Dependent | The name of either the destination queue or topic according to the setting made for the destination attribute. |
acknowledge_mode | Optional | Session acknowledgment mode. Possible values:
See: Session Default: |
delivery_mode | Optional | Delivery mode. Possible values:
See: Default: |
priority | Optional | The producer's default priority. See: MessageProducer.setPriority Default: |
time_to_live | Optional | Sets the default length of time in milliseconds from its dispatch time that a produced message should be retained by the message system. See: MessageProducer.setTimeToLive Possible values:
Default: |
One of the following elements must be available inside a JMSFragment
element:
Element | Element description | Description |
---|---|---|
ConnectionFactory | Optional or only once inside the JMSFragment element | Specifies use of a JMS ConnectionFactory implementation |
ConnectionJNDI | Optional or only once inside the JMSFragment element | Specifies use of a JNDI properties file to create a JNDI InitialContextFactory |
JMS message:
Element | Element description | Description |
---|---|---|
Message | Required, only once inside of JMSFragment element | Body of a JMS notification |
ConnectionFactory
Specifies use of a JMS ConnectionFactory implementation.
ConnectionFactory
supports the following attributes:
Attribute | Usage | Description |
---|---|---|
java_class | Required | Java class of the JMS ConnectionFactory e.g.: |
user_name | Optional | The caller's user name |
password | Optional | The caller's password |
The following element can be nested inside a ConnectionFactory
element:
Element | Element description | Description |
---|---|---|
ConstructorArguments | Optional or only once inside of ConnectionFactory element |
ConstructorArguments
The following elements can be nested inside a ConstructorArguments
element:
Element | Element description | Description |
---|---|---|
Argument | Required, repeated use allowed inside the ConstructorArguments element | JMS ConnectionFactory constructor argument |
Argument
Argument
supports the following attributes:
Attribute | Usage | Description |
---|---|---|
type | Required | Java type of a constructor argument. Possible values:
Default: |
The value of the constructor argument will be stored as CDATA
node.
ConnectionJNDI
Specifies use of a JNDI properties file to create a JNDI InitialContextFactory.
See: Connecting to the JMS Server by Using JNDI
ConnectionJNDI
supports the following attributes:
Attribute | Usage | Description |
---|---|---|
file | Required | Path of the JNDI properties file |
lookup_name | Optional | Name to lookup JMS connection factory objects Default: |
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory java.naming.provider.url=tcp://localhost:61616
Message
Body of a JMS notification. Any JS7 - Notification - Configuration, Monitor Variables can be used with the body.
Example for Apache ActiveMQ
Configuration
For use with Apache ActiveMQ a JMSFragment
configuration can look like this:
<JMSFragment acknowledge_mode="Session.CLIENT_ACKNOWLEDGE" delivery_mode="DeliveryMode.PERSISTENT" destination="Queue" destination_name="js7" name="js7_on_failure" priority="4" time_to_live="0"> <MessageRef ref="command_on_failure"/> <ConnectionFactory java_class="org.apache.activemq.ActiveMQConnectionFactory" password="admin" user_name="admin"> <ConstructorArguments> <Argument type="java.lang.String"><![CDATA[tcp://activemq-5-15:61616]]></Argument> </ConstructorArguments> </ConnectionFactory> </JMSFragment>
Client Libraries
The JS7 does not ship with client libraries for specific JMS server products such as Apache ActiveMQ, Apache Kafka and others.
Instead, users have to provide a version of the libraries that match their JMS server product.
- Download
- As an example for ActiveMQ 5.15 the following Java libraries are used:
- Download: https://repo1.maven.org/maven2/org/apache/activemq/activemq-client/5.15.15/activemq-client-5.15.15.jar
- Download: http://www.java2s.com/Code/JarDownload/javax.management/javax.management.j2ee-3.1.2.2.jar.zip
- From the archive extract the
javax.management.j2ee-3.1.2.2.jar
library.
- From the archive extract the
- Download: https://repo1.maven.org/maven2/org/fusesource/hawtbuf/hawtbuf/1.11/hawtbuf-1.11.jar
- This library is required due to bug https://issues.apache.org/jira/browse/AMQ-6600
- The resulting Java libraries are
activemq-client-5.15.15.jar
hawtbuf-1.11.jar
javax.management.j2ee-3.1.2.2.jar
- As an example for ActiveMQ 5.15 the following Java libraries are used:
- Deployment
- If JOC Cockpit is used on premises then store the .jar files in the
JETTY_BASE/lib/ext/joc
directory. - If JOC Cockpit is operated from a Container the store the .jar files in the
JETTY_BASE/resources/joc/config/patches
directory.
- If JOC Cockpit is used on premises then store the .jar files in the
- Restart
- JOC Cockpit has to be restarted to make use of the Java libraries.