home / infca / mq / mq_jca (navigation links) Gran parte de las dificultades que atraviesa el mundo se deben a que
los ignorantes están completamente seguros y los inteligentes, llenos de dudas.

Install | Config | IVT Links | End

JCA


Amunt! Top Amunt!
Que es ?

The J2EE Connector Architecture (JCA) provides a standard way of connecting applications running in a J2EE environment to an Enterprise Information System (EIS) such as WebSphere MQ or DB2.

The WebSphere MQ resource adapter supports two types of communication between an application and a queue manager:

Using the resource adapter, an application can connect to a WebSphere MQ Version 6.0 queue manager in either client mode or bindings mode, or to a WebSphere MQ Version 5.3 queue manager in client mode only.


Amunt! Top Amunt!
Instalació

The WebSphere MQ resource adapter is supplied as a resource archive (RAR) file called wmq.jmsra.rar.

The RAR file contains the following Java archive (JAR) files:

You must install the WebSphere MQ resource adapter RAR file in your application server, but the way you do this depends on the application server.

For non-transacted client connections, no other files are required. For bindings connections, WebSphere MQ Java must be installed. On Windows, the WebSphere MQ Java libraries are added to the system path automatically during installation of WebSphere MQ Java.


Amunt! Top Amunt!
Configuration of the WebSphere MQ resource adapter

To configure the WebSphere MQ resource adapter, define JCA resources in the following categories:

The WebSphere MQ resource adapter RAR file contains a file called META-INF/ra.xml, which contains a deployment descriptor for the resource adapter. It contains information about the resource adapter and the services that it provides.

An application server might also require a deployment plan for the resource adapter.


Amunt! Top Amunt!
Configuration of the ResourceAdapter object

The ResourceAdapter object encapsulates the global properties of the WebSphere MQ resource adapter.

The object has two sets of properties:

The way you define these properties depends on the administration interfaces provided by your application server.

Properties of the ResourceAdapter object that are associated with diagnostic tracing :

The levels of detail for diagnostic tracing :


Amunt! Top Amunt!
Configuration for inbound communication

To configure inbound communication, define the properties of one or more ActivationSpec objects. The properties of an ActivationSpec object determine how an MDB receives JMS messages from a WebSphere MQ queue. The transactional behavior of the MDB is defined in its deployment descriptor.

An ActivationSpec object has two sets of properties:

The way in which you define the properties of an ActivationSpec object depends on the administration interfaces provided by your application server.


Amunt! Top Amunt!
Configuration for outbound communication

When using outbound communication, an application running in an application server starts a connection to a queue manager, and then sends messages to its queues and receives messages from its queues in a synchronous manner.

To configure outbound communication, define JCA resources in the following categories:

The way you define these properties depends on the administration interfaces provided by your application server. ConnectionFactory, Queue, and Topic objects created by the application server are bound into a JNDI namespace from where they can be retrieved by an application.


Amunt! Top Amunt!
IVT

The installation verification test (IVT) program is supplied as an enterprise archive (EAR) file called wmq.jmsra.ivt.ear. This file is installed with WebSphere MQ Java in the same directory as the WebSphere MQ resource adapter RAR file, wmq.jmsra.rar.

You must deploy the IVT program on your application server. The IVT program runs as a servlet and tests that a message can be sent to, and received from, a WebSphere MQ JMS Queue or Topic object. Optionally, you can use the IVT program to verify that the WebSphere MQ resource adapter has been correctly configured to support distributed transactions.

Before you can run the IVT program, you must define the properties of a ConnectionFactory object and a Queue or Topic object as JCA resources, and ensure that your application server creates JMS objects from these definitions and binds them into a JNDI namespace. You can choose the properties of the objects, but the following set of properties is a simple example:

ConnectionFactory object

channel: SYSTEM.DEF.SVRCONN hostName: 192.168.0.42 port: 1414 queueManager: ExampleQM transportType: CLIENT

Queue object

baseQueueManagerName: ExampleQM baseQueueName: SYSTEM.DEFAULT.LOCAL.QUEUE = name of the underlying MQ queue

By default, the IVT program expects a ConnectionFactory object to be bound in the JNDI namespace with the name IVTCF and a Queue object to be bound with the name IVTQueue.

After you have deployed the IVT program, and the application server has created the JMS objects and bound them into the JNDI namespace, you can start the IVT program by entering a URL in the following format into your Web browser: http://app_server_host:port/WMQ_IVT/ where app_server_host is the IP address or host name of the system on which your application server is running, and port is the number of the TCP port on which the application server is listening. Here is an example: http://localhost:9080/WMQ_IVT/

Les dades de la conexió "outbound" son al fitxer wmq.jmsra-ds.xml : ( resource definitions for outbound JCA flows )

<?xml version="1.0" encoding="UTF-8"?> <connection-factories> <!-- connection factory definition --> <tx-connection-factory> <jndi-name>IVTCF</jndi-name> <xa-transaction /> <rar-name>wmq.jmsra.rar</rar-name> <connection-definition> javax.jms.ConnectionFactory </connection-definition> <config-property name="channel" type="java.lang.String">MYCONN.SVRCONN</config-property> <config-property name="hostName" type="java.lang.String">10.15.13.15</config-property> <config-property name="port" type="java.lang.String">1466</config-property> <config-property name="queueManager" type="java.lang.String">QMN</config-property> <config-property name="transportType" type="java.lang.String">CLIENT</config-property> <security-domain-and-application>JmsXARealm</security-domain-and-application> </tx-connection-factory> <mbean code="org.jboss.resource.deployment.AdminObject" name="jca.wmq:name=ivtqueue"> <attribute name="JNDIName"> IVTQueue </attribute> <depends optional-attribute-name="RARName"> jboss.jca:service=RARDeployment,name='wmq.jmsra.rar' </depends> <attribute name="Type">javax.jms.Queue</attribute> <attribute name="Properties"> baseQueueManagerName=QMN baseQueueName=QL.MINE </attribute> </mbean> </connection-factories>

La informació que ho lliga tot l'ha posat l'aplicació / en jBoss dins el fitxer jboss-web.xml dins del ear, que s'expandeix al directori WEB-INF :

<jboss-web> <context-root>WMQ_IVT</context-root> <resource-ref> <res-ref-name>jms/IVTCF</res-ref-name> <res-type>javax.jms.ConnectionFactory</res-type> <jndi-name>java:IVTCF</jndi-name> </resource-ref> <resource-env-ref> <resource-env-ref-name>jms/IVTQueue</resource-env-ref-name> <jndi-name>java:IVTQueue</jndi-name> </resource-env-ref> <ejb-ref> <ejb-ref-name>ejb/WMQ_TransactedIVT</ejb-ref-name> <jndi-name>WMQ_TransactedIVT</jndi-name> </ejb-ref> </jboss-web>

Amunt! Top Amunt!
Problem determination

Amunt! Top Amunt!
Dubtes


Amunt! Top Amunt!
Links

Overview

Using Java, SC34-6591-02, appendix F.

Planned maintenance - Recommended fixes for WebSphere Adapters :
This is a list of recommended fix packs available for the WebSphere Adapters and WebSphere Business Integration Adapters.
http://www.ibm.com/support/docview.wss?acss=adp061908&rs=695&uid=swg27010397

Education. Support Page
Primary support resources for WebSphere Adapters
http://www.ibm.com/software/integration/wbiadapters/support/?acss=adp061908


Ep ! Valid HTML 4.01!   Valid CSS! Escriu-me !
Updated : 23/06/2008.  
Uf !