Ubik Batch Server Administration Guide
From UbikWiki
(→Plugin Manager Configuration) |
(→Connections Configuration) |
||
(63 intermediate revisions not shown.) | |||
Line 1: |
Line 1: | ||
+ | [[Category:Ubik Batch Server]] | ||
+ | == JVM launcher configuration == | ||
+ | For Version < 6.0.0, the server runs with a JDK 5 or JDK6 | ||
+ | Ensure you always use the last update of major JDK version: | ||
+ | * [http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase5-419410.html Java SE Downloads - JDK 5] | ||
+ | |||
+ | For Version >= 6.0.0, the server runs with a JDK 6 or JDK 7 | ||
+ | * [http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html Java SE Downloads - JDK 6] | ||
+ | |||
+ | * [http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html Java SE Downloads - JDK 7] | ||
+ | |||
+ | Ensure you use the bundle for the right platform (32 bits / 64 bits) | ||
+ | |||
+ | JVM configuration is done in files: | ||
+ | * setEnv.cfg for Linux/Unix | ||
+ | * setenv.cmd for Windows | ||
+ | |||
+ | Advised options for the JVM are: | ||
+ | * -server | ||
+ | * -XX:MaxPermSize=128M (or above) depending on the number of BARs deployed on the server and their size | ||
+ | * Tune -Xms and -Xmx depending on the load of your batches and the number of BARs deployed | ||
+ | * -XX:+HeapDumpOnOutOfMemoryError | ||
+ | * -XX:HeapDumpPath=<path to logging folder> | ||
+ | |||
+ | Other options: | ||
+ | * -DLOG_ROOT_PATH=<path to logging folder> | ||
+ | |||
+ | This enables developers to name their logging files relatively to this file using ${LOG_ROOT_PATH}/<bar name>/<what they want>.log | ||
+ | |||
+ | Setting this property enables portable configuration files. | ||
+ | |||
== Batch Server General configuration == | == Batch Server General configuration == | ||
<nowiki>This configuration is in file <INSTALL_DIRECTORY>/config/config.properties</nowiki> | <nowiki>This configuration is in file <INSTALL_DIRECTORY>/config/config.properties</nowiki> | ||
- | === Configuration parameters: === | + | === Common Configuration parameters: === |
- | {| class=" | + | {| class="wikitable" style="width:80%;" border="1" |
- | | Parameter | + | !width="50"| Parameter |
- | | Description | + | !width="80"| Description |
- | | Default Value | + | !width="50"| Default Value |
|- | |- | ||
Line 22: |
Line 53: | ||
| CONFIG_ROOT | | CONFIG_ROOT | ||
| Declaration of a variable used later as ${} | | Declaration of a variable used later as ${} | ||
- | | ${INSTALL_DIR}/config | + | | ${INSTALL_DIR}/ config |
Line 28: |
Line 59: | ||
| PLUGIN_MANAGER_FILE | | PLUGIN_MANAGER_FILE | ||
| Path to the file that contains general plugin | | Path to the file that contains general plugin | ||
- | | | + | | ${CONFIG_ROOT}/plugin-manager.xml |
|- | |- | ||
| LOCK_DIR | | LOCK_DIR | ||
- | | Lock folder used only if service com.saltoconsulting.console.service.LOCKING_SYSTEM is set to com.ubikingenierie.console.locking.impl.FileLockingService, by default Database Locking is used | + | | Lock folder used only if service |
- | | ${INSTALL_DIR}/LOCK_DIR | + | com.saltoconsulting.console.service.LOCKING_SYSTEM is set to |
+ | com.ubikingenierie.console.locking.impl.FileLockingService, | ||
+ | by default Database Locking is used | ||
+ | | ${INSTALL_DIR}/ LOCK_DIR | ||
|- | |- | ||
| COLD_DEPLOYMENT_DIR | | COLD_DEPLOYMENT_DIR | ||
| Folder Batch Server will look into to deploy BARs at startup | | Folder Batch Server will look into to deploy BARs at startup | ||
- | | | + | | ${INSTALL_DIR}/ batches-cold-deploy |
|- | |- | ||
| BAR_UPLOAD_DIRECTORY | | BAR_UPLOAD_DIRECTORY | ||
- | | Folder that will contain BARs transfered from Batch Web Controller, This folder must only be used by this server and it must be writable | + | | Folder that will contain BARs transfered from Batch Web Controller, |
- | | | + | This folder must only be used by this server and it must be writable |
+ | | ${INSTALL_DIR}/ bar-upload-folder | ||
|- | |- | ||
Line 53: |
Line 88: | ||
| OUTPUT_DATA | | OUTPUT_DATA | ||
| Folder used temporarily for Mail Generation and Lifecycle state | | Folder used temporarily for Mail Generation and Lifecycle state | ||
- | | <nowiki><INSTALL_DIRECTORY>/output</nowiki> | + | | <nowiki><INSTALL_DIRECTORY> / output</nowiki> |
|- | |- | ||
Line 61: |
Line 96: | ||
|- | |- | ||
- | | com.salto.console.MAIL_MANAGER_STORE | + | | com.salto.console. MAIL_MANAGER_STORE |
| Component used to manage configuraton of Mails, choose between: | | Component used to manage configuraton of Mails, choose between: | ||
- | # salto.batch.system.MailManagerDBStore => Saves data in Database(default) | + | # salto.batch.system. MailManagerDBStore |
- | # salto.batch.system.MailManagerXMLStore => Saves data in XML file | + | => Saves data in Database(default) |
- | | salto.batch.system.MailManagerDBStore | + | # salto.batch.system. MailManagerXMLStore |
+ | => Saves data in XML file | ||
+ | | salto.batch.system. MailManagerDBStore | ||
|- | |- | ||
| MAIL_FILE | | MAIL_FILE | ||
| Configuration file for Mail Server (MUST BE OK TO SEND MAILS, always used) | | Configuration file for Mail Server (MUST BE OK TO SEND MAILS, always used) | ||
- | | ${CONFIG_ROOT}/mail.xml | + | | ${CONFIG_ROOT} / mail.xml |
|- | |- | ||
| MAIL_MANAGER_FILE | | MAIL_MANAGER_FILE | ||
- | | File that contains Mails of users to be notified on error, Used only if com.salto.console.MAIL_MANAGER_STORE=salto.batch.system.MailManagerXMLStore Otherwise informations are stored in Database | + | | File that contains Mails of users to be notified on error, |
- | | ${CONFIG_ROOT}/mail-manager.xml | + | Used only if com.salto.console.MAIL_MANAGER_STORE=salto.batch.system.MailManagerXMLStore |
+ | Otherwise informations are stored in Database | ||
+ | | ${CONFIG_ROOT} / mail-manager.xml | ||
+ | |||
+ | |- | ||
+ | | SNMP_FILE | ||
+ | | File that contains SNMP (Simple network management protocol) configuration. | ||
+ | | ${CONFIG_ROOT}/snmp.xml | ||
+ | |||
+ | |- | ||
+ | | DEVELOPMENT_MODE | ||
+ | | If true the console start in development mode: | ||
+ | | FALSE | ||
+ | |||
+ | |||
+ | |- | ||
+ | | JVM_MANAGEMENT_CLASS | ||
+ | | Extended Management implementation that provides live infos about server, to activate it, set its value to: | ||
+ | com.ubikingenierie.console.admin.system.PlatformMXManagementProvider | ||
+ | | com.ubikingenierie.console.admin.system.NoopManagementProvider | ||
+ | |||
+ | |- | ||
+ | | HIBERNATE_CONFIGURED_DIALECT | ||
+ | | Force a dialect for Hibernate to override auto detection. For DB2 : com.ubikingenierie.console.persistance.hibernate.DB2ExtendedDialect | ||
+ | | NA | ||
+ | |||
+ | |- | ||
+ | | CLEANUP_DELAY | ||
+ | | Cleanup delay in days for tables BATCH_HEAD and BATCH_TRT | ||
+ | | 40 | ||
+ | |||
+ | |- | ||
+ | | MAIL_SEND_ON_SYSTEM_BATCH_ERROR | ||
+ | | Send mail on errors of System Batches | ||
+ | | true | ||
|} | |} | ||
Line 82: |
Line 153: | ||
==== Configuration parameters: ==== | ==== Configuration parameters: ==== | ||
- | {| class=" | + | {| class="wikitable" style="width:600px;" border="1" |
- | | | + | | Parameter |
| Description | | Description | ||
+ | | | ||
|- | |- | ||
| JNDI_NAME | | JNDI_NAME | ||
| JNDI Name that will appear at the end of the JMX URL | | JNDI Name that will appear at the end of the JMX URL | ||
+ | | | ||
|- | |- | ||
| JMX_SERVICE_PORT | | JMX_SERVICE_PORT | ||
| JMX Port that will appear in the URL (It must be free) | | JMX Port that will appear in the URL (It must be free) | ||
+ | | | ||
|- | |- | ||
| NAMING_SERVICE_PORT | | NAMING_SERVICE_PORT | ||
| Naming service Port that will appear in the URL (It must be free) | | Naming service Port that will appear in the URL (It must be free) | ||
+ | | | ||
|- | |- | ||
Line 111: |
Line 186: | ||
service:jmx:rmi://<nowiki><HOST OF THE MACHINE>:<</nowiki>JMX_SERVICE_PORT<nowiki>>/jndi/rmi:// <HOST OF THE MACHINE>:<</nowiki>NAMING_SERVICE_PORT<nowiki>>/<</nowiki>JNDI_NAME> | service:jmx:rmi://<nowiki><HOST OF THE MACHINE>:<</nowiki>JMX_SERVICE_PORT<nowiki>>/jndi/rmi:// <HOST OF THE MACHINE>:<</nowiki>NAMING_SERVICE_PORT<nowiki>>/<</nowiki>JNDI_NAME> | ||
+ | |||
+ | |||
+ | === Throttling Configuration === | ||
+ | ==== How it works: ==== | ||
+ | Throttling is a feature introduced in 6.1.0 to avoid flooding Alert System with alerts when exceptional event trigger a huge number of errors on batch execution (Database crash...). | ||
+ | |||
+ | If throttling is enabled (THROTTLING_DELAY > 0), each time a batch will be executed a notification can occur in one of those 2 conditions: | ||
+ | |||
+ | * Number of errors since last nofifications is > 0 and last notification is older than THROTTLING_DELAY | ||
+ | * Number of errors since last nofifications is > 0 and number of errors for batch is >= to THROTTLING_THRESHOLD | ||
+ | |||
+ | If notification runs as a consequence of a successful batch execution (not related to batch being notified) then no error will be attached to mail, otherwise last error stacktrace will be attached to notification mail. | ||
+ | |||
+ | ==== Configuration parameters: ==== | ||
+ | |||
+ | {| class="wikitable" style="width:600px;" border="1" | ||
+ | | Parameter | ||
+ | | Description | ||
+ | | Default Value | ||
+ | |||
+ | |- | ||
+ | | THROTTLING_DELAY | ||
+ | | Delay in milliseconds between consecutive notifications of errors for one batch.This is to avoid mail overflow when a lot of errors occur in a reduced time interval. To disable set to -1. | ||
+ | | -1 (DISABLED) | ||
+ | |||
+ | |- | ||
+ | | THROTTLING_THRESHOLD | ||
+ | | Number of errors in a batch execution to trigger notification after first error | ||
+ | |10 | ||
+ | |||
+ | |- | ||
+ | | THROTTLING_CHECK_FREQUENCY | ||
+ | | Checks for errors are performed after THROTTLING_CHECK_FREQUENCY has passed | ||
+ | |60000 (1 minute) | ||
+ | |||
+ | |} | ||
=== Mailer connectivity === | === Mailer connectivity === | ||
Line 117: |
Line 228: | ||
==== Configuration parameters: ==== | ==== Configuration parameters: ==== | ||
- | {| class=" | + | {| class="wikitable" style="width:600px;" border="1" |
| Parameter | | Parameter | ||
| Description | | Description | ||
Line 125: |
Line 236: | ||
| mailHost | | mailHost | ||
| Host of the Mail Server | | Host of the Mail Server | ||
- | | | + | | N/A |
|- | |- | ||
Line 131: |
Line 242: | ||
| Port of the Mail Server | | Port of the Mail Server | ||
| 25 | | 25 | ||
+ | |||
+ | |- | ||
+ | | useTLS | ||
+ | | Use TLS for connection to server | ||
+ | | false | ||
+ | |||
+ | |- | ||
+ | | useSSL | ||
+ | | Use SSL for connection to server | ||
+ | | false | ||
+ | |||
+ | |- | ||
+ | | user | ||
+ | | Username if mail server requires authentication | ||
+ | | NA | ||
+ | |||
+ | |- | ||
+ | | password | ||
+ | | Password if mail server requires authentication | ||
+ | | NA | ||
+ | |||
+ | |||
|- | |- | ||
| Mailer | | Mailer | ||
| Name that will appear in Sent mails | | Name that will appear in Sent mails | ||
- | | | + | | N/A |
|} | |} | ||
Line 148: |
Line 281: | ||
=== Database connectivity Configuration === | === Database connectivity Configuration === | ||
+ | ==== JDBC Drivers Configuration (Version < 6.0.0) ==== | ||
+ | Driver libraries must be put in folder: | ||
+ | * <INSTALL_DIRECTORY>/common/lib | ||
+ | |||
+ | Ensure you always have the last version of the drivers. | ||
+ | |||
+ | ==== JDBC Drivers Configuration (Version >= 6.0.0) ==== | ||
+ | |||
+ | Driver jars must be put in "modules" folder under a group and artifact name. | ||
+ | |||
+ | Example : driver_toto.jar for database titi (company titi). | ||
+ | * Under "modules" there will be a folder: | ||
+ | ** titi/toto/main which will contain: | ||
+ | *** <driver_toto>.jar | ||
+ | *** module.xml | ||
+ | |||
+ | * module.xml content will be: | ||
+ | <source lang="xml"> | ||
+ | <module xmlns="urn:jboss:module:1.1" name="titi.toto"> | ||
+ | <resources> | ||
+ | <resource-root path="<driver_toto>.jar"/> | ||
+ | </resources> | ||
+ | </module> | ||
+ | </source> | ||
+ | |||
+ | * module.xml in folder com/ubikingenierie/consolebatch/main must be edited to add: | ||
+ | <source lang="xml"> | ||
+ | <module name="titi.toto" export="true" /> | ||
+ | </source> | ||
+ | |||
+ | ==== Connections Configuration ==== | ||
<nowiki>This configuration is done in file <INSTALL_DIRECTORY>/config/datasource.xml)</nowiki> | <nowiki>This configuration is done in file <INSTALL_DIRECTORY>/config/datasource.xml)</nowiki> | ||
Line 153: |
Line 317: | ||
* [http://commons.apache.org/dbcp/configuration.html Configuration parameters description] | * [http://commons.apache.org/dbcp/configuration.html Configuration parameters description] | ||
- | Note that "jdbc/console" is a mandatory pool for the server to run. | + | Note that "jdbc/console" is a mandatory pool for the server to run (poolPreparedStatements must be set to false for it). |
Datasource DTD: | Datasource DTD: | ||
Line 200: |
Line 364: | ||
<parameter> | <parameter> | ||
<name>testOnBorrow</name> | <name>testOnBorrow</name> | ||
+ | <value>false</value> | ||
+ | </parameter> | ||
+ | <parameter> | ||
+ | <name>testOnReturn</name> | ||
+ | <value>false</value> | ||
+ | </parameter> | ||
+ | <parameter> | ||
+ | <name>testWhileIdle</name> | ||
<value>true</value> | <value>true</value> | ||
</parameter> | </parameter> | ||
Line 247: |
Line 419: | ||
</source> | </source> | ||
- | === Extension Manager Configuration === | + | === Extension Manager Configuration (MANDATORY FILE)=== |
Configuration file is done in file <INSTALL_DIRECTORY>/config/extension-manager.xml. | Configuration file is done in file <INSTALL_DIRECTORY>/config/extension-manager.xml. | ||
An extension register Configuration extension (BatchStarts, their associated JMX and Persistence elements) to the core server. | An extension register Configuration extension (BatchStarts, their associated JMX and Persistence elements) to the core server. | ||
- | By default the server comes with a mandatory extension: | + | By default the server comes with a mandatory extension, so minimal configuration is: |
<source lang="xml"><?xml version="1.0" encoding="UTF-8"?> | <source lang="xml"><?xml version="1.0" encoding="UTF-8"?> | ||
<extensions> | <extensions> | ||
Line 258: |
Line 430: | ||
</extensions></source> | </extensions></source> | ||
- | === Plugin Manager Configuration === | + | === Plugin Manager Configuration (MANDATORY FILE)=== |
A plugin is a class with a start and destroy method. It contains code that must be executed at startup and shutdown of the server. | A plugin is a class with a start and destroy method. It contains code that must be executed at startup and shutdown of the server. | ||
Configuration file is referenced by property PLUGIN_MANAGER_FILE in config.properties. | Configuration file is referenced by property PLUGIN_MANAGER_FILE in config.properties. | ||
+ | By default Server comes with 3 mandatory plugins, so minimal configuration is: | ||
<source lang="xml"> | <source lang="xml"> | ||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
Line 268: |
Line 441: | ||
<plug-in className="salto.batch.plugin.ServiceInitializationPlugin" id="salto.batch.plugin.ServiceInitializationPlugin"> | <plug-in className="salto.batch.plugin.ServiceInitializationPlugin" id="salto.batch.plugin.ServiceInitializationPlugin"> | ||
<set-property property="initializationOrder" value="-2"></set-property> | <set-property property="initializationOrder" value="-2"></set-property> | ||
- | <set-property property="serviceConfigFile" value=" | + | <set-property property="serviceConfigFile" value="<DEPENDS ON YOUR INSTALLATION FOLDER>/config/service-config.properties"></set-property> |
</plug-in> | </plug-in> | ||
Line 298: |
Line 471: | ||
- | {| class=" | + | {| class="wikitable" style="width:600px;" border="1" |
| '''''Element''''' | | '''''Element''''' | ||
| '''''Description''''' | | '''''Description''''' | ||
Line 383: |
Line 556: | ||
</bar-resources></source> | </bar-resources></source> | ||
- | If developer has used « <tt>java:comp/env/jms/localConnectionFactory » in his code, he will in fact use the object jms/localConnectionFactoryOJMS. | + | If developer has used « <tt>java:comp/env/jms/localConnectionFactory </tt>» 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 « <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. | ||
Line 408: |
Line 581: | ||
|} | |} | ||
====== More details ====== | ====== More details ====== | ||
- | * [http:// | + | * [http://activemq.apache.org/jndi-support.html http://activemq.apache.org/jndi-support.html] |
====== Example ====== | ====== Example ====== | ||
Line 422: |
Line 595: | ||
<name>java.naming.factory.initial</name> | <name>java.naming.factory.initial</name> | ||
<value>org.apache.activemq.jndi.ActiveMQInitialContextFactory</value> | <value>org.apache.activemq.jndi.ActiveMQInitialContextFactory</value> | ||
+ | </env-property> | ||
+ | </jndi-object></source> | ||
+ | |||
+ | ==== JORAM ==== | ||
+ | ===== Libraries to add in business/lib folder ===== | ||
+ | * joram/ship/lib/JCup.jar | ||
+ | * joram/ship/lib/ow_monolog.jar | ||
+ | * joram/ship/lib/joram-shared.jar | ||
+ | * joram/ship/lib/joram-client.jar | ||
+ | |||
+ | |||
+ | ===== JNDI ===== | ||
+ | |||
+ | {| class="prettytable" | ||
+ | | '''''Attribute''''' | ||
+ | | '''''Value''''' | ||
+ | |||
+ | |- | ||
+ | | java.naming.factory.port | ||
+ | | 16400 | ||
+ | |||
+ | |- | ||
+ | | java.naming.factory.host | ||
+ | | <JORAM Server Host> | ||
+ | |||
+ | |- | ||
+ | | java.naming.factory.initial | ||
+ | | fr.dyade.aaa.jndi2.client.NamingContextFactory | ||
+ | |||
+ | |} | ||
+ | |||
+ | ===== Logging ===== | ||
+ | Ubik Batch Server uses log4j. | ||
+ | Joram uses Monolog. | ||
+ | Monolog is a wrapper to various logging libraries such as log4j or java.util.logging (logging API included in Java 1.4), so we just have to configure Monolog to use log4j. | ||
+ | |||
+ | # Configure Monolog/Joram: | ||
+ | ## Create an "a3debug.cfg" file with a single line <source lang="text">log.config.classname org.objectweb.util.monolog.wrapper.log4j.MonologLoggerFactory</source> | ||
+ | ## Package this file into a joram-config.jar file in the common/lib directory | ||
+ | # Configure Log4J/Ubik Batch Server: | ||
+ | * Add in the <Batch Server Home>/config/log4j.xml configuration file the line <source lang="xml"><categoryFactory class="org.objectweb.util.monolog.wrapper.log4j.MonologCategoryFactory"/></source> | ||
+ | |||
+ | '''Important:''' | ||
+ | You must have a single jar ow_monolog.jar in the server. | ||
+ | If a java.lang.ClassCastException is thrown by org.objectweb.util.monolog.wrapper.log4j.MonologLoggerFactory.getLogger(...), | ||
+ | verify the above configuration. | ||
+ | |||
+ | ====== More details ====== | ||
+ | * [https://wiki.objectweb.org/joram/Wiki.jsp?page=Main JORAM WIKI] | ||
+ | * [http://joram.ow2.org/ JORAM Website] | ||
+ | ====== Example ====== | ||
+ | <source lang="xml"><jndi-object> | ||
+ | <localJndiName>jms/localConnectionFactoryJORAM</localJndiName> | ||
+ | <type>javax.jms.ConnectionFactory</type> | ||
+ | <distantJndiName>demoConnectionFactoryJORAM</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></source> | ||
+ | |||
+ | ==== SonicMQ ==== | ||
+ | ===== Libraries to add in business/lib folder ===== | ||
+ | * client.jar | ||
+ | * broker.jar | ||
+ | * mfcontext.jar | ||
+ | |||
+ | ===== JNDI ===== | ||
+ | |||
+ | {| class="prettytable" | ||
+ | | '''''Attribute''''' | ||
+ | | '''''Value''''' | ||
+ | |||
+ | |- | ||
+ | | java.naming.provider.url | ||
+ | | tcp://hostname:2506 | ||
+ | |||
+ | |- | ||
+ | | java.naming.factory.initial | ||
+ | | com.sonicsw.jndi.mfcontext.MFContextFactory | ||
+ | |||
+ | |} | ||
+ | ====== More details ====== | ||
+ | * [http://www.sonicsoftware.com/products/whitepapers/docs/usingjndi.pdf http://www.sonicsoftware.com/products/whitepapers/docs/usingjndi.pdf] | ||
+ | |||
+ | ====== Example ====== | ||
+ | <source lang="xml"><jndi-object> | ||
+ | <localJndiName>jms/localConnectionFactorySonicMQ</localJndiName> | ||
+ | <type>javax.jms.ConnectionFactory</type> | ||
+ | <distantJndiName>demoConnectionFactorySonicMQ</distantJndiName> | ||
+ | <env-property> | ||
+ | <name>java.naming.provider.url</name> | ||
+ | <value>tcp://hostname:2506</value> | ||
+ | </env-property> | ||
+ | <env-property> | ||
+ | <name>java.naming.factory.initial</name> | ||
+ | <value>com.sonicsw.jndi.mfcontext.MFContextFactory</value> | ||
</env-property> | </env-property> | ||
</jndi-object></source> | </jndi-object></source> |
Current revision
Contents
|
JVM launcher configuration
For Version < 6.0.0, the server runs with a JDK 5 or JDK6 Ensure you always use the last update of major JDK version:
For Version >= 6.0.0, the server runs with a JDK 6 or JDK 7
Ensure you use the bundle for the right platform (32 bits / 64 bits)
JVM configuration is done in files:
- setEnv.cfg for Linux/Unix
- setenv.cmd for Windows
Advised options for the JVM are:
- -server
- -XX:MaxPermSize=128M (or above) depending on the number of BARs deployed on the server and their size
- Tune -Xms and -Xmx depending on the load of your batches and the number of BARs deployed
- -XX:+HeapDumpOnOutOfMemoryError
- -XX:HeapDumpPath=<path to logging folder>
Other options:
- -DLOG_ROOT_PATH=<path to logging folder>
This enables developers to name their logging files relatively to this file using ${LOG_ROOT_PATH}/<bar name>/<what they want>.log
Setting this property enables portable configuration files.
Batch Server General configuration
This configuration is in file <INSTALL_DIRECTORY>/config/config.properties
Common Configuration parameters:
Parameter | Description | Default Value |
---|---|---|
CONSOLE_ID | Unique ID Of the Batch Server | N/A |
INSTALL_DIR | Folder where server is installed | N/A |
CONFIG_ROOT | Declaration of a variable used later as ${} | ${INSTALL_DIR}/ config
|
PLUGIN_MANAGER_FILE | Path to the file that contains general plugin | ${CONFIG_ROOT}/plugin-manager.xml |
LOCK_DIR | Lock folder used only if service
com.saltoconsulting.console.service.LOCKING_SYSTEM is set to com.ubikingenierie.console.locking.impl.FileLockingService, by default Database Locking is used | ${INSTALL_DIR}/ LOCK_DIR |
COLD_DEPLOYMENT_DIR | Folder Batch Server will look into to deploy BARs at startup | ${INSTALL_DIR}/ batches-cold-deploy |
BAR_UPLOAD_DIRECTORY | Folder that will contain BARs transfered from Batch Web Controller,
This folder must only be used by this server and it must be writable | ${INSTALL_DIR}/ bar-upload-folder |
BAR_UPLOAD_LISTEN_PORT | Port on which the Batch server listens for BARs upload | N/A |
OUTPUT_DATA | Folder used temporarily for Mail Generation and Lifecycle state | <INSTALL_DIRECTORY> / output |
USER_FILE | File that hosts JMX Authentication informations | |
com.salto.console. MAIL_MANAGER_STORE | Component used to manage configuraton of Mails, choose between:
=> Saves data in Database(default)
=> Saves data in XML file | salto.batch.system. MailManagerDBStore |
MAIL_FILE | Configuration file for Mail Server (MUST BE OK TO SEND MAILS, always used) | ${CONFIG_ROOT} / mail.xml |
MAIL_MANAGER_FILE | File that contains Mails of users to be notified on error,
Used only if com.salto.console.MAIL_MANAGER_STORE=salto.batch.system.MailManagerXMLStore Otherwise informations are stored in Database | ${CONFIG_ROOT} / mail-manager.xml |
SNMP_FILE | File that contains SNMP (Simple network management protocol) configuration. | ${CONFIG_ROOT}/snmp.xml |
DEVELOPMENT_MODE | If true the console start in development mode: | FALSE
|
JVM_MANAGEMENT_CLASS | Extended Management implementation that provides live infos about server, to activate it, set its value to:
com.ubikingenierie.console.admin.system.PlatformMXManagementProvider | com.ubikingenierie.console.admin.system.NoopManagementProvider |
HIBERNATE_CONFIGURED_DIALECT | Force a dialect for Hibernate to override auto detection. For DB2 : com.ubikingenierie.console.persistance.hibernate.DB2ExtendedDialect | NA |
CLEANUP_DELAY | Cleanup delay in days for tables BATCH_HEAD and BATCH_TRT | 40 |
MAIL_SEND_ON_SYSTEM_BATCH_ERROR | Send mail on errors of System Batches | true |
JMX connectivity
Configuration parameters:
Parameter | 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) | |
ACTIVATE_HTTP_ADAPTOR | JMX interface that exposes Operations in a Browser (Do not activate in PRODUCTION) | false |
JMX_HTTP_ADAPTOR_PORT | Port of the HTTP JMX adaptor if ACTIVATE_HTTP_ADAPTOR is true |
service:jmx:rmi://<HOST OF THE MACHINE>:<JMX_SERVICE_PORT>/jndi/rmi:// <HOST OF THE MACHINE>:<NAMING_SERVICE_PORT>/<JNDI_NAME>
Throttling Configuration
How it works:
Throttling is a feature introduced in 6.1.0 to avoid flooding Alert System with alerts when exceptional event trigger a huge number of errors on batch execution (Database crash...).
If throttling is enabled (THROTTLING_DELAY > 0), each time a batch will be executed a notification can occur in one of those 2 conditions:
- Number of errors since last nofifications is > 0 and last notification is older than THROTTLING_DELAY
- Number of errors since last nofifications is > 0 and number of errors for batch is >= to THROTTLING_THRESHOLD
If notification runs as a consequence of a successful batch execution (not related to batch being notified) then no error will be attached to mail, otherwise last error stacktrace will be attached to notification mail.
Configuration parameters:
Parameter | Description | Default Value |
THROTTLING_DELAY | Delay in milliseconds between consecutive notifications of errors for one batch.This is to avoid mail overflow when a lot of errors occur in a reduced time interval. To disable set to -1. | -1 (DISABLED) |
THROTTLING_THRESHOLD | Number of errors in a batch execution to trigger notification after first error | 10 |
THROTTLING_CHECK_FREQUENCY | Checks for errors are performed after THROTTLING_CHECK_FREQUENCY has passed | 60000 (1 minute) |
Mailer connectivity
This configuration is referenced by MAIL_FILE property in config.properties (in file <INSTALL_DIRECTORY>/config/mail.xml)
Configuration parameters:
Parameter | Description | Default Value |
mailHost | Host of the Mail Server | N/A |
mailPort | Port of the Mail Server | 25 |
useTLS | Use TLS for connection to server | false |
useSSL | Use SSL for connection to server | false |
user | Username if mail server requires authentication | NA |
password | Password if mail server requires authentication | NA
|
Mailer | Name that will appear in Sent mails | N/A |
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
Database connectivity Configuration
JDBC Drivers Configuration (Version < 6.0.0)
Driver libraries must be put in folder:
- <INSTALL_DIRECTORY>/common/lib
Ensure you always have the last version of the drivers.
JDBC Drivers Configuration (Version >= 6.0.0)
Driver jars must be put in "modules" folder under a group and artifact name.
Example : driver_toto.jar for database titi (company titi).
- Under "modules" there will be a folder:
- titi/toto/main which will contain:
- <driver_toto>.jar
- module.xml
- titi/toto/main which will contain:
- module.xml content will be:
<module xmlns="urn:jboss:module:1.1" name="titi.toto"> <resources> <resource-root path="<driver_toto>.jar"/> </resources> </module>
- module.xml in folder com/ubikingenierie/consolebatch/main must be edited to add:
<module name="titi.toto" export="true" />
Connections Configuration
This configuration is done in file <INSTALL_DIRECTORY>/config/datasource.xml)
Ubik Batch Server uses Apache commons-dbcp implementation, see:
Note that "jdbc/console" is a mandatory pool for the server to run (poolPreparedStatements must be set to false for it).
Datasource DTD:
<!ELEMENT drivers (ResourceParams*) > <!ELEMENT ResourceParams (parameter*) > <!ATTLIST ResourceParams name CDATA #REQUIRED> <!ELEMENT parameter (name,value)> <!ELEMENT name (#PCDATA)> <!ELEMENT value (#PCDATA)>
Example of a pool configuration:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE drivers PUBLIC "-//Salto-consulting //DTD JDBC Datasource Configuration 1.0//EN" "http://www.salto-consulting.com/consolebatch/config/datasource.dtd"> <drivers> <ResourceParams name="jdbc/batchweb"> <parameter> <name>user</name> <value>batchweb</value> </parameter> <parameter> <name>username</name> <value>batchweb</value> </parameter> <parameter> <name>password</name> <value><![CDATA[+64wI0/45dIWg1akLg5LMg==]]></value> </parameter> <parameter> <name>isPasswordEncrypted</name> <value>true</value> </parameter> <parameter> <name>driverClassName</name> <value>org.postgresql.Driver</value> </parameter> <parameter> <name>url</name> <value><![CDATA[jdbc:postgresql://localhost:5432/batchweb]]></value> </parameter> <parameter> <name>validationQuery</name> <value><![CDATA[select 1 from dual]]></value> </parameter> <parameter> <name>testOnBorrow</name> <value>false</value> </parameter> <parameter> <name>testOnReturn</name> <value>false</value> </parameter> <parameter> <name>testWhileIdle</name> <value>true</value> </parameter> <parameter> <name>initialSize</name> <value>0</value> </parameter> <parameter> <name>maxWait</name> <value>2000</value> </parameter> <parameter> <name>maxActive</name> <value>15</value> </parameter> <parameter> <name>minIdle</name> <value>1</value> </parameter> <parameter> <name>maxIdle</name> <value>2</value> </parameter> <parameter> <name>timeBetweenEvictionRunsMillis</name> <value>300000</value> </parameter> <parameter> <name>numTestsPerEvictionRun</name> <value>3</value> </parameter> <parameter> <name>poolPreparedStatements</name> <value>true</value> </parameter> <parameter> <name>maxOpenPreparedStatements</name> <value>50</value> </parameter> <parameter> <name>connectionProperties</name> <value>loglevel=org.postgresql.Driver.DEBUG;allowEncodingChanges=true</value> </parameter> </ResourceParams> ... </drivers>
Extension Manager Configuration (MANDATORY FILE)
Configuration file is done in file <INSTALL_DIRECTORY>/config/extension-manager.xml.
An extension register Configuration extension (BatchStarts, their associated JMX and Persistence elements) to the core server. By default the server comes with a mandatory extension, so minimal configuration is:
<?xml version="1.0" encoding="UTF-8"?> <extensions> <extension className="com.ubikingenierie.console.configuration.extension.CoreExension" > </extension> </extensions>
Plugin Manager Configuration (MANDATORY FILE)
A plugin is a class with a start and destroy method. It contains code that must be executed at startup and shutdown of the server.
Configuration file is referenced by property PLUGIN_MANAGER_FILE in config.properties. By default Server comes with 3 mandatory plugins, so minimal configuration is:
<?xml version="1.0" encoding="UTF-8"?> <!-- #Release @VERSION@ at @DATE@ --> <plugins> <plug-in className="salto.batch.plugin.ServiceInitializationPlugin" id="salto.batch.plugin.ServiceInitializationPlugin"> <set-property property="initializationOrder" value="-2"></set-property> <set-property property="serviceConfigFile" value="<DEPENDS ON YOUR INSTALLATION FOLDER>/config/service-config.properties"></set-property> </plug-in> <plug-in className="com.saltoconsulting.console.monitoring.plugin.HealthMonitorPlugin" id="com.saltoconsulting.console.monitoring.plugin.HealthMonitorPlugin"> <set-property property="initializationOrder" value="-1"></set-property> <set-property property="schedulingPeriod" value="120000"></set-property> <set-property property="acceptableBatchDelay" value="120000"></set-property> </plug-in> <plug-in className="salto.batch.system.LockedBatchCheckerPlugin" id="com.saltoconsulting.batch.system.plugin.LockedBatchCheckerPlugin"> <set-property property="initializationOrder" value="-1"></set-property> </plug-in> </plugins>
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
|
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)
|
env-property/name | Name of the property, examples:* java.naming.provider.url
|
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>
JORAM
Libraries to add in business/lib folder
- joram/ship/lib/JCup.jar
- joram/ship/lib/ow_monolog.jar
- joram/ship/lib/joram-shared.jar
- joram/ship/lib/joram-client.jar
JNDI
Attribute | Value |
java.naming.factory.port | 16400 |
java.naming.factory.host | <JORAM Server Host> |
java.naming.factory.initial | fr.dyade.aaa.jndi2.client.NamingContextFactory |
Logging
Ubik Batch Server uses log4j. Joram uses Monolog. Monolog is a wrapper to various logging libraries such as log4j or java.util.logging (logging API included in Java 1.4), so we just have to configure Monolog to use log4j.
- Configure Monolog/Joram:
- Create an "a3debug.cfg" file with a single line
log.config.classname org.objectweb.util.monolog.wrapper.log4j.MonologLoggerFactory
- Package this file into a joram-config.jar file in the common/lib directory
- Create an "a3debug.cfg" file with a single line
- Configure Log4J/Ubik Batch Server:
- Add in the <Batch Server Home>/config/log4j.xml configuration file the line
<categoryFactory class="org.objectweb.util.monolog.wrapper.log4j.MonologCategoryFactory"/>
Important: You must have a single jar ow_monolog.jar in the server. If a java.lang.ClassCastException is thrown by org.objectweb.util.monolog.wrapper.log4j.MonologLoggerFactory.getLogger(...), verify the above configuration.
More details
Example
<jndi-object> <localJndiName>jms/localConnectionFactoryJORAM</localJndiName> <type>javax.jms.ConnectionFactory</type> <distantJndiName>demoConnectionFactoryJORAM</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>
SonicMQ
Libraries to add in business/lib folder
- client.jar
- broker.jar
- mfcontext.jar
JNDI
Attribute | Value |
java.naming.provider.url | tcp://hostname:2506 |
java.naming.factory.initial | com.sonicsw.jndi.mfcontext.MFContextFactory |
More details
Example
<jndi-object> <localJndiName>jms/localConnectionFactorySonicMQ</localJndiName> <type>javax.jms.ConnectionFactory</type> <distantJndiName>demoConnectionFactorySonicMQ</distantJndiName> <env-property> <name>java.naming.provider.url</name> <value>tcp://hostname:2506</value> </env-property> <env-property> <name>java.naming.factory.initial</name> <value>com.sonicsw.jndi.mfcontext.MFContextFactory</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>
Authors
- Philippe Mouawad
History
- Page created by Pmouawad, 21 March 2008: New page: == 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 remo...
- Contributors: Pmouawad x99, Abourre x2
- Last modified by Pmouawad, 10 January 2014: /* Connections Configuration */