Anda di halaman 1dari 23

T24 Browser & TOCF(EE)

Quick Guide

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
12/02/2009 Lucas Gut Initial revision
02/07/2009 Lucas Gut Update according to repackaged
TOCF(EE) components (as tocfee.ear)
16/09/2009 Aaron Phethean Add sensible default configurations
26/00/09 Santhosh C S Updated IBM WebSphere MQ
configuration

Page 2
Contents
Introduction.................................................................................................................................................4
Deploying T24 Browser & TOCF(EE)........................................................................................................6
Connection Pool Configuration...........................................................................................................6
JBoss........................................................................................................................................................7
IBM Websphere.......................................................................................................................................9
IBM Websphere MQ..............................................................................................................................11
Oracle Weblogic....................................................................................................................................14
Configuring T24 Browser in AGENT mode [DEBUG only]....................................................................16
Deploying T24 Browser without TOCF(EE) [DEBUG only]...........................................................16
Appendix A1: Deployment Descriptors and JNDI naming....................................................................19
Example – Creating multiple instances of an MDB..............................................................................20
Appendix A2: Editing deployment descriptors.........................................................................................22
Resources...................................................................................................................................................23

Page 3
Introduction
This document is intended to provide a basic guide to deploying T24 Browser with TOCF(EE) on several of the
most popular JEE application servers. TOCF(EE), Temenos Open Connectivity Framework Enterprise Edition, is
a family of components that provides industry standard, JEE compliant connectivity to T24.

You will need the following artifacts:

 BrowserWeb.war - The T24 Browser web application, the latest version should be requested from
distribution.

 tocfee.ear - The TOCF(EE) ear archive, the latest version should be requested from distribution. A T24
Browser deployment only requires the OFS Message MDB, the component used to relay messages
between T24 Browser and the TAFC JCA(currently called the JRemote JCA).

 jremote-ra.rar - Can be found in the $JBCRELEASEDIR/java/lib directory of your TAFC installation.


The TAFC Resource Adapter is a JCA 1.5 component resource adapter which enables other JEE
components such as the OFS Message MDB to access T24 (via the jbase_agent). Please refer the
TAFC jAgent user-guide for more information on jAgent.

Page 4
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:

 Java Standard Edition


 Java Enterprise Edition
o JCA Resource Adapters
o MDB
o EJB
o EAR
o WAR
 J2EE application servers
 JMS
 TAFC (Temenos Application Framework, “aka. jBASE”)

Page 5
Deploying T24 Browser & TOCF(EE)
This section explains how to deploy the JEE components on different types of JEE application servers.

T24 Browser should be configured to send OFS requests as JMS messages to the OFS Message MDB. Check
the BrowserWeb.war configuration file, browserParameters.xml, has been configured for the “JMS” connectivity.

<parameter>
<parameterName>Server Connection Method</parameterName>
<parameterValue>JMS</parameterValue>
<!-- Options: INSTANCE / AGENT / JMS -->
</parameter>

T24Browser can also send OFS requests directly to T24. The latter option (known as AGENT mode) should only
be used for debugging purposes. Setup advice for this configuration can be found in the section entitled
Configuring T24 Browser in AGENT mode.

Connection Pool Configuration

Some connection specific decisions and settings are required. This section is intended to help you decide how to
configure your T24 connection pool.

Size of connection pool


Each application server will have its own mechanism for configuring the size of the connection pool. Irrespective
of the application server you choose you should decide how many connections will be required to service your
T24 Browser requirements. Generally a good starting point is to use the following calculation – provided the T24
machine is dedicated to servicing just this T24 Browser instance.

Connection pool size = 2.5 * number of COREs

For example, my laptop has one CPU and this CPU has two cores.
Cx = 2.5 * 2 ; therefore my machine would perform optimally with a max connections of 5

T24 settings
The TAFC resource adapter needs to be configured to use T24. The following configuration parameters are
available and it is important that you understand what effect each parameter has on the T24 instance you are
connecting to. Some may be more obvious than others:
host  Server address hosting jAgent
port  TCP port on which jAgent is listening
actionTimeout  The T24 request will be processed by a subroutine call from OFSMessageMDB. This
parameter configures the length of time the jbase_agent will wait for a request to return a result before forcibly
stopping the subroutine call and exiting. A message retry will be performed when the JMS message is passed to
OFSMessageMDB again and a new jbase_agent connection is created. This setting is very important to avoid
T24 deadlocks as all T24 locks will be released when the action is stopped, thus allowing processing in other
connections to continue. A good starting value would be 30 seconds.

Page 6
envVariables  This property enables clients to apply environment variables to a jAgent connection.
Multiple environment variables are separated by semi-colons, e.g. MYENV1=Value1;MYENV2=value2.
allowInput  [true/false] If a jBC subroutine e.g. drops into the jBC debugger, it will ask a user for
input. This property specifies whether the application server will ask the user for input or continue executing. This
should only be enabled on a development instance of an application server.
compression  [true/false] Specifies whether data packets, whose size are greater than the value of
the compressionThreshold property, should be compressed for enhanced performance.
compressionThreshold  The number of bytes used as a threshold to decide whether to
compress data packets.
charset  This property specifies the character set of the remote EIS on which jAgent is running.
jRemote will use this value when encoding and decoding character data between server and client. This setting
should only be used when connecting to non I18N T24 configurations.
SSL  [true/false] Configures the resource adapter to use SSL encrypted connections. This
option should only be enabled when the remote jAgent instance is also configured to use SSL encryption.
NaiveTrustManager  [true/false] Configures the resource adapter to trust all server certificates
account  Specifies the jBASE account to be supplied when jAgent is configured to perform
account authentication.
user  Specifies the jAgent username to be supplied when jAgent is configured to perform
user authentication.
password  Specifies the password for the jBASE account / jAgent user.

JBoss
Copy the following files to the JBoss deployment directory (<jboss home>/server/deploy):
1. TAFC JCA Resource Adapter
- Resource Adapter archive: jremote-ra.rar
- JBoss deployment descriptor: t24-ds.xml

2. JMS destinations
- JBoss deployment descriptor: t24-destinations-service.xml

3. TOCF(EE) components
- TOCF(EE) enterprise archive: tocfee.ear

4. T24 Browser
- T24 Browser web archive: BrowserWeb.war

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>

Page 7
<tx-connection-factory>
<jndi-name>jca/t24ConnectionFactory</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">127.0.0.1</config-property>


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

<!--
It is critical that a good value is chosen for the actionTimeout property. Too short
and certain long running requests will never complete, too long and performance could suffer
as resources will be tied up for long periods when deadlocked.
-->
<config-property name="actionTimeout" type="java.lang.Integer">30</config-property>

<!--
Configure environment variables, generally you should only set the connection specific
parameters such as OFS_SOURCE
-->
<config-property name="envVariables" type="java.lang.String">OFS_SOURCE=GCS</config-property>

<!-- If the agent is accepting SSL connections you need to enable SSL -->
<!--

<config-proper ty name="SSL" type="java.lang.Boolean">false</config- property>


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

<!-- Apply a charset for non utf-8 converted databases -->


<!--
<config-property name="charset" type="java.lang.String">ISO-8859-1</config-property>
-->

<!--
Although more CPU is consumed to compress the data before sending it is sometimes faster
than waiting for the network, only a benchmark and testing would reveal good settings for this
property
-->
<config-property name="compression" type="java.lang.Boolean">true</config-property>
<config-property name="compressionThreshold" type="java.lang.Integer">2048</config-property>

<!-- A live server must not be configured to allow input -->


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

<!-- JBOSS pooling configuration suitable for my laptop -->


<min-pool-size>0</min-pool-size>
<max-pool-size>5</max-pool-size>
<prefill>false</prefill>
</tx-connection-factory>

</connection-factories>

t24-destinations-service.xml
<?xml version="1.0" encoding="UTF-8"?>

<!-- $Id: jbossmq-destinations-service.xml 25907 2004-11-16 04:32:39Z ejort $ -->

<!--
| This file defines the default Queues and Topics that JBossMQ
| ships with. The default Queues and Topics are used by the
| JBoss test suite and by the sample jms programs.
|
| You can add other destinations to this file, or you can create other
| *-service.xml files to contain your application's destinations.
-->

Page 8
<server>
<!-- Destination without a configured SecurityManager or without a
a SecurityConf will default to role guest with read=true, write=true,
create=false.
-->
<mbean code="org.jboss.mq.server.jmx.Queue"
name="jboss.mq.destination:service=Queue,name=t24OFSQueue">
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
</mbean>
<mbean code="org.jboss.mq.server.jmx.Queue"
name="jboss.mq.destination:service=Queue,name=t24OFSReplyQueue">
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
</mbean>

</server>

IBM Websphere
Version: 7.0.0.0

Configure the following components in Websphere's Administrative Console and then try to start T24
Browser (http://localhost:9080/BrowserWeb/servlet/BrowserServlet)

Install TAFC RA:

Resource Adapters
 Install jremote-ra.rar using default values

Resource adapters > jRemote > J2C activation specification


 Set activation specification which is used by the RA to configure a specific endpoint instance
- NAME: T24 Resource Adapter
- JNDI NAME: jca/t24ResourceAdapter

Resource adapters > jRemote > J2C connection factories


 Define new JCA connection factory
- NAME: T24 JCA Connection Factory
- JNDI NAME: jca/t24ConnectionFactory

Resource adapters > jRemote > J2C connection factories > T24 JCA Connection Factory > Custom properties
 Configure JCA connection properties. Set the connection pool min / max size.

Configure JMS Messaging:

Service Integration Bus > Buses


 Create new Service Integration Bus: BrowserBus

Service Integration Bus > Buses > BrowserBus


 Switch to tab 'Local Topology' and add a new Bus member

JMS > Connection factories


 Create a new JMS connection factory using e.g. the 'Default Messaging Provider'

Page 9
- NAME: T24 JMS Connection Factory
- JNDI NAME: jms/t24CxFactory
- Bus: BrowserBus

JMS > Queue connection factories


 Create a new JMS Queue connection factory using e.g. the 'Default Messaging Provider'
- NAME: T24 Queue Connection Factory
- JNDI NAME: jms/t24QueueCxFactory
- Bus: BrowserBus

JMS > Queues


 Create a new JMS Queue connection factory using e.g. the 'Default Messaging Provider'
- NAME: T24 OFS Queue
- JNDI NAME: jms/t24OFSQueue
- Bus: BrowserBus
- Queue name: Create Service Bus Integration destination  t24OFSQueue

 Create a new JMS Queue connection factory using e.g. the 'Default Messaging Provider'
- NAME: T24 OFS Reply Queue
- JNDI NAME: jms/t24OFSReplyQueue
- Bus: BrowserBus
- Queue name: Create Service Bus Integration destination  t24OFSReplyQueue

JMS > Activation Specification


 Create a new Activation specification using e.g. the 'Default Messaging Provider'
- NAME: T24 OFS Message MDB
- JNDI NAME: jms/t24OfsMessageMDB
- Destination JNDI NAME: jms/t24OFSQueue
- Bus: BrowserBus

Install TOCF(EE):

Enterprise Applications
 Install tocfee.ear using default values. The following warnings can be ignored at this stage:
ADMA0114W: Resource assignment with JNDI name eis/com.temenos.tocf.common.jca.OFSMessageListener is not found …
ADMA0114W: Resource assignment with JNDI name jca/t24PluginsResourceAdapter is not found …
ADMA0115W: Resource assignment of name queue/requestQueue and type javax.jms.Queue, with JNDI name jms/requestQueue
is not found...
ADMA0115W: Resource assignment of name queue/responseQueue and type javax.jms.Queue, with JNDI name
jms/responseQueue is not found…

Enterprise Applications > TOCF(EE)_EAR > Manage Modules > TOCFPLUGIN > Resource Adapter > J2C Activation specifications
> com.temenos.tocf.common.jca.OFSMessageListener
 Set activation specification for the TOCF(EE) Plugin component
- NAME: T24 Plugin Resource Adapter
- JNDI NAME: jca/t24PluginsResourceAdapter
Enterprise Applications
 Start TOCF(EE)_EAR

Page 10
Install T24 Browser:

Enterprise Applications
 Install and start BrowserWeb.war using default values

Note: Context root might need to be changed if already used (to e.g.: /BrowserWeb)

IBM Websphere MQ
Download Websphere MQ from IBM Website and install the product following the instructions available
on the IBM Website.

This section of the document explains the minimum required steps to configure MQ alongside the JCA
architecture.

After installing the MQ server, user need to login to the system (UNIX/Windows) as the MQ user defined during
installation and create Queue Manager and Queues.

Create Queue Manager

To create queue manager issue the following command.

crtmqm –q Queue.Manager.Name

Start Queue Manager

Before creating Queues user needs to start the Queue Manger defined in the previous step. To start the Queue
Manager issue the following command

strmqm Queue.Manager.Name

Queues

We need to define two queues for the simple JCA architecture.

In.Queue – Where messages will be posted to be processed


Reply.Queue – Where reply messages will come

To create the queues user needs to be in an MQSC session to kick start the MQSC session run the following
command

runmqsc

NB: A message tells you that MQSC session has started. MQSC has no specific prompt

Once the user is in MQSC prompt to create queues issue the following commands

Page 11
define qlocal (‘In.Queue’)
define qlocal (‘Reply.Queue’)

After defining the queues, to exit from the MQSC session type

end

NB: If the requirement is to create the queue names using mixed case characters then Make sure to give
the queue names within single quotes. If the queue names are not provided within quotes by default MQ
will create the queue names in Upper Case characters.

MQ Listener

Before moving on configuring other components related to JCA architecture, the MQ Listener needs to be started
using the following command by specifying the Queue Manager Name created before and the port where you
want the MQ Listener to be listening

runmqlsr -m Queue.Manager.Name -t TCP -p PortNumber

Browser Configuration

Configure the following components in Websphere's Administrative Console and then try to start T24
Browser

Create WebSphere MQ Server

Servers  Server Types  WebSphere MQ servers  New

Name: T24 MQ Server


WebSphere MQ Server name: Queue.Manager.Name
WebSphere MQ Host: Ip Address of the host machine
WebSphere MQ Port: Port Number for MQ Listener
WebSphere MQ Channel: SYSTEM.DEF.SVRCONN

Click TestConnection button to test the connection. User should see ‘test connection succeeded’ message

Install jRemote RA:

Resource Adapters
 Install jremote-ra.rar using default values

Resource adapters > jRemote > J2C connection factories


 Define new JCA connection factory
- NAME: T24 JCA Connection Factory
- JNDI NAME: jca/t24ConnectionFactory

Resource adapters > jRemote > J2C connection factories > T24 JCA Connection Factory > Custom properties
 Configure JCA connection properties

Configure JMS Messaging:

Page 12
Service Integration Bus > Buses
 Create new Service Integration Bus: BrowserBus

Service Integration Bus > Buses > BrowserBus


 Switch to tab 'Local Topology' and add a new Bus member
 Choose Websphere MQ Server option
 Install using default Values

JMS > Connection factories


 Create a new JMS connection factory using e.g. the 'Websphere MQ messaging Provider'
- NAME: T24 JMS Connection Factory
- JNDI NAME: jms/t24CxFactory
- Bus: BrowserBus

JMS > Queue connection factories


 Create a new JMS Queue connection factory using e.g. the 'Websphere MQ messaging
Provider'
- NAME: T24 Queue Connection Factory
- JNDI NAME: jms/t24QueueCxFactory
- Bus: BrowserBus

JMS > Queues


 Create a new JMS Queue connection factory using e.g. the 'Websphere MQ messaging
Provider'
- NAME: T24 OFS Queue
- JNDI NAME: jms/t24OFSQueue
- Bus: BrowserBus
- Queue name: In.Queue
- Queue Manager: Queue.Manager.Name

JMS>Queues>T24 OFS Queue>Websphere MQ Connection Properties

-Queue Manager Host: IP Address of the host machine


-Queue Manager Port: MQ Listener Port number

 Create a new JMS Queue connection factory using e.g. the ‘Websphere MQ messaging
Provider’
- NAME: T24 OFS Reply Queue
- JNDI NAME: jms/t24OFSReplyQueue
- Bus: BrowserBus
- Queue name: Reply.Queue
- Queue Manager: Queue.Manager.Name

JMS>Queues>T24 OFS Reply Queue>Websphere MQ Connection Properties

-Queue Manager Host: IP Address of the host machine


-Queue Manager Port: MQ Listener Port number

JMS > Activation Specification


 Create a new Activation specification using e.g. the 'WebSphere MQ messaging Provider'
- NAME: T24 OFS Message MDB
- JNDI NAME: jms/t24OfsMessageMDB

Page 13
- Destination JNDI NAME: jms/t24OFSQueue
- Queue Manager or
Queue sharing group name: Queue.Manager.Name
- Host Name: IP Address of the host machine
- Port: MQ Listener Port Number
- Server Connection Channel: SYSTEM.DEF.SVRCONN
- Click Test Connection Button: Should see the message ‘A connection was successfully
made to WebSphere MQ.’

Install TOCF(EE)

Enterprise Applications
 Install and start tocfee.ear using default values

Install T24 Browser:

Enterprise Applications
 Install and start BrowserWeb.war using default values

Note: Context root might need to be changed if already used (to e.g.: /BrowserWeb)

Oracle Weblogic
Version: 10.3.0

Configure the following components in Weblogic's Administrative Console and then try to start T24
Browser (http://localhost:7001/BrowserWeb)

Note: Due to a known issue in T24 Browser, the URL should not contain /servlet/BrowserServlet.

Install TAFC RA:

Deployments
 Install jremote-ra.rar using default values
 Copy jremote.jar (included inside jremote-ra.rar) to <app. Server
home>/user_projects/domains/base_domain/lib

Deployments > jremote-ra > Configuration > General


 Specify JNDI Name for TAFC Resource Adapter
- JNDI NAME: jca/t24ResourceAdapter

Deployments > jremote-ra > Configuration > Outbound Connection Pools


 Define new outbound connection pool using the jRemote JCA connection factory
- JNDI NAME: jca/t24ConnectionFactory

Deployments > jremote-ra > Configuration > Outbound Connection Pools > JConnectionFactory > Properties
 Configure JCA Connection properties. Set the connection pool min / max size.

Page 14
Configure JMS Messaging:

Services > Messaging > JMS Servers


 Create a new JMS Server: JMSServerT24
- Target: <Server instance>

Services > Messaging > JMS Modules


 Create a new JMS Module: JMSModuleT24
- Target: <Server instance>

Services > Messaging > JMS Modules > JMSModuleT24


 Create a new subdeployment
- NAME: T24 JMS Queues
- Target: JMSServerT24

 Create a new JMS (Queue) Connection factory


- NAME: T24 JMS Queue Connection Factory
- JNDI NAME: jms/t24QueueCxFactory
- Default Targeting enabled: false
- Subdeployment: T24 JMS Queues

 Create a new JMS queue


- NAME: T24 OFS Queue
- JNDI NAME: jms/t24OFSQueue
- Subdeployment: T24 JMS Queues

 Create a new JMS queue


- NAME: T24 OFS Reply Queue
- JNDI NAME: jms/t24OFSReplyQueue
- Subdeployment: T24 JMS Queues

Install TOCF(EE):

Deployments
 Install and start tocfee.ear using default values

Install T24 Browser:

Deployments

 Install and start BrowserWeb.war using default values

Page 15
Configuring T24 Browser in AGENT mode [DEBUG only]
As mentioned previously, T24 Browser provides an additional connection mode (AGENT mode) to connect
directly to T24 without using the JMS subsystem. This mode does not provide the same resiliency as the default
mode (JMS mode) as should therefore only be used for debugging purposes.

In order to change the connection mode to AGENT, modify the browserParameters.xml file contained in
BrowserWeb.war and change the following parameter from JMS to AGENT:

<parameter>
<parameterName>Server Connection Method</parameterName>
<parameterValue>AGENT</parameterValue>
<!-- Options: INSTANCE / AGENT / JMS -->
</parameter>

Note that INSTANCE configures Browser to use TC Server. TOCF(EE) replaces TC Server and hence should not
be used from R09 onwards.

If T24 Browser has been deployed together with TOCF(EE) and JMS messaging as explained in the previous
section, no further changes are required and the remainder of this section may be skipped.

Please refer to appendix A to find out more about modifying deployment descriptors and other configuration files
located inside a java archive.

Deploying T24 Browser without TOCF(EE) [DEBUG only]

Deploying T24 Browser in AGENT mode without the TOCF(EE) components and without configuring the JMS
queues requires changing the deployment descriptor prior to deployment.

Remove the sections highlighted in red from the respective deployment descriptors which are located under the
WEB-INF directory inside BrowserWeb.war. Edit browserParameters.xml to change the connection mode to
AGENT and redeploy BrowserWeb.war to reflect your changes.

web.xml

<resource-ref id="ResourceRef_t24ConnectionFactory">
<description>T24</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_jmsConnectionFactory">
<description>Used to get connections to JMS for OFS queues</description>
<res-ref-name>jms/jmsConnectionFactory</res-ref-name>
<res-type>javax.jms.ConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref id="ResourceRef_t24OFSQueue">
<description>OFS queue</description>

Page 16
<res-ref-name>queue/t24OFSQueue</res-ref-name>
<res-type>javax.jms.Queue</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>
<res-auth>Container</res-auth>
</resource-ref>

jboss-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<resource-ref>
<res-ref-name>jca/t24ConnectionFactory</res-ref-name>
<res-type>com.jbase.jremote.JConnectionFactory</res-type>
<jndi-name>java:jca/t24ConnectionFactory</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>jms/jmsConnectionFactory</res-ref-name>
<res-type>javax.jms.ConnectionFactory</res-type>
<jndi-name>java:/ConnectionFactory</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>queue/t24OFSQueue</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<jndi-name>queue/t24OFSQueue</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>
</jboss-web>

weblogic.xml
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app">
<resource-description>
<res-ref-name>jca/t24ConnectionFactory</res-ref-name>
<jndi-name>jca/t24ConnectionFactory</jndi-name>
</resource-description>
<resource-description>
<res-ref-name>jms/jmsConnectionFactory</res-ref-name>
<jndi-name>jms/t24QueueCxFactory</jndi-name>
</resource-description>
<resource-description>
<res-ref-name>queue/t24OFSQueue</res-ref-name>
<jndi-name>jms/t24OFSQueue</jndi-name>
</resource-description>

Page 17
<resource-description>
<res-ref-name>queue/t24OFSReplyQueue</res-ref-name>
<jndi-name>jms/t24OFSReplyQueue</jndi-name>
</resource-description>
<container-descriptor>
<show-archived-real-path-enabled>true</show-archived-real-path-enabled>
</container-descriptor>
</weblogic-web-app>

Ibm-web-bnd.xmi
<?xml version="1.0" encoding="UTF-8"?>
<com.ibm.ejs.models.base.bindings.webappbnd:WebAppBinding xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:com.ibm.ejs.models.base.bindings.webappbnd="webappbnd.xmi"
xmi:id="WebAppBinding_1" virtualHostName="default_host">
<webapp href="WEB-INF/web.xml#WebApp"/>
<resRefBindings xmi:id="ResourceRefBinding_t24ConnectionFactory" jndiName="jca/t24ConnectionFactory">
<bindingResourceRef href="WEB-INF/web.xml#ResourceRef_t24ConnectionFactory"/>
</resRefBindings>
<resRefBindings xmi:id="ResourceRefBinding_jmsConnectionFactory" jndiName="jms/t24CxFactory">
<bindingResourceRef href="WEB-INF/web.xml#ResourceRef_jmsConnectionFactory"/>
</resRefBindings>
<resRefBindings xmi:id="ResourceRefBinding_t24OFSQueue" jndiName="jms/t24OFSQueue">
<bindingResourceRef href="WEB-INF/web.xml#ResourceRef_t24OFSQueue"/>
</resRefBindings>
<resRefBindings xmi:id="ResourceRefBinding_t24OFSReplyQueue" jndiName="jms/t24OFSReplyQueue">
<bindingResourceRef href="WEB-INF/web.xml#ResourceRef_t24OFSReplyQueue"/>
</resRefBindings>
</com.ibm.ejs.models.base.bindings.webappbnd:WebAppBinding>

Page 18
Appendix A1: Deployment Descriptors and JNDI naming
This section explains the deployment descriptors contained in different JEE components and how the application
servers use them to assign JNDI (Java Naming and Directory Interface) names to those components. One of the
main features of an application server are the JEE containers on which JEE components are deployed. These
components are loosely-coupled as dependencies among those components are declared in configuration files,
i.e. the deployment descriptors. JNDI naming enables applications to lookup data and objects via a name (JNDI
name). Applications therefore do not need to have a hard-coded reference to a dependent object and instead
request the application server to provide them with a reference to the dependent object. The wiring between those
objects is declared in the deployment descriptors.

JEE components generally have two types of descriptors:


1. The standard deployment descriptors which are the same for all JEE compliant application servers
(application.xml, ejb-jar.xml, ra.xml, etc.)
2. The application server specific deployment descriptors (jboss.xml, weblogic-ejb-jar.xml, etc.)

The standard deployment descriptor generally declares the resource dependencies of a particular JEE
component and the application server specific deployment descriptors tend to specify the wiring, i.e. the JNDI
name of a resource dependency.

Deployment descriptors (DD) are located inside the META-INF and are different for different types of JEE
components:

 EAR:
 Enterprise Archives are used to simplify the deployment process by packaging other
components (EJBs, RARs, WARs, JARs, etc.) into a single archive.
- application.xml  Standard DD listing the different JEE components contained in the EAR etc.
- jboss-app.xml  JBoss specific DD
- ibm-application-bnd.xmi  Websphere specific DD

 EJB:
 Enterprise Java Beans are managed server-side components which encapsulate the
business logic of application.
- ejb-jar.xml  Standard DD containing references to other resources (JEE components) etc.
- jboss.xml  JBoss specific DD mapping resource references to JNDI names, etc.
- weblogic-ejb-jar.xml  Weblogic specific DD mapping resource references to JNDI names...
- ibm-ejb-jar-bnd.xmi  Websphere specific DD mapping resource references to JNDI names, etc.

 RAR:
 Resource Adapters are components which follow the J2EE Connector Architecture (JCA)
and enable JEE applications to access Enterprise Information Systems (EIS).

- ra.xml  Standard DD specifying inbound and outbound connection settings etc.


- XX-ds.xml  JBoss specific DD assigning values to outbound connection properties etc.
Note that this DD should be copied together with the RA archive into the
deploy directory.
- weblogic-ra.xml  Weblogic specific DD assigning a JNDI to a resource adapter, etc.

Page 19
 WAR:
 Web Applications contain web client artifacts like JSP, servlets, etc to dynamically generate
web pages.

- web.xml  Standard DD specifying references to other resources, servlets, etc.


- jboss-web.xml  JBoss specific DD mapping resource references to JNDI names, etc.
- weblogic.xml  Weblogic specific DD mapping resource references to JNDI names, etc.
- ibm-web-bnd.xmi  Websphere specific DD mapping resource references to JNDI names, etc.

Resource references declared in the standard deployment descriptors should not be modified as those references
are used by the application itself. Application server specific deployment descriptors can be modified in order to
map different JNDI names to an object or a resource references. This feature also enables users to create
multiple instances of a component as shown in the following example:

Example – Creating multiple instances of an MDB


The following deployment descriptors inform the JBoss application server to create two instances of the same
MDB class com.MyHelloWorld. The instances perform the same process but one of them will be executed by
messages arriving on queue queue/myQueue_A and the other instance will be executed by messages arriving on
queue queue/myQueue_B.

ejb-jar.xml
<ejb-jar>
<enterprise-beans>
<message-driven>
<ejb-name>MessageDriven_A</ejb-name>
<ejb-class>com.MyHelloWorld</ejb-class>
...
</message-driven>
</enterprise-beans>

<enterprise-beans>
<message-driven">
<ejb-name>MessageDriven_B</ejb-name>
<ejb-class>com.MyHelloWorld</ejb-class>
...
</message-driven>
</enterprise-beans>
</ejb-jar>

jboss.xml
<jboss>
<enterprise-beans>
<message-driven>
<ejb-name>MessageDriven_A</ejb-name>
<destination-jndi-name>queue/myQueue_A</destination-jndi-name>
...
</message-driven>
</enterprise-beans>

<enterprise-beans>

Page 20
<message-driven>
<ejb-name>MessageDriven_B</ejb-name>
<destination-jndi-name>queue/myQueue_B</destination-jndi-name>
...
</message-driven>
</enterprise-beans>
</jboss>

Page 21
Appendix A2: Editing deployment descriptors
JEE components use jar, rar, ear, or war file extensions depending on the type of component, but they all use the
same compression mechanism. Some of these files contain deployment descriptors which enable users to
configure a component before deploying it on the application server. The following methods may be used edit the
descriptors:

1. Using the TOCFEE Deployment Helper. This is a windows utility which helps to automate the jar
commands used for changing the deployment descriptors.

a. Download the TOCFEE_DeploymentHelper.zip from KB -> TOCF(EE) -> Downloads


b. Extract TOCFEE_DeploymentHelper.zip to a temporary directory
c. Copy tocfee.ear to this temporary directory
d. Run unpack.bat to unpack the tocfee.ear and all the jars
e. Edit your files.

TIP - If you are changing the files often you might find it useful to create a template directory with the
same structure as the files you edited.
e.g. Copy the tocfplugin-ra.rar.tmp/tcserver.xml to my.template.dir/tocfplugin-ra.rar.tmp/tcserver.xml
This way you can delete the work directory and simply overwrite it with your modified files when a
new tocfee.ear is released

f. Run pack.bat to create a new tocfee.ear. This can be found in deploy directory.

2. Using the “jar” utility:


The jar utility is part of the Java SDK.

To extract a JAR file:


1. Create an empty directory and copy your file (myfile.ear) into this directory
2. Extract the JAR file: jar xvf myfile.ear
3. Delete myfile.jar

To create a JAR file:


1. Create the JAR file: jar cvmf META-INF\Manifest.mf ..\myfile.ear *

3. Using Winzip:
The jar utility and Winzip use the same compression mechanism.
Winzip also allows users to edit files without having to extract and repackage the file.

4. Using Winrar:
Winrar may be used to extract and modify files but should not be used to create a JAR file as it
does not use the same compression mechanism as the jar utility.

Note:
Please ensure that the directory structure remains the same after repackaging a JAR file since this may
cause unexpected problems when deploying the JEE component.

Page 22
Resources
Java JDK http://java.sun.com

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

JBoss http://www.jboss.org/

Oracle Weblogic http://edocs.bea.com/wls/docs103/index.html

Page 23

Anda mungkin juga menyukai