|
Testing a Standalone Jakarta Messaging Resource Adapter |
| Previous | Contents |
This appendix explains how to set up and configure a Jakarta EE 8 CI and Jakarta EE 8 CTS so a standalone Jakarta Messaging resource adapter can be tested.
This appendix covers the following topics:
Before you can run the Jakarta Messaging CTS tests against a standalone Jakarta Messaging Resource Adapter using a Jakarta EE 8 CI, you must install the following components:
Java SE 8 software
Jakarta EE 8 CI software such as Eclipse GlassFish 5.1
Jakarta EE 8 CTS software
Complete the following steps to set up Eclipse GlassFish 5.1 in your environment:
Set the following environment variables in your shell environment:
JAVA_HOME to the directory where the Java SE 8 software has been installed
JAVAEE_HOME to the directory where the Jakarta EE 8 CI (Eclipse GlassFish 5.1) software has been installed
TS_HOME to the directory where the Jakarta EE 8 CTS software has been installed
Update your PATH environment variable to include the following directories: JAVA_HOME/bin, JAVAEE_HOME/bin, TS_HOME/bin, and ANT_HOME/bin.
The ts.jte file includes properties that must be set for testing a
standalone Jakarta Messaging Resource Adapter using the Jakarta EE 8 CI. The Jakarta Messaging Resource
Adapter documentation in the ts.jte file should help you understand
what you need to set in this step of the testing process.
Set the following properties in the ts.jte file:
javaee.home to the location where the Jakarta EE 8 CI is installed
Use the default value or enter a new host name for the orb.host
property
Use the default value or enter a new port number for the `orb.port`property
test.sa.jmsra to true
jmsra.rarfile to the location of the standalone Jakarta Messaging Resource Adapter
RAR file
jmsra.jarfile to the location of the standalone Jakarta Messaging Resource Adapter
JAR file
jmsra.name to the name of the Jakarta Messaging Resource Adapter under test
Add $\{jmsra.jarfile} to the beginning or at the end of the
AppClient classpath:
APPCPATH= list of classes and jars followed by
$\{pathsep}$\{jmsra.jarfile}\
The jmsra.jarfile, which contains all the Jakarta Messaging Resource Adapter
classes, needs to be added to the AppClient classpath in the ts.jte
file. This JAR file will also be copied to the appropriate directory in
your Jakarta EE 8 environment when the config.vi Ant task, which is
described in the next section, is invoked. For the Jakarta EE 8 CI Eclipse GlassFish 5.1, the
file is copied to the JAVAEE_HOME/lib directory.
Invoke the config.vi Ant task to configure the Jakarta EE 8 CI, Eclipse GlassFish 5.1 for CTS 8 and the standalone Jakarta Messaging Resource Adapter:
Change to the TS_HOME/bin directory.
Execute the config.vi Ant task.
The config.vi Ant task executes scripts, which configure your Jakarta EE 8
environment for CTS 8. One of the ant scripts that gets executed will
configure and deploy the standalone Jakarta Messaging Resource Adapter, copy the JAR
file containing the classes for the standalone Jakarta Messaging Resource Adapter to
the JAVAEE_HOME/lib directory, create the Jakarta Messaging connector connect ion
pools and resources, and create the necessary Jakarta Messaging administration
objects. The following Ant scripts are called by the config.vi Ant task:
TS_HOME/bin/xml/impl/glassfish/jmsra.xml
TS_HOME/bin/xml/impl/glassfish/templates/create.jmsra.template
The script TS_HOME/bin/xml/impl/glassfish/jmsra.xml calls the template
file TS_HOME/bin/xml/impl/glassfish/templates/create.jmsra.template,
which handles the creation of the Jakarta Messaging connector connection pools, the
Jakarta Messaging connector resources and the Jakarta Messaging administration objects.
These scripts are written for the standalone Generic Jakarta Messaging Resource
Adapter (GenericJMSRA) for the Jakarta EE 8 CI. If you are using a
different Jakarta EE 8 environment, you will need to rewrite these scripts
for that environment. If you are using a different standalone Jakarta Messaging
resource adapter, you will need to rewrite these scripts for that Jakarta Messaging
resource adapter.
After the standalone Jakarta Messaging Resource Adapter has been configured and
deployed and the required Jakarta Messaging connector connection pools, Jakarta Messaging connector
resources, and Jakarta Messaging administration objects have been created, the
glassfish-ejb-jar runtime deployment descriptor XML files must be
modified for the Jakarta Messaging MDB and Resource Adapter tests. An Ant task handles
the modifications.
Change to the TS_HOME/bin directory.
Execute the following Ant task:
ant -f xml/impl/glassfish/jmsra.xml modify-jmsmdbejbxml
This Ant target modifies the glassfish-ejb-jar runtime deployment
descriptor XML files in the distribution directory of the Jakarta Messaging MDB and
Resource Adapter test directories that exist under
TS_HOME/src/com/sun/ts/tests/jms/ee/mdb and TS_HOME/src/com/sun/ts/tests/jms/ee20/ra.
The modified glassfish-ejb-jar runtime deployment descriptor XML files
exist under the
TS_HOME/src/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra
directory. These files are copied into the correct distribution test
directory under
TS_HOME/dist/com/sun/ts/tests/jms/ee/mdb and TS_HOME/dist/com/sun/ts/tests/jms/ee20/ra.
The <mdb-resource-adapter> information for the standalone Jakarta Messaging Resource
Adapter being tested is added to the glassfish-ejb-jar runtime
deployment descriptor XML files. In the default case, the resource
adapter being tested is the Generic Jakarta Messaging Resource Adapter
(GenericJMSRA). If you are using a different Jakarta EE 8 environment, your
runtime deployment descriptor XML files will need to be vendor specific.
In this case, you will need to modify the Ant script to handle your
vendor-specific runtime deployment descriptor XML files.
Run the Jakarta Messaging tests:
Change to the TS_HOME/src/com/sun/ts/tests/jms directory.
Invoke the runclient Ant target:
ant runclient
After you run the Jakarta Messaging tests against your standalone Jakarta Messaging Resource
Adapter, you need to restore the Jakarta Messaging MDB and Resource Adapter tests.
Jakarta EE 8 CTS provides an Ant task that handles the restoration. Invoke
the following Ant task to restore the Jakarta Messaging MDB and Resource Adapter
glassfish-ejb-jar runtime deployment descriptor XML files to their
previous state:
Change to the TS_HOME/bin directory.
Invoke the following Ant target:
ant -f xml/impl/glassfish/jmsra.xml restore-jmsmdbejbxml
If you are using another Jakarta EE 8 environment, these runtime deployment descriptor XML files will be vendor specific. In this case, you will need to modify the Ant script to handle the vendor-specific runtime deployment descriptor XML files appropriate for your environment.
After you finish testing the standalone Jakarta Messaging Resource Adapter, you need to reconfigure the Jakarta EE 8 CI before you can continue testing with Jakarta EE 8 CTS:
Change to the TS_HOME/bin directory.
Invoke the clean.vi Ant target:
ant clean.vi
Set the following properties in the ts.jte file:
javaee.home to the location where the Jakarta EE 8 CI is installed
Use the default value for the orb.host property or enter a new host
name
Use the default value for the orb.port property or enter a new port
number
test.sa.jmsra to false
Unset the jmsra.rarfile property
Unset the jmsra.jarfile property
Reset the jmsra.name property to jmsra to refer to the Jakarta Messaging
Resource Adapter for the Jakarta EE 8 CI
From the TS_HOME/bin directory, invoke the config.vi Ant task to
reconfigure the Jakarta EE 8 CI for Jakarta EE 8 CTS:
ant config.vi
| Previous | Contents |
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.