Ubik Batch Server Administration Guide

From UbikWiki

(Difference between revisions)
(Note about bindings:)
(JMS Brokers:)

Line 258:

Line 258:

If he chooses to use physical names (which is not recommended) he will use the name « <tt>jms/localConnectionFactoryOJMS</tt>». Note that if Batch Server administrator chooses to rename the resource, the code must be modified, while in the first solution, only binding file must be changed.
If he chooses to use physical names (which is not recommended) he will use the name « <tt>jms/localConnectionFactoryOJMS</tt>». Note that if Batch Server administrator chooses to rename the resource, the code must be modified, while in the first solution, only binding file must be changed.
-
== JMS Brokers: ==
+
=== JMS Brokers: ===
-
=== ActiveMQ ===
+
==== ActiveMQ ====
-
==== Libraries to add in business/lib folder ====
+
===== Libraries to add in business/lib folder =====
* activemq-core-4.1.1.jar
* activemq-core-4.1.1.jar
* backport-util-concurrent-2.1.jar
* backport-util-concurrent-2.1.jar
-
==== JNDI ====
+
===== JNDI =====
{| class="prettytable"
{| class="prettytable"

Line 279:

Line 279:

|}
|}
-
===== More details =====
+
====== More details ======
* [http://openjms.sourceforge.net/usersguide/using.html http://activemq.apache.org/jndi-support.html]
* [http://openjms.sourceforge.net/usersguide/using.html http://activemq.apache.org/jndi-support.html]
-
===== Example =====
+
====== Example ======
<source lang="xml"><jndi-object>
<source lang="xml"><jndi-object>
<localJndiName>jms/localConnectionFactoryAMQ</localJndiName>
<localJndiName>jms/localConnectionFactoryAMQ</localJndiName>

Line 297:

Line 297:

</jndi-object></source>
</jndi-object></source>
-
=== OpenJMS ===
+
==== OpenJMS ====
-
==== Libraries to add in business/lib folder ====
+
===== Libraries to add in business/lib folder =====
* openjms-common-0.7.7-beta-1.jar
* openjms-common-0.7.7-beta-1.jar
* openjms-0.7.7-beta-1.jar
* openjms-0.7.7-beta-1.jar

Line 304:

Line 304:

* spice-jndikit-1.2.jar (only if embedded JNDI is used)
* spice-jndikit-1.2.jar (only if embedded JNDI is used)
-
==== JNDI ====
+
===== JNDI =====
{| class="prettytable"
{| class="prettytable"

Line 319:

Line 319:

|}
|}
-
===== More details =====
+
====== More details ======
* [http://openjms.sourceforge.net/usersguide/using.html http://openjms.sourceforge.net/usersguide/using.html]
* [http://openjms.sourceforge.net/usersguide/using.html http://openjms.sourceforge.net/usersguide/using.html]
-
===== Example =====
+
====== Example ======
<source lang="xml"><jndi-object>
<source lang="xml"><jndi-object>
<localJndiName>jms/localConnectionFactoryOJMS</localJndiName>
<localJndiName>jms/localConnectionFactoryOJMS</localJndiName>

Line 337:

Line 337:

</jndi-object></source>
</jndi-object></source>
-
=== MQSeries 6.x ===
+
==== MQSeries 6.x ====
-
==== Note ====
+
===== Note =====
MQSeries does not have an in-house JNDI.
MQSeries does not have an in-house JNDI.

Line 346:

Line 346:

* which in turn requires support pac <tt>MS0B</tt> (MQSeries Java classes for PCF)
* which in turn requires support pac <tt>MS0B</tt> (MQSeries Java classes for PCF)
-
==== Libraries to add in business/lib folder ====
+
===== Libraries to add in business/lib folder =====
* mq-6.0.jar
* mq-6.0.jar
* mqjms-6.0.jar
* mqjms-6.0.jar

Line 353:

Line 353:

* com.ibm.mq.pcf-6.0.3.jar
* com.ibm.mq.pcf-6.0.3.jar
-
==== JNDI ====
+
===== JNDI =====
{| class="prettytable"
{| class="prettytable"

Line 369:

Line 369:

|}
|}
-
===== Example =====
+
====== Example ======
<source lang="xml"><jndi-object>
<source lang="xml"><jndi-object>
<localJndiName>jms/QueueMQSeries</localJndiName>
<localJndiName>jms/QueueMQSeries</localJndiName>

Line 384:

Line 384:

</jndi-object></source>
</jndi-object></source>
-
=== Using SUN FsContext ===
+
==== Using SUN FsContext ====
-
==== Libraries to add in business/lib folder ====
+
===== Libraries to add in business/lib folder =====
* providerutil-1.2.jar
* providerutil-1.2.jar
* fscontext-1.2.jar
* fscontext-1.2.jar
-
==== JNDI ====
+
===== JNDI =====
{| class="prettytable"
{| class="prettytable"

Line 404:

Line 404:

|}
|}
-
===== Example =====
+
====== Example ======
<source lang="xml"><jndi-object>
<source lang="xml"><jndi-object>
<localJndiName>jms/QueueMQSeries</localJndiName>
<localJndiName>jms/QueueMQSeries</localJndiName>

Revision as of 22:48, 21 March 2008

Contents

TODO : Document general configuration

General configuration

This configuration is in file <INSTALL_DIRECTORY>/config/config.properties

Configuration parameters:

Parameter Description Default Value
CONSOLE_ID Unique ID Of the Batch Server See 1.2.2.4
INSTALL_DIR <INSTALL_DIRECTORY> See 1.2.2.4
com.salto.console.PLUGIN_MANAGER_STORE Type of storage for Plugins configuration salto.batch.system.PluginManagerXMLStore
PLUGIN_MANAGER_FILE Path to the file that contains general plugin <INSTALL_DIRECTORY>/config/plugin-manager.xml
LOCK_DIR
CONFIG_ROOT Path to configuration Folder <INSTALL_DIRECTORY>/config
CONFIG_ROOT_BATCH Not Used
CONFIG_DATA Not Used
OUTPUT_DATA Folder used temporarily for Mail Generation and Lifecycle state <INSTALL_DIRECTORY>/output
USER_FILE File that host JMX Authentication informations
com.salto.console.MAIL_MANAGER_STORE Type of Storage for Mail Manager salto.batch.system.MailManagerDBStore (see 1.2.2.9)
MAIL_MANAGER_FILE Used only if Storage is XML
JMX_HTTP_ADAPTOR_PORT Port of the HTTP JMX adaptor if ACTIVATE_HTTP_ADAPTOR is true
ACTIVATE_HTTP_ADAPTOR JMX interface that exposes Operations in a Browser (Do not activate in PRODUCTION) false

JMX connectivity

This configuration is in file <INSTALL_DIRECTORY>/config/config.properties

This configuration is done by Wizard Installer (see 1.2.2.5)

Configuration parameters:

Paramter Description
JNDI_NAME JNDI Name that will appear at the end of the JMX URL
JMX_SERVICE_PORT JMX Port that will appear in the URL (It must be free)
NAMING_SERVICE_PORT Naming service Port

that will appear in the URL (It must be free)

service:jmx:rmi://<HOST OF THE MACHINE>:<JMX_SERVICE_PORT>/jndi/rmi:// <HOST OF THE MACHINE>:<NAMING_SERVICE_PORT>/<JNDI_NAME>

Database connectivity

This configuration is in file <INSTALL_DIRECTORY>/config/datasource.xml

Mailer connectivity

This configuration is in file <INSTALL_DIRECTORY>/config/mail.xml.

This configuration is done by Wizard Installer (see 1.2.2.9)


Configuration parameters:

Paramter Description Default Value
mailHost Host of the Mail Server
mailPort Port of the Mail Server 25
Mailer Name that will appear in Sent mails

Logging configuration

This configuration is in file <INSTALL_DIRECTORY>/config/log.properties.

Logging is based on Log4j, and this file controls the Server log level. Batch Logging configuration is hosted in each BAR


See http://logging.apache.org/log4j/docs/manual.html

TODO : Document datasources

Server JMS configuration:

Our server integrates a JNDI connector that integrates in the local JNDI JMS objects from remote JNDIs.

It integrates a process that reconnects to the remote JNDIs during the lifetime of the server.

This enables startup even if remote objects are not yet available.

JMS Object (ConnectionFactories, Topics and Queues) are integrated in the local server JNDI using a configuration file:

  • <BATCH_SERVER_HOME>/config/jms-config.xml


JNDI Objects are composed of:


Element Description
localJndiName Physical name in the local JNDI (must be unique)
type One of:* javax.jms.ConnectionFactory
  • javax.jms.Queue
  • javax.jms.Topic


distantJndiName Physical name in the remote JNDI
env-property Element with 2 children:* name (Name of a JNDI property used to connect to the Remote JNDI)
  • value (Value of the JNDI property used to connect to the Remote JNDI)


env-property/name Name of the property, examples:* java.naming.provider.url
  • java.naming.factory.initial
  • java.naming.factory.url.pkgs
  • ...


env-property/value Value of the property

JMS Config DTD:

<!ELEMENT jndi-objects (jndi-object*) >
<!ELEMENT jndi-object (localJndiName, type, distantJndiName, env-property*) >
<!ELEMENT type (#PCDATA)>
<!ELEMENT localJndiName (#PCDATA)>
<!ELEMENT distantJndiName (#PCDATA)>
<!ELEMENT env-property (name, value) >
<!ELEMENT name (#PCDATA)>
<!ELEMENT value (#PCDATA)>

Example:

<jndi-objects>
  <jndi-object>
    <localJndiName>jms/localConnectionFactoryOJMS</localJndiName>
    <type>javax.jms.ConnectionFactory</type>
    <distantJndiName>demoConnectionFactoryOJMS</distantJndiName>
    <env-property>
      <name>java.naming.provider.url</name>
      <value>tcp://localhost:3035/</value>
    </env-property>
    <env-property>
      <name>java.naming.factory.initial</name>
      <value>org.exolab.jms.jndi.InitialContextFactory</value>
    </env-property>
  </jndi-object>
...
</jndi-objects>

Note about bindings:

To decouple coding process from deployment, developper should use logical names (start with java:comp/env/jms/localQueue).

To use physical name, just use jms/localQueue.


Deployer can then bind logical to physical names using <BAR_DISPLAY_NAME>-binding.xml, example:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE bar-resources PUBLIC "-//Ubik-Ingenierie //DTD BAR Binding Resource Configuration 1.0//EN" 
"http://www.ubik-ingenierie.com/consolebatch/config/bar-binding.dtd">
<bar-resources>
<bar-resource nameinbar="jdbc/toto" boundname="jdbc/batchweb" />
<bar-resource nameinbar="jdbc/batchweb" boundname="jdbc/batchweb" />
<bar-resource nameinbar="jms/localConnectionFactory" boundname="jms/localConnectionFactoryOJMS" />
<bar-resource nameinbar="jms/localDemoQueue" boundname="jms/localDemoQueueOJMS" />
</bar-resources>

If developer has used « java:comp/env/jms/localConnectionFactory » in his code, he will in fact use the object jms/localConnectionFactoryOJMS. If he chooses to use physical names (which is not recommended) he will use the name « jms/localConnectionFactoryOJMS». Note that if Batch Server administrator chooses to rename the resource, the code must be modified, while in the first solution, only binding file must be changed.

JMS Brokers:

ActiveMQ

Libraries to add in business/lib folder
  • activemq-core-4.1.1.jar
  • backport-util-concurrent-2.1.jar
JNDI
Attribute Value
java.naming.provider.url tcp://hostname:61616
java.naming.factory.initial org.apache.activemq.jndi.ActiveMQInitialContextFactory
More details
Example
<jndi-object>
    <localJndiName>jms/localConnectionFactoryAMQ</localJndiName>
    <type>javax.jms.ConnectionFactory</type>
    <distantJndiName>demoConnectionFactoryAMQ</distantJndiName>
    <env-property>
      <name>java.naming.provider.url</name>
      <value>tcp://hostname:61616</value>
    </env-property>
    <env-property>
      <name>java.naming.factory.initial</name>
      <value>org.apache.activemq.jndi.ActiveMQInitialContextFactory</value>
    </env-property>
  </jndi-object>

OpenJMS

Libraries to add in business/lib folder
  • openjms-common-0.7.7-beta-1.jar
  • openjms-0.7.7-beta-1.jar
  • openjms-net-0.7.7-beta-1.jar
  • spice-jndikit-1.2.jar (only if embedded JNDI is used)
JNDI
Attribute Value
java.naming.provider.url tcp://localhost:3035/
java.naming.factory.initial org.exolab.jms.jndi.InitialContextFactory
More details
Example
<jndi-object>
    <localJndiName>jms/localConnectionFactoryOJMS</localJndiName>
    <type>javax.jms.ConnectionFactory</type>
    <distantJndiName>demoConnectionFactoryOJMS</distantJndiName>
    <env-property>
      <name>java.naming.provider.url</name>
      <value>tcp://localhost:3035/</value>
    </env-property>
    <env-property>
      <name>java.naming.factory.initial</name>
      <value>org.exolab.jms.jndi.InitialContextFactory</value>
    </env-property>
  </jndi-object>

MQSeries 6.x

Note

MQSeries does not have an in-house JNDI.

You need to install:

  • support pac ME01 (WebSphere MQ Initial Context),
  • which in turn requires support pac MS0B (MQSeries Java classes for PCF)
Libraries to add in business/lib folder
  • mq-6.0.jar
  • mqjms-6.0.jar
  • mqcontext-6.0.jar
  • mqdhbcore-1.3.1.jar
  • com.ibm.mq.pcf-6.0.3.jar
JNDI
Attribute Value
java.naming.provider.url SERVER_HOST:1431/SYSTEM.DEF.SVRCONN
java.naming.factory.initial com.ibm.mq.jms.context.WMQInitialContextFactory
Example
<jndi-object>
    <localJndiName>jms/QueueMQSeries</localJndiName>
    <type>javax.jms.Queue</type>
    <distantJndiName>TEST.QUEUE</distantJndiName>
    <env-property>
      <name>java.naming.provider.url</name>
      <value>sv049002.si3si.int:1431/SYSTEM.DEF.SVRCONN</value>
    </env-property>
    <env-property>
      <name>java.naming.factory.initial</name>
      <value>com.ibm.mq.jms.context.WMQInitialContextFactory</value>
    </env-property>
  </jndi-object>

Using SUN FsContext

Libraries to add in business/lib folder
  • providerutil-1.2.jar
  • fscontext-1.2.jar
JNDI
Attribute Value
java.naming.provider.url file://C:\development\ubik\workspace\BrokerRunner\jndi
java.naming.factory.initial com.sun.jndi.fscontext.RefFSContextFactory
Example
<jndi-object>
    <localJndiName>jms/QueueMQSeries</localJndiName>
    <type>javax.jms.Queue</type>
    <distantJndiName>TEST.QUEUE</distantJndiName>
    <env-property>
      <name>java.naming.provider.url</name>
      <value>file://C:\development\ubik\workspace\BrokerRunner\jndi</value>
    </env-property>
    <env-property>
      <name>java.naming.factory.initial</name>
      <value>com.sun.jndi.fscontext.RefFSContextFactory</value>
    </env-property>
  </jndi-object>
Personal tools