JBoss UG JCA HIGH AVAILABILITY

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 46

High Availability T24 Browser &

JCA
JBoss Application Server v4.2.3GA

User Guide

IMPORTANT NOTE:
This document is for internal use only.

Page 1
Information in this document is subject to change without notice.
No part of this document may be reproduced or transmitted in any form or by any means,
electronic or mechanical, for any purpose, without the express written permission of TEMENOS Holdings NV.

Copyright 2002-2006 TEMENOS Holdings NV. All rights reserved.


Document revisions
Date Author Changes Made
04/08/2009 Sheeraz Junejo Initial revision

Page 2
Contents
Introduction.............................................................................................................................................4
jBoss Clustering.....................................................................................................................................5
Assumptions...........................................................................................................................................6
System Configurations........................................................................................................................7
Application Server and Dependent Components Installation..........................................8
Installing jBoss Messaging 1.4.4 On jBoss 4.2...................................................................8
Installing and Configuring MySQL 5.1.................................................................................13
Installing and Configuring Apache HTTP Server 2.2......................................................15
jBoss Configuration For Load Balancing and Session Replication............................18
T24 Component Deployment.....................................................................................................20
Deploying Resource Adaptors................................................................................................20
Deploying t24-destination-service.xml...............................................................................22
Deploying ofsmessage-ejb.jar................................................................................................23
Deploying BrowserWeb.war....................................................................................................26
High-availability scenarios..............................................................................................................33
Load balancing.................................................................................................................................34
Failover 1 – Server 3 down..........................................................................................................36
Failover 2 – Server 3 down & jAgent connection [A2] failure........................................37
Failover 3 – jAgent connection [A1] failure...........................................................................38
Failover 4 – jAgent connection [A1 & A2] failures..............................................................39
Failover 5 – jAgent connection [A1 & A3] failures..............................................................40
Failover 6 – Reply failure after a successful T24 transaction........................................41
Resources..............................................................................................................................................44

Page 3
Introduction
Failover is a backup operational mode in which the functions of a system component (such as a
processor, server, network, or database, for example) are assumed by secondary system
components when the primary component becomes unavailable through either failure or scheduled
down time. Used to make systems more fault-tolerant, failover is typically an integral part of
mission-critical systems that must be constantly available. The procedure involves automatically
offloading tasks to a standby system component so that the procedure is as seamless as possible
to the end user. Failover can apply to any aspect of a system: within a personal computer, for
example, failover might be a mechanism to protect against a failed processor; within a network,
failover can apply to any network component or system of components, such as a connection path,
storage device, or Web server.

The RH jBoss Application Server v4.2.3GA used throughout this document provides both load
balancing and fail-over mechanisms by means of:

 Clustering

 Distributed JMS destinations (queues)

High availability is provided entirely by RH jBoss and does not require special T24 Browser, JCA and
TAFC instances. This document explains the different steps involved in configuring a jBoss cluster
and highlights the different high-availability scenarios which need to be addressed.

Page 4
jBoss Clustering
Before we move onto system configuration we want to discuss a little bit about jBoss4.2.3
clustering. The JBoss Application Server (AS) comes with clustering support out of the box. The
simplest way to start a JBoss server cluster is to start several JBoss instances on the same local
network, using the ‘run -c all’ command for each instance. Those server instances, all started in
the all configuration, detect each other and automatically form a cluster. For complete details on
jBoss clustering please refer to the following link;

http://docs.jboss.org/jbossas/jboss4guide/r4/html/cluster.chapt.html

Above jBoss setup can create cluster but it can’t be used in production environment. We need to
employ an HTTP server in front of our cluster to load balance the request. We have used open
source Apache HTTP Server 2.2 in this example as a load balancer. After employing apache we can
achieve basic failover functionalities like load balancing and session replication in case the serving
application server goes down.

For advance failover functionalities like JMS failovers we need to employ a reliable and robust
messaging service which can handle these kinds of failover. We have employed jBoss messaging
1.4.4 to achieve these functionalities.

Note: From jBoss AS 5 there is no more jBoss MQ only jBoss messaging will be
employed. For more details please refer to the following link;

http://www.jboss.org/community/wiki/JBossMQ

If User wants to use jBoss messaging in a cluster it requires an external shared database for
messaging. This database can be MSSQL, ORACLE, DB2, MYSQL etc. We have used MySQL for this
example.
You can download each of the above mentioned components from following links;

Download jBoss 4.2.3GA

Download jBoss Messaging 1.4.4

Download Apache 2.2

Download MySQL 5.1

Download Apache Ant

Page 5
Note: Apache Ant is required to install jBoss messaging automatically.

Page 6
Assumptions
This document describes many concepts and methodologies that are highly technical in nature, and
as such prerequisite knowledge of the following is considered essential:

 jBoss Application Server


 Java Standard Edition
 Java Enterprise Edition
o JCA
o MDB
 J2EE application servers
 JMS
 TAFC

Page 7
System Configurations
Failover and load balancing in jBoss is provided by clustering. The systems used throughout this
document contain two application servers hosted on two separate physical machines, all members
of the same cluster and one Apache HTTP Server 2.2 for load balancing. In production scenarios,
servers should be hosted by different machines; Logical view of the system is as follows;

Note:
This system is hosting the T24 Browser, T24 J2EE components (OFS Message MDB and jRemote JCA
Resource Adapter) on same server but T24 (jAgent) on the different machine. System architects
may choose to deploy T24 Browser on different servers in a cluster for more scalable system.

Page 8
Application Server and Dependent Components Installation
jBoss Application Server setup usually comes as ‘jboss-VERSION.zip’ or ‘jboss-VERSION.tar.gz’
packages which can be easily extracted to any desired location. By default jBoss package contains
three profiles configurations called ‘minimal’, ‘default’ and ‘all’. For clustering we will require
‘all’ configuration. Following are the synonyms we will use throughout this document.

JBOSS_HOME : jBoss installed directory (e.g. C:\jBoss-4.2.3-GA)


CONFIG_HOME : JBOSS_HOME\server\all
JBOSS_CONFIG : JBOSS_HOME\server\FailOverServer1

Note: We are using separate machines for each cluster member in this example which is
recommended for production environment.

Installing jBoss Messaging 1.4.4 On jBoss 4.2

JBOSS_CONFIG will be the directory where jBoss messaging will be installed. jBoss Application
Server 4.2.3 contains jBoss MQ messaging by default but we want to use jBoss messaging, instead
which we need to install explicitly. After installation of jBoss messaging a directory will be created
under ‘JBOSS_HOME/server’ directory by name ‘JBOSS_CONFIG’.
In this section we present JBoss Messaging automated installation in JBoss AS 4.2. For more options
and details please refer o the following link;

Installing jBoss Messaging On jBoss 4.2

Automated Installation

Note: This procedure should only be performed from a clean JBoss AS 4.2 installation. If
you have modified the JBoss AS 4.2 installation at all since installation then you will
need to perform a manual clustered JBoss Messaging installation
For the rest of the procedure we assume JBOSS_CONFIG refers to your new messaging
configuration (e.g. FailOverServer1)

You don't actually have to create an environment variable JBOSS_CONFIG, this is just used in the
installation instructions to describe the steps

 Set up the JBOSS_HOME environment variable to point to the JBoss 4.2 installation you want to
use JBoss Messaging with.

Page 9
Run the installation script, available in the ‘util’ directory of the release bundle of jBoss
messaging. If you want to create a clustered installation based on the ‘all’ configuration or
change the configuration name;

cd util

ant -f release-admin.xml -Dmessaging.config.source=all -


Dmessaging.config.name=FailOverServer1

Important: Please add ‘ANT_HOME/bin’ in your PATH environment variable to execute above
command. You can download Apache Ant using link provided in jBoss Clustering section.

Note: For a clustered installation it is mandatory that a shared database is available


to all nodes in the cluster. The default JBoss AS uses HSQLDB for its database which
is a local shared database. Therefore in order to use clustering you must replace this
with a different shared database. If the database is not been replaced then clustering
will not work.

 Replace JBOSS_CONFIG/deploy/jboss-messaging.sar/hsqldb-persistence-service.xml by
the <databasename>-persistence-service.xml from
<jBossMessagingDownloadPackage>/examples/config. For instance mysql-persistence-
service.xml.
 Configure a JCA datasource mysql-ds.xml using an example from
JBOSS_HOME/docs/examples/jca and copying to JBOSS_CONFIG/deploy. JBoss Messaging
uses DefaultDS by default so you should configure your datasource to bind to that.

 Remove hsqldb-ds.xml from JBOSS_CONFIG/deploy.

 Copy your database driver to JBOSS_CONFIG/lib. Your database driver can probably be
downloaded from your database provider's web site. File we have used can be copied from
Installing and Configuring MySQL section below.

 Ensure the ServerPeerID MBean attribute value in JBOSS_CONFIG/deploy/jboss-


messaging.sar/messaging-service.xml is unique for each node. The ServerPeerID value
must be a valid integer. Every node MUST have a unique id, including those just connected by
message bridges.

Note: Each node must have a unique ServerPeerID for clustering to work!

Page 10
 There are few extra steps at “Extra steps to complete your installation”
 That's it

Affected Directory Structure After Above Configurations

RED = Removed or Replaced Green = Added or New Blue = Updated or Edited

JBOSS_CONFIG

|_ deploy

|__ jboss-messaging.sar

|__ hsqldb-persistence-service.xml replaced by mysql-persistence-service.xml

|__ messaging-service.xml

|__ mysql-ds.xml

|__ hsqldb-ds.xml

|__ lib

|__ mysql-connector-java-1.5.8-bin.jar

Extra steps to complete your installation

You should also make these changes on any configuration you choose, to remove all references to
the old JBossMQ:

Note: JBoss Messaging 1.4.0 requires a patched version of jboss-remoting.jar. This


version is not available in the JBoss AS 4.2.0 or JBoss AS 4.2.1 distributions. Please
download it and copy it into the $JBOSS_HOME/server/<your server name>/lib directory
of any server profiles that use JBoss Messaging 1.4.0. If you are using JBoss Messaging
from a standalone client also make sure this jar is on your classpath *before* jbossall-
client.jar. File we have used is as follows;

Page 11
 Edit JBOSS_CONFIG/deploy/jms-ds.xml and replace jboss.mq by jboss.messaging for every
occurrence. If you are in a clustered installation, then do the above with the file
JBOSS_CONFIG/deploy/hajndi-jms-ds.xml.
 Edit JBOSS_CONFIG/conf/standardjboss.xml and set CreateJBossMQDestination to false
for every occurrence. Make sure it looks like this:

<CreateJBossMQDestination>false</CreateJBossMQDestination>

Note: Those Proxies will try to create a Destination on JBossMQ if they can't find it on
JNDI, which could cause some errors related to JBoss MQ.

 Edit JBOSS_CONFIG/conf/jboss-service.xml and remove the reference to JBoss MQ on JSR-


77 Management Bean as follows;

<!-- ============================================================ -->


<!-- JSR-77 Single JBoss Server Management Domain -->
<!-- ============================================================ -->
<mbean code="org.jboss.management.j2ee.LocalJBossServerDomain"

... Remove this line ...


<attribute name="JMSService">jboss.mq:service=DestinationManager</attribute>

 Change JBOSS_CONFIG/conf/login-config.xml and remove jboss-mq security policies

### Remove these lines:

<!-- Security domain for JBossMQ -->


<application-policy name = "jbossmq">
<authentication>
<login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
flag = "required">
<module-option name = "unauthenticatedIdentity">guest</module-option>
<module-option name = "dsJndiName">java:/DefaultDS</module-option>
<module-option name = "principalsQuery">
SELECT PASSWD FROM JMS_USERS WHERE USERID=?</module-option>
<module-option name = "rolesQuery">
SELECT ROLEID, 'Roles' FROM JMS_ROLES WHERE USERID=?</module-option>
</login-module>
</authentication>
</application-policy>

<!-- Security domain for JBossMQ when using file-state-service.xml


<application-policy name = "jbossmq">
<authentication>
<login-module code = "org.jboss.mq.sm.file.DynamicLoginModule"
flag = "required">

Page 12
<module-option name = "unauthenticatedIdentity">guest</module-option>
<module-option name =
"sm.objectname">jboss.mq:service=StateManager</module-option>
</login-module>
</authentication>
</application-policy>
-->

Reference: For advance usage and reference check the below link;

jBoss Messaging Clustered Installation

After following the above steps for a successful installation, repeat this for the all the members of
the cluster on different machines.

Reminder: Please remember to change the ServerPeerID to a unique number for each
node in a cluster. This can be done by editing ‘JBOSS_CONFIGE\deploy\jboss-
messaging.sar\messaging-service.xml’ file as follows;

<mbean code="org.jboss.jms.server.ServerPeer"
name="jboss.messaging:service=ServerPeer"
xmbean-dd="xmdesc/ServerPeer-xmbean.xml">
<!-- The unique id of the server peer - in a cluster each node MUST have a
unique value - must be an integer -->
<attribute name="ServerPeerID">$
{jboss.messaging.ServerPeerID:0}</attribute>

Page 13
Affected Directory Structure After Above Configurations

RED = Removed or Replaced Green = Added or New Blue = Edited or Updated

JBOSS_CONFIG

|_ deploy

|__ hajndi-jms-ds.xml

|__ conf

|__ standardjboss.xml

|__ jboss-service.xml

|__ login-config.xml

|__ lib

|__ jboss-remoting.jar

Page 14
Installing and Configuring MySQL 5.1

jBoss messaging requires a shared database which can be accessed by all the cluster nodes from
different machines. To achieve this we need to install and configure MySQL database separately.
Note: Please install MySQL as a service and leave password field empty at installation
time for testing purpose only.
By default MySQL database allows only database connection from ‘localhost’ or ‘127.0.0.1’. This
can be verified by logging into MySQL using command prompt as follows;

You can change one of the entries mapped to root or you can add new record into user table by
assigning ‘%’ to host which means anyone can access the database; by applying following
command;

INSERT INTO user (Host, User, Password) values (“%”, “root”, “”);
FLUSH PRIVILEGES;

Note: Before starting jBoss please create database ‘jbossdb’ or the name you have
defined in connection-url attribute of ‘JBOSS_CONFIG/deploy/mysql-ds.xml’ as follows;

<?xml version="1.0" encoding="UTF-8"?>

<!-- $Id: mysql-ds.xml 71535 2008-04-01 07:05:03Z [email protected] $ -->


<!-- Datasource config for MySQL using 3.0.9 available from:
http://www.mysql.com/downloads/api-jdbc-stable.html

Page 15
-->

<datasources>
<local-tx-datasource>
<jndi-name>DefaultDS</jndi-name>
<connection-url>jdbc:mysql://IP_ADDRESS:3306/jbossdb</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
<password></password>
<exception-sorter-class-
name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-
sorter-class-name>
<!-- should only be used on drivers after 3.22.1 with "ping" support
<valid-connection-checker-class-
name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-
connection-checker-class-name>
-->
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->
<!-- sql to call on an existing pooled connection when it is obtained from
pool - MySQLValidConnectionChecker is preferred for newer drivers
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
-->

<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional)


-->
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>

For more details and options about how to configure MySQL please refer the following link;

Configure MySQL Database for jBoss

Note: We used following file as a database driver to connect to MySQL from jBoss. Copy
this file into your ‘JBOSS_CONFIG/lib’ directory.

Page 16
Installing and Configuring Apache HTTP Server 2.2

Apache HTTP Server acts as a load balancer and will take care of session replication at the same
time in this example. Install Apache HTTP Server 2.2. Setup will install an Apache 2.2 service in
windows. Before you start this service you need to modify some configurations to connect to jBoss
Application Server cluster. Steps to configure Apache with jBoss are as follows;
 Download modjk 1.2.x (At least 1.2.27 suggested). Copy below file into
‘APACHE_HOME/modules’ directory referenced below in ‘mod_jk.conf’ file (marked RED).

 Change the main Apache config to include modjk Config by updating ‘httpd.conf’ configuration
file which can be found under ‘APACHE_HOME/conf’ directory and add the following lines;
# Include mod_jk's specific configuration file
Include conf/mod_jk.conf

 Configure the mod_jk configuration files in APACHE_HOME/conf/mod_jk.conf as follows;

# Load mod_jk module

# Specify the filename of the mod_jk lib

LoadModule jk_module modules/mod_jk.so

# Where to find workers.properties

JkWorkersFile conf/workers.properties

# Where to put jk logs

JkLogFile logs/mod_jk.log

# Set the jk log level [debug/error/info]

JkLogLevel info

# Select the log format

JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"

Page 17
# JkRequestLogFormat

JkRequestLogFormat "%w %V %T"

# Mount your applications

JkMount /BrowserWeb/* loadbalancer

# Add shared memory.

# This directive is present with 1.2.10 and

# later versions of mod_jk, and is needed for

# for load balancing to work properly

JkShmFile logs/jk.shm

# Add jkstatus for managing runtime data

<Location /jkstatus/>

JkMount status

Order deny,allow

Deny from all

Allow from 0.0.0.0

</Location>

 Configure the modjk workers (JBoss nodes used by Apache) as referenced


‘workers.properties’ (marked BLUE) file in above mod_jk.conf. User needs to create this file in
‘APACHE_HOME/conf’ directory and update the values in RED accordingly. Properties shown
below in PURPLE are for session replication.

# Define list of workers that will be used

# for mapping requests

worker.list=loadbalancer,status

# Define Node1

# modify the host as your host IP or DNS name. Default port for jBoss ajp
connector is 8009

Page 18
worker.Server1.port=8009

worker.Server1.host=IP_ADDRESS_SERVER_1

worker.Server1.type=ajp13

worker.Server1.lbfactor=1

worker.Server1.cachesize=10

# Define Node2

# modify the host as your host IP or DNS name.

worker.Server2.port=8009

worker.Server2.host=IP_ADDRESS_SERVER_2

worker.Server2.type=ajp13

worker.Server2.lbfactor=1

worker.Server2.cachesize=10

# Load-balancing behavior – Here we are defining the total number of server where
load will be balanced

worker.loadbalancer.type=lb

worker.loadbalancer.balance_workers=Server1,Server2

worker.loadbalancer.sticky_session=1

#worker.list=loadbalancer

# Status worker for managing load balancer

worker.status.type=status

 Configure the Apache URIs served by modjk (the applications served by JBoss), In our case it will
be ‘BrowserWeb’ which is already defined in mod_jk.conf file (marked GREEN)
 Just restart Apache service to pick up the new changes. At this point your Apache HTTP Server is
ready load balance and replicates the sessions if any active Application Server goes down. For
more details and options please refer to the following link;

Using mod_jk with jBoss

Page 19
Affected Directory Structure After Above Configurations

RED = Removed or Replaced Green = Added or New Blue = Edited or Updated

APACHE_HOME

|_ modules

|__ mod_jk.so

|__ conf

|__ httpd.conf

|__ mod_jk.conf

|__ workers.properties

jBoss Configuration For Load Balancing and Session Replication

To complete the configuration, we also need to name each node of jBoss AS to match the names
specified in above ‘workers.properties’ (Marked in ORANGE) file.

To do this, edit the server.xml file. Where server.xml is located In JBoss 4.2.3, it's
JBOSS_CONFIG/deploy/jboss-web.deployer/server.xml and locate the <Engine/.> element
and add an attribute jvmRoute as follows;

<Engine name="jboss.web" defaultHost="localhost" jvmRoute="Server1">


.
</Engine>

The jvmRoute attribute value must match the name specified in Apache workers.properties.

In the server.xml file, make sure that the AJP 1.3 Connector is uncommented, e.g.:

<!-- A AJP 1.3 Connector on port 8009 -->

<Connector port="8009" address="${jboss.bind.address}"


emptySessionPath="true" enableLookups="false" redirectPort="8443"
protocol="AJP/1.3" connectionTimeout="600000" maxThreads="200"/>

Finally, we need to tell JBoss to add a special value that detects when failover of a session from a
distributed webapp has occurred. This JvmRouteValue ensures a new session cookie is emitted
that includes the jvmRoute of the server that is now handling the session.

Page 20
Note: This configuration step is only needed with JBoss 4.2.x and earlier; beginning with
JBoss AS 5 the application server uses the existence of a jvmRoute configuration in
server.xml as an indication that it should add the JvmRouteValue.

To do this, edit the jboss-service.xml file for the JBoss Web service. This file can be located under
‘JBOSS_CONFIG/deploy/jboss-we.deployer/META-INF’ directory locate the <attribute>
element with a name of UseJK, and set its value to "true" as follows;

<attribute name="UseJK">true</attribute>

Note: Repeat above setup for all the nodes in the cluster.

Page 21
T24 Component Deployment

Now we are ready to deploy T24 component for High Availability. There are two ways to deploy
custom applications and services into jBoss cluster. First is to deploy component separately on
each node of cluster. Second is ‘farm’ deployment method where you copy all your common and
similar components of a cluster into ‘JBOSS_CONFIG/farm’ directory of any of the cluster member
and each component will be automatically deployed on all of the nodes.

Deploying Resource Adaptors

First of all copy ‘jremote-ra.rar’ file directly into ‘JBOSS_CONFIG/deploy’ directory because
each resource adaptor connection factory on each node of a cluster is bound to a different
combination of Destination IP and Ports and we cannot adopt farm methodology for deploying
resource adaptors.
These combinations of destination IP addresses and ports will be defined in t24-ds.xml which you
need to copy directly into ‘JBOSS_CONFIG/deploy’ directory. Deployment descriptor content
should be as follows;

t24-ds.xml

<?xml version="1.0" encoding="utf-8"?>


<!--
================================================================================ --
>
<!--
-->
<!-- JBoss Server Configuration
-->
<!--
-->
<!-- jRemote resource adapter deployment for JBoss, configured for local
connection -->
<!--
-->
<!--
================================================================================ --
>
<connection-factories>
<tx-connection-factory>
<jndi-name>jca/t24ConnectionFactory</jndi-name>

<rar-name>jremote-ra.rar</rar-name>
<connection-definition>com.jbase.jremote.JConnectionFactory</connection-
definition>

Page 22
<config-property name="host"
type="java.lang.String">PRIMARY_IP_ADDRESS</config-property> -->
<config-property name="port" type="java.lang.Integer">PRIMARY_PORT</config-
property>

<config-property name="allowInput" type="java.lang.Boolean">true</config-


property>

<config-property name="compression" type="java.lang.Boolean">true</config-


property>
<config-property name="compressionThreshold"
type="java.lang.Integer">2048</config-property>

<config-property name="envVariables"
type="java.lang.String">OFS_SOURCE=GCS</config-property>

<!--pooling parameters-->
<min-pool-size>1</min-pool-size>
<max-pool-size>10</max-pool-size>
<prefill>true</prefill>

</tx-connection-factory>

<tx-connection-factory>
<jndi-name>jca/t24ConnectionFactory_DLQ</jndi-name>

<rar-name>jremote-ra.rar</rar-name>
<connection-definition>com.jbase.jremote.JConnectionFactory</connection-
definition>

<config-property name="host" type="java.lang.String">BACKUP_IP_ADDRESS</config-


property> -->
<config-property name="port" type="java.lang.Integer">BACKUP_PORT</config-
property>

<config-property name="allowInput" type="java.lang.Boolean">true</config-


property>

<config-property name="compression" type="java.lang.Boolean">true</config-


property>
<config-property name="compressionThreshold"
type="java.lang.Integer">2048</config-property>

<config-property name="envVariables"
type="java.lang.String">OFS_SOURCE=GCS</config-property>

<!--pooling parameters
<min-pool-size>1</min-pool-size>-->

<max-pool-size>10</max-pool-size>

<!--<prefill>true</prefill>-->

Page 23
</tx-connection-factory>

</connection-factories>

Note: Update the Primary and Backup IP addresses and ports accordingly.

Deploying t24-destination-service.xml

Copy t24-destinations-service.xml into ‘JBOSS_CONFIG/farm’ directory of any one of the cluster


node which should look like as follows;

t24-destinations-service.xml

<?xml version="1.0" encoding="UTF-8"?>


<server>

<mbean code="org.jboss.jms.server.destination.QueueService"
name="jboss.messaging.destination:service=Queue,name=t24OFSQueue"
xmbean-dd="xmdesc/Queue-xmbean.xml">
<depends optional-attribute-
name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
<depends>jboss.messaging:service=PostOffice</depends>
<attribute name="Clustered">true</attribute>
<attribute name="MaxDeliveryAttempts">1</attribute>
<attribute name="RedeliveryDelay">0</attribute>
<attribute
name="DLQ">jboss.messaging.destination:service=Queue,name=t24OFSDLQ</attribute>
</mbean>

<mbean code="org.jboss.jms.server.destination.QueueService"
name="jboss.messaging.destination:service=Queue,name=t24OFSDLQ"
xmbean-dd="xmdesc/Queue-xmbean.xml">
<depends optional-attribute-
name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
<depends>jboss.messaging:service=PostOffice</depends>
<attribute name="Clustered">false</attribute>
</mbean>

<mbean code="org.jboss.jms.server.destination.QueueService"
name="jboss.messaging.destination:service=Queue,name=t24OFSReplyQueue"
xmbean-dd="xmdesc/Queue-xmbean.xml">
<depends optional-attribute-
name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
<depends>jboss.messaging:service=PostOffice</depends>
<attribute name="Clustered">true</attribute>
</mbean>
</server>

Important values are marked in RED. Above XML will create three queues called t24OFQueue
(Clustered), t24OFSDLQ (Non-Clustered) and t24OFSReplyQueue (Clustered).

Page 24
Deploying ofsmessage-ejb.jar

Copy the ofsmessage-ejb.jar file into ‘JBOSS_CONFIG/farm’ directory in any of the cluster
member.
Note: Update the ajb-jar.xml and jboss.xml as follows;

ejb-jar.xml

<?xml version="1.0" encoding="UTF-8"?>


<ejb-jar id="EJBJar_OfsMessageMDB" version="2.1"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
<display-name>OFSMessage</display-name>
<enterprise-beans>
<message-driven id="MessageDriven_OfsMessageMDB">
<display-name>OFSMessage Bean</display-name>
<ejb-name>OFSMessageMDB</ejb-name>
<ejb-class>com.temenos.ofsmessage.mdb.OFSMessageMDB</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Container</transaction-type>
<message-destination-type>javax.jms.Queue</message-destination-type>
<activation-config>
<activation-config-property>
<activation-config-property-name>acknowledgeMode</activation-
config-property-name>
<activation-config-property-value>Auto-acknowledge</activation-
config-property-value>
</activation-config-property>
</activation-config>
<resource-ref id="ResourceRef_jmsQueueConnectionFactory">
<description>T24 Queue Connection Factory</description>
<res-ref-name>jms/jmsConnectionFactory</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref id="ResourceRef_t24ConnectionFactory">
<description>T24 JCA Connection Factory</description>
<res-ref-name>jca/t24ConnectionFactory</res-ref-name>
<res-type>com.jbase.jremote.JConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref id="ResourceRef_t24OFSReplyQueue">
<description>OFS reply queue</description>
<res-ref-name>queue/t24OFSReplyQueue</res-ref-name>
<res-type>javax.jms.Queue</res-type>

Page 25
<res-auth>Container</res-auth>
</resource-ref>
</message-driven>

<message-driven id="MessageDriven_OfsMessageMDB_DLQ">
<display-name>OFSMessage Bean DLQ</display-name>
<ejb-name>OFSMessageMDB_DLQ</ejb-name>
<ejb-class>com.temenos.ofsmessage.mdb.OFSMessageMDB</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Container</transaction-type>
<message-destination-type>javax.jms.Queue</message-destination-type>
<activation-config>
<activation-config-property>
<activation-config-property-name>acknowledgeMode</activation-config-
property-name>
<activation-config-property-value>Auto-acknowledge</activation-config-
property-value>
</activation-config-property>
</activation-config>
<resource-ref id="ResourceRef_jmsQueueConnectionFactory_DLQ">
<description>T24 Queue Connection Factory</description>
<res-ref-name>jms/jmsConnectionFactory</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref id="ResourceRef_t24ConnectionFactory_DLQ">
<description>T24 JCA Connection Factory</description>
<res-ref-name>jca/t24ConnectionFactory</res-ref-name>
<res-type>com.jbase.jremote.JConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref id="ResourceRef_t24OFSReplyQueue_DLQ">
<description>OFS reply queue</description>
<res-ref-name>queue/t24OFSReplyQueue</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</message-driven>
</enterprise-beans>

<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>OFSMessageMDB</ejb-name>
<method-name>*</method-name>
</method>
<!-- NotSupported|Supports|Required|RequiresNew|Mandatory|Never -->
<trans-attribute>Required</trans-attribute>
</container-transaction>

<container-transaction>
<method>
<ejb-name>OFSMessageMDB_DLQ</ejb-name>
<method-name>*</method-name>

Page 26
</method>
<!-- NotSupported|Supports|Required|RequiresNew|Mandatory|Never -->
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>

Note: Above ejb-jar.xml will deploy activation specification of OFSMessageMDB and


OFSMessageMDB_DLQ with container managed transaction as ‘Required’

Jboss.xml
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN"


"http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">

<jboss>
<enterprise-beans>
<message-driven>
<ejb-name>OFSMessageMDB</ejb-name>
<destination-jndi-name>queue/t24OFSQueue</destination-jndi-name>
<resource-ref>
<res-ref-name>jms/jmsConnectionFactory</res-ref-name>
<jndi-name>java:/JmsXA</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>queue/t24OFSReplyQueue</res-ref-name>
<!-- <res-type>javax.jms.Queue</res-type>
-->
<jndi-name>queue/t24OFSReplyQueue</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>jca/t24ConnectionFactory</res-ref-name>
<jndi-name>java:jca/t24ConnectionFactory</jndi-name>
<!-- <res-type>com.jbase.jremote.JConnectionFactory</res-type>
-->
</resource-ref>
</message-driven>

<message-driven>
<ejb-name>OFSMessageMDB_DLQ</ejb-name>
<destination-jndi-name>queue/t24OFSDLQ</destination-jndi-name>
<resource-ref>
<res-ref-name>jms/jmsConnectionFactory</res-ref-name>
<jndi-name>java:/JmsXA</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>queue/t24OFSReplyQueue</res-ref-name>
<!--<res-type>javax.jms.Queue</res-type>-->
<jndi-name>queue/t24OFSReplyQueue</jndi-name>

Page 27
</resource-ref>
<resource-ref>
<res-ref-name>jca/t24ConnectionFactory</res-ref-name>
<jndi-name>java:jca/t24ConnectionFactory_DLQ</jndi-name>
<!--<res-type>com.jbase.jremote.JConnectionFactory</res-type>-->
</resource-ref>
</message-driven>
</enterprise-beans>
</jboss>

Note: Above jboss.xml will map the activation specification defined in ejb-jar.xml to an jBoss
Application Server. As we have changed our default transaction type from ‘Bean Managed’ to
‘Container Managed’ so we need to look for ‘java:/JmsXA’ connection factory instead of default
‘java:/connectionFactory’ otherwise DLQ will NOT work.

Deploying BrowserWeb.war

Copy BrowserWeb.war file into ‘JBOSS_CONFIG/farm’ directory of any of the Application Server in
cluster and start your nodes using following commands on each server on same network;

run.bat –c FailOverServer1 –b 0.0.0.0


run.bat –c FailOverServer2 –b 0.0.0.0

You’ll see similar output as follows on jBoss console for both of the servers;

jBoss Console Output

C:\jboss-4.2.3.GA\bin>run.bat -b 0.0.0.0 -c FailOverServer1


============================================================
===================

JBoss Bootstrap Environment

JBOSS_HOME: C:\jboss-4.2.3.GA

JAVA: C:\jdk1.6.0_13\bin\java

JAVA_OPTS: -Djava.util.logging.config.file="C:\jdk1.6.0_13\jre\lib\logging.properties" -
Dprogram.name=run.bat -server -Xms128m -Xmx512m -Dsun.rmi.dg
c.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000

CLASSPATH: C:\jdk1.6.0_13\lib\tools.jar;C:\jboss-4.2.3.GA\bin\run.jar

Page 28
============================================================
===================

15:59:45,210 INFO [Server] Starting JBoss (MX MicroKernel)...


15:59:45,210 INFO [Server] Release ID: JBoss [Trinity] 4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA
date=200807181417)
15:59:45,226 INFO [Server] Home Dir: C:\jboss-4.2.3.GA
15:59:45,226 INFO [Server] Home URL: file:/C:/jboss-4.2.3.GA/
15:59:45,226 INFO [Server] Patch URL: null
15:59:45,226 INFO [Server] Server Name: LCHServer1
15:59:45,226 INFO [Server] Server Home Dir: C:\jboss-4.2.3.GA\server\LCHServer1
15:59:45,226 INFO [Server] Server Home URL: file:/C:/jboss-4.2.3.GA/server/LCHServer1/
15:59:45,226 INFO [Server] Server Log Dir: C:\jboss-4.2.3.GA\server\LCHServer1\log
15:59:45,226 INFO [Server] Server Temp Dir: C:\jboss-4.2.3.GA\server\LCHServer1\tmp
15:59:45,242 INFO [Server] Root Deployment Filename: jboss-service.xml
15:59:45,960 INFO [ServerInfo] Java version: 1.6.0_13,Sun Microsystems Inc.
15:59:45,960 INFO [ServerInfo] Java VM: Java HotSpot(TM) 64-Bit Server VM 11.3-b02,Sun
Microsystems Inc.
15:59:45,960 INFO [ServerInfo] OS-System: Windows Server 2008 6.0,amd64
15:59:47,085 INFO [Server] Core system initialized
15:59:52,991 INFO [WebService] Using RMI server codebase: http://hmlwin08serv:8083/
15:59:52,991 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-
log4j.xml
15:59:53,960 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss
Inc.
15:59:53,960 INFO [TransactionManagerService] Setting up property manager MBean and JMX
layer
15:59:54,273 INFO [TransactionManagerService] Starting recovery manager
15:59:54,398 INFO [TransactionManagerService] Recovery manager started
15:59:54,413 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference
15:59:59,507 INFO [EJB3Deployer] Starting java:comp multiplexer
16:00:04,632 WARN [UDP] failed to join /224.0.0.75:7500 on net3: java.net.SocketException:
Unrecognized Windows Sockets error: 0: no Inet4Address ass
ociated with interface
16:00:04,632 WARN [UDP] failed to join /224.0.0.75:7500 on net4: java.net.SocketException:
Unrecognized Windows Sockets error: 0: no Inet4Address ass
ociated with interface
16:00:04,648 INFO [STDOUT]
-------------------------------------------------------
GMS: address is 10.44.5.89:51965
-------------------------------------------------------
16:00:06,663 INFO [TreeCache] viewAccepted(): [10.44.5.89:51965|0] [10.44.5.89:51965]
16:00:06,695 INFO [TreeCache] TreeCache local address is 10.44.5.89:51965
16:00:06,696 INFO [TreeCache] State could not be retrieved (we are the first member in group)
16:00:06,699 INFO [TreeCache] parseConfig(): PojoCacheConfig is empty
16:00:10,282 INFO [NativeServerConfig] JBoss Web Services - Native
16:00:10,284 INFO [NativeServerConfig] jbossws-3.0.1-native-2.0.4.GA (build=200803312044)
16:00:11,846 INFO [SnmpAgentService] SNMP agent going active
16:00:12,438 INFO [DefaultPartition] Initializing
16:00:12,524 WARN [TCP] failed to join /224.0.0.75:7500 on net3: java.net.SocketException:
Unrecognized Windows Sockets error: 0: no Inet4Address ass
ociated with interface

Page 29
16:00:12,530 WARN [TCP] failed to join /224.0.0.75:7500 on net4: java.net.SocketException:
Unrecognized Windows Sockets error: 0: no Inet4Address ass
ociated with interface
16:00:12,535 INFO [STDOUT]
-------------------------------------------------------
GMS: address is 10.44.5.89:7800
-------------------------------------------------------
16:00:15,584 INFO [DefaultPartition] Number of cluster members: 1
16:00:15,586 INFO [DefaultPartition] Other members: 0
16:00:15,587 INFO [DefaultPartition] Fetching state (will wait for 30000 milliseconds):
16:00:15,590 INFO [DefaultPartition] State could not be retrieved (we are the first member in
group)
16:00:15,645 INFO [HANamingService] Started ha-jndi bootstrap jnpPort=1100, backlog=50,
bindAddress=/0.0.0.0
16:00:15,655 INFO [DetachedHANamingService$AutomaticDiscovery] Listening on
0.0.0.0/0.0.0.0:1102, group=230.0.0.4, HA-JNDI address=10.44.5.89:1100
16:00:16,903 INFO [TreeCache] No transaction manager lookup class has been defined.
Transactions cannot be used
16:00:17,114 WARN [UDP] failed to join /224.0.0.75:7500 on net3: java.net.SocketException:
Unrecognized Windows Sockets error: 0: no Inet4Address ass
ociated with interface
16:00:17,117 WARN [UDP] failed to join /224.0.0.75:7500 on net4: java.net.SocketException:
Unrecognized Windows Sockets error: 0: no Inet4Address ass
ociated with interface
16:00:17,120 INFO [STDOUT]
-------------------------------------------------------
GMS: address is 10.44.5.89:51970
-------------------------------------------------------
16:00:19,133 INFO [TreeCache] viewAccepted(): [10.44.5.89:51970|0] [10.44.5.89:51970]
16:00:19,138 INFO [TreeCache] TreeCache local address is 10.44.5.89:51970
16:00:19,734 WARN [UDP] failed to join /224.0.0.75:7500 on net3: java.net.SocketException:
Unrecognized Windows Sockets error: 0: no Inet4Address ass
ociated with interface
16:00:19,737 WARN [UDP] failed to join /224.0.0.75:7500 on net4: java.net.SocketException:
Unrecognized Windows Sockets error: 0: no Inet4Address ass
ociated with interface
16:00:19,741 INFO [STDOUT]
-------------------------------------------------------
GMS: address is 10.44.5.89:51973
-------------------------------------------------------
16:00:21,750 INFO [TreeCache] viewAccepted(): [10.44.5.89:51973|0] [10.44.5.89:51973]
16:00:21,755 INFO [TreeCache] TreeCache local address is 10.44.5.89:51973
16:00:22,957 INFO [CorbaNamingService] Naming:
[IOR:000000000000002B49444C3A6F6D672E6F72672F436F734E616D696E672F4E616D696E6743
6F6E746578744578743A312
E3000000000000200000000000000F8000102000000000B31302E34342E352E383900000DC8000
0000000114A426F73732F4E616D696E672F726F6F7400000000000005000000000000000
8000000004A414300000000010000001C000000000001000100000001050100010001010900000
001050100010000002100000070000000000000000100000000000000240000001E00000
07E00000000000000010000000B31302E34342E352E383900000DC900400000000000000008060
6678102010101000000170401000806066781020101010000000764656661756C7400000

Page 30
000000000000000000000000000000000002000000004000000000000001F000000040000000300
0000010000002000000000000000020000002000000004000000000000001F000000040
0000003]
16:00:23,075 INFO [CorbaTransactionService] TransactionFactory:
[IOR:000000000000003049444C3A6F72672F6A626F73732F746D2F69696F702F5472616E7361637
4696F
6E466163746F72794578743A312E30000000000200000000000000F8000102000000000B31302E3
4342E352E383900000DC80000000000144A426F73732F5472616E73616374696F6E732F
46000000050000000000000008000000004A414300000000010000001C00000000000100010000
000105010001000101090000000105010001000000210000007000000000000000010000
0000000000240000001E0000007E00000000000000010000000B31302E34342E352E383900000D
C90040000000000000000806066781020101010000001704010008060667810201010100
00000764656661756C7400000000000000000000000000000000000000002000000004000000000
000001F0000000400000003000000010000002000000000000000020000002000000004
000000000000001F0000000400000003]
16:00:24,198 INFO [Embedded] Catalina naming disabled
16:00:24,967 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal
performance in production environments was not found o
n the java.library.path: C:\jdk1.6.0_13\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\
Windows;C:\jdk1.6.0_13\bin;C:\jdk1.6.0_13\jre\bin;C:\apac
he-ant-1.6.1\bin;C:\cygwin\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\
Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\
PrivateAssemblies\;C:\Windows\System32\WindowsPowerShell\v1.0";C:\Program Files\MySQL\
MySQL Server 5.1\bin
16:00:25,203 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8080
16:00:25,208 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-0.0.0.0-8009
16:00:25,210 INFO [Catalina] Initialization processed in 1012 ms
16:00:25,212 INFO [StandardService] Starting service jboss.web
16:00:25,216 INFO [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.1.GA
16:00:25,265 INFO [Catalina] Server startup in 53 ms
16:00:25,447 INFO [TomcatDeployer] deploy, ctxPath=/,
warUrl=.../deploy/jboss-web.deployer/ROOT.war/
16:00:26,351 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/httpha-
invoker.sar/invoker.war/
16:00:26,765 INFO [TomcatDeployer] deploy, ctxPath=/jbossws,
warUrl=.../deploy/jbossws.sar/jbossws-context.war/
16:00:26,924 INFO [TomcatDeployer] deploy, ctxPath=/juddi,
warUrl=.../deploy/juddi-service.sar/juddi.war/
16:00:27,074 INFO [RegistryServlet] Loading jUDDI configuration.
16:00:27,087 INFO [RegistryServlet] Resources loaded from: /WEB-INF/juddi.properties
16:00:27,090 INFO [RegistryServlet] Initializing jUDDI components.
16:00:29,354 INFO [TomcatDeployer] deploy, ctxPath=/web-console,
warUrl=.../deploy/management/console-mgr.sar/web-console.war/
16:00:29,869 INFO [MailService] Mail Service bound to java:/Mail
16:00:30,103 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in
.../deploy/jboss-ha-local-jdbc.rar
16:00:30,607 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in
.../deploy/jboss-ha-xa-jdbc.rar
16:00:30,705 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in
.../deploy/jboss-local-jdbc.rar
16:00:30,769 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in
.../deploy/jboss-xa-jdbc.rar

Page 31
16:00:30,849 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in
.../deploy/jms-ra.rar
16:00:31,179 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in
.../deploy/jremote-ra.rar
16:00:31,306 ERROR [STDERR] 04-Aug-2009 16:00:31
com.jbase.jremote.io.inflow.RequestListenerService run
INFO: RequestListenerService(NIO) accepting connections on [*]:[55012]
16:00:31,559 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in
.../deploy/mail-ra.rar
16:00:31,709 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in
.../deploy/quartz-ra.rar
16:00:31,720 INFO [QuartzResourceAdapter] start quartz!!!
16:00:31,787 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
16:00:31,814 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
16:00:31,819 INFO [RAMJobStore] RAMJobStore initialized.
16:00:31,821 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized
from default resource file in Quartz package: 'quartz.p
roperties'
16:00:31,823 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
16:00:31,825 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED
started.
16:00:32,178 INFO [ConnectionFactoryBindingService] Bound ConnectionManager
'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'jav
a:JmsXA'
16:00:32,528 INFO [ConnectionFactoryBindingService] Bound ConnectionManager
'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:D
efaultDS'
16:00:33,800 WARN [JDBCPersistenceManager]

JBoss Messaging Warning: DataSource connection transaction isolation should be


READ_COMMITTED, but it is currently REPEATABLE_READ.
Using an isolation level less strict than READ_COMMITTED may lead to
data consistency problems.
Using an isolation level more strict than READ_COMMITTED may lead to
deadlock.

16:00:34,212 WARN [SecurityMetadataStore] WARNING! POTENTIAL SECURITY RISK. It has been


detected that the MessageSucker component which sucks message
s from one node to another has not had its password changed from the installation default. Please
see the JBoss Messaging user guide for instructions
on how to do this.
16:00:34,336 INFO [ServerPeer] JBoss Messaging 1.4.4.GA server [0] started
16:00:34,524 WARN [UDP] failed to join /224.0.0.75:7500 on net3: java.net.SocketException:
Unrecognized Windows Sockets error: 0: no Inet4Address ass
ociated with interface
16:00:34,527 WARN [UDP] failed to join /224.0.0.75:7500 on net4: java.net.SocketException:
Unrecognized Windows Sockets error: 0: no Inet4Address ass
ociated with interface
16:00:34,531 INFO [STDOUT]
-------------------------------------------------------
GMS: address is 10.44.5.89:51977
-------------------------------------------------------

Page 32
16:00:36,551 INFO [GroupMember]
org.jboss.messaging.core.impl.postoffice.GroupMember$ControlMembershipListener@7f8b70fb got
new view [10.44.5.89:5197
7|0] [10.44.5.89:51977], old view is null
16:00:36,556 INFO [GroupMember] I am (10.44.5.89:51977)
16:00:36,559 INFO [GroupMember] New Members : 1 ([10.44.5.89:51977])
16:00:36,562 INFO [GroupMember] All Members : 1 ([10.44.5.89:51977])
16:00:36,603 WARN [TCP] failed to join /224.0.0.75:7500 on net3: java.net.SocketException:
Unrecognized Windows Sockets error: 0: no Inet4Address ass
ociated with interface
16:00:36,608 WARN [TCP] failed to join /224.0.0.75:7500 on net4: java.net.SocketException:
Unrecognized Windows Sockets error: 0: no Inet4Address ass
ociated with interface
16:00:36,613 INFO [STDOUT]
-------------------------------------------------------
GMS: address is 10.44.5.89:7900
-------------------------------------------------------
16:00:41,079 INFO [ConnectionFactory] Connector bisocket://hmlwin08serv:4457 has leasing
enabled, lease period 10000 milliseconds
16:00:41,081 INFO [ConnectionFactory]
org.jboss.jms.server.connectionfactory.ConnectionFactory@78831e35 started
16:00:41,409 INFO [ConnectionFactory] Connector bisocket://hmlwin08serv:4457 has leasing
enabled, lease period 10000 milliseconds
16:00:41,410 INFO [ConnectionFactory]
org.jboss.jms.server.connectionfactory.ConnectionFactory@4ca8cd58 started
16:00:42,237 WARN [SecurityMetadataStore] WARNING! POTENTIAL SECURITY RISK. It has been
detected that the MessageSucker component which sucks message
s from one node to another has not had its password changed from the installation default. Please
see the JBoss Messaging user guide for instructions
on how to do this.
16:00:43,411 INFO [ConnectionFactory] Connector bisocket://hmlwin08serv:4457 has leasing
enabled, lease period 10000 milliseconds
16:00:43,412 INFO [ConnectionFactory]
org.jboss.jms.server.connectionfactory.ConnectionFactory@7bc7956b started
16:00:43,434 INFO [QueueService] Queue[/queue/DLQ] started, fullSize=200000, pageSize=2000,
downCacheSize=2000
16:00:43,442 INFO [QueueService] Queue[/queue/ExpiryQueue] started, fullSize=200000,
pageSize=2000, downCacheSize=2000
16:00:43,446 INFO [TopicService] Topic[/topic/testTopic] started, fullSize=200000,
pageSize=2000, downCacheSize=2000
16:00:43,450 INFO [TopicService] Topic[/topic/securedTopic] started, fullSize=200000,
pageSize=2000, downCacheSize=2000
16:00:43,453 INFO [TopicService] Topic[/topic/testDurableTopic] started, fullSize=200000,
pageSize=2000, downCacheSize=2000
16:00:43,461 INFO [QueueService] Queue[/queue/testQueue] started, fullSize=200000,
pageSize=2000, downCacheSize=2000
16:00:43,468 INFO [QueueService] Queue[/queue/A] started, fullSize=200000, pageSize=2000,
downCacheSize=2000
16:00:43,474 INFO [QueueService] Queue[/queue/B] started, fullSize=200000, pageSize=2000,
downCacheSize=2000
16:00:43,481 INFO [QueueService] Queue[/queue/C] started, fullSize=200000, pageSize=2000,
downCacheSize=2000

Page 33
16:00:43,488 INFO [QueueService] Queue[/queue/D] started, fullSize=200000, pageSize=2000,
downCacheSize=2000
16:00:43,494 INFO [QueueService] Queue[/queue/ex] started, fullSize=200000, pageSize=2000,
downCacheSize=2000
16:00:43,501 INFO [QueueService] Queue[/queue/PrivateDLQ] started, fullSize=200000,
pageSize=2000, downCacheSize=2000
16:00:43,509 INFO [QueueService] Queue[/queue/PrivateExpiryQueue] started, fullSize=200000,
pageSize=2000, downCacheSize=2000
16:00:43,518 INFO [QueueService] Queue[/queue/QueueWithOwnDLQAndExpiryQueue] started,
fullSize=200000, pageSize=2000, downCacheSize=2000
16:00:43,521 INFO [TopicService] Topic[/topic/TopicWithOwnDLQAndExpiryQueue] started,
fullSize=200000, pageSize=2000, downCacheSize=2000
16:00:43,527 INFO [QueueService] Queue[/queue/QueueWithOwnRedeliveryDelay] started,
fullSize=200000, pageSize=2000, downCacheSize=2000
16:00:43,530 INFO [TopicService] Topic[/topic/TopicWithOwnRedeliveryDelay] started,
fullSize=200000, pageSize=2000, downCacheSize=2000
16:00:43,537 INFO [QueueService] Queue[/queue/testDistributedQueue] started, fullSize=200000,
pageSize=2000, downCacheSize=2000
16:00:43,540 INFO [TopicService] Topic[/topic/testDistributedTopic] started, fullSize=200000,
pageSize=2000, downCacheSize=2000
16:00:43,949 INFO [ConnectionFactoryBindingService] Bound ConnectionManager
'jboss.jca:service=ConnectionFactoryBinding,name=jca/t24ConnectionFactory
' to JNDI name 'java:jca/t24ConnectionFactory'
16:00:43,964 INFO [ConnectionFactoryBindingService] Bound ConnectionManager
'jboss.jca:service=ConnectionFactoryBinding,name=jca/t24ConnectionFactory
_DLQ' to JNDI name 'java:jca/t24ConnectionFactory_DLQ'
16:00:44,153 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-
console.war/
16:00:45,073 INFO [QueueService] Queue[/queue/t24OFSQueue] started,
fullSize=200000, pageSize=2000, downCacheSize=2000
16:00:45,151 INFO [QueueService] Queue[/queue/t24OFSDLQ] started, fullSize=200000,
pageSize=2000, downCacheSize=2000
16:00:45,192 INFO [QueueService] Queue[/queue/t24OFSReplyQueue] started,
fullSize=200000, pageSize=2000, downCacheSize=2000
16:00:45,453 INFO [EjbModule] Deploying OFSMessageMDB
16:00:45,975 INFO [EjbModule] Deploying OFSMessageMDB_DLQ
16:00:46,516 INFO [EJBDeployer] Deployed:
file:/C:/jboss-4.2.3.GA/server/LCHServer1/farm/ofsmessage-ejb.jar
……….

Page 34
High-availability scenarios
This section will highlight various high availability scenarios in order to ensure that the described
T24 system is resilient, robust and reliable.

Before starting the different servers, start four different jAgent connections:
 [A1] Top-left: Server 3
 [A2] Top-right: Server 4
 [A3] Bottom-left: Server 3 – Backup connection (DLQ)
 [A4] Bottom-right: Server 4 – Backup connection (DLQ)

When starting the servers, the application server will automatically establish one or more
connection and add them to the connection pool:

Page 35
Load balancing

Load balancing at Web Application Level is provided by IBM HTTP Server.

The jAgent instances marked in red should display some activity when logging into T24:

Page 36
The same principle applies when users logging into T24 via the other T24 Browser instance:

Page 37
Failover 1 – Server 3 down

Just stop Server 3. IBM HTTP Server will automatically detect the failure and replicate the session
immediately and redirect the next request to other server. In the meanwhile, distributed queue T24
OFS Queue will redirect all traffic to JMS consumers running on other servers in the cluster (i.e.
Server 4).

Page 38
Failover 2 – Server 3 down & jAgent connection [A2] failure

As described in the previous section, all traffic will be redirected to Server 4. Due to connection
failure [A2], the OFS Message MDB S4 will be unable to deliver the message to T24. The JMS
subsystem will detect this failure and redirect the OFS request to the DLQ.

Page 39
Failover 3 – jAgent connection [A1] failure

When OFS Message MDB S3 is unable to deliver the OFS request, the JMS subsystem will
automatically send it to the DLQ. OFS Message MDB DLQ S3 instead will consume this message and
send it to T24.

Page 40
Failover 4 – jAgent connection [A1 & A2] failures

Both main connections are down and traffic is redirected to respective DLQs:

Page 41
Failover 5 – jAgent connection [A1 & A3] failures

This is the worst case scenario and is unlikely to happen. In this case Browser would display an
error message to notify the user.

Page 42
Failover 6 – Reply failure after a successful T24 transaction

Fail-over in this scenario is handled by T24 itself. When the OFS reply message does not reach its
destination (i.e. T24 Browser), the user will be presented with an error message:

Page 43
At this stage, the user will not know whether the transaction has been successful. It is safe to
execute the same transaction again since T24 will not allow duplicate entries.

Page 44
Page 45
Resources
Java JDK http://java.sun.com

J2EE Connector Architecture (JCA) Specification http://java.sun.com/j2ee/connector/

WebSphere http://publib.boulder.ibm.com/infocenter/ieduasst/v1r1m0/index.jsp?topic=/com.ibm.iea.was_v7/
was/WASv70_Task.html

Page 46

You might also like