
[[f-testing-a-standalone-jakarta-messaging-resource-adapter]]
= Testing a Standalone Jakarta Messaging Resource Adapter (Full Platform Only)
This appendix explains how to set up and configure a Jakarta EE {tck_version} CI and
Jakarta EE {tck_version} Platform TCK so a standalone Jakarta Messaging resource adapter can be tested.

This appendix covers the following topics:

* <<f.1-setting-up-your-environment>>
* <<f.2-configuring-jakarta-ee-11-platform-tck>>
* <<f.3-configuring-the-jakarta-ee-8-CI-for-the-standalone-jakarta-messaging-resource-adapter>>
* <<f.4-modifying-the-runtime-deployment-descriptors-for-the-jakarta-messaging-mdb-and-resource-adapter-tests>>
* <<f.5-running-the-jakarta-messaging-tests-from-the-command-line>>
* <<f.6-restoring-the-runtime-deployment-descriptors-for-the-jakarta-messaging-mdb-and-resource-adapter-tests>>
* <<f.7-reconfiguring-jakarta-ee-8-CI-for-jakarta-ee-11-platform-tck-after-testing-the-standalone-jakarta-messaging-resource-adapter>>

[[f.1-setting-up-your-environment]]
== Setting Up Your Environment

Before you can run the Jakarta Messaging TCK tests against a standalone Jakarta Messaging Resource
Adapter using a Jakarta EE {tck_version} CI, you must install the following
components:

* Java SE 17 or 21 software
* Jakarta EE {tck_version} CI software such as Eclipse {glassfish_version}
* Jakarta EE {tck_version} Platform TCK software

Complete the following steps to set up Eclipse {glassfish_version} in your environment:

1.  Set the following environment variables in your shell environment:
* JAVA_HOME to the directory where the Java SE software has been
installed
* JAKARTAEE_HOME to the directory where the Jakarta EE {tck_version} CI (Eclipse {glassfish_version}) software has been
installed
* TS_HOME to the directory where the Jakarta EE {tck_version} Platform TCK software has been
installed
2.  Update your PATH environment variable to include the following
directories: JAVA_HOME/bin, JAKARTAEE_HOME/bin, TS_HOME/bin, and
ANT_HOME/bin.

[[f.2-configuring-jakarta-ee-11-platform-tck]]
== Configuring Jakarta EE {tck_version} Platform TCK

The `ts.jte` file includes properties that must be set for testing a
standalone Jakarta Messaging Resource Adapter using the Jakarta EE {tck_version} 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.

1.  Set the following properties in the `ts.jte` file:
* javaee.home to the location where the Jakarta EE {tck_version} 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
2.  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 your `arquillian.xml` for your appclient container.

file. This JAR file should also be copied to the appropriate directory in your Jakarta EE {tck_version} environment.

[[f.3-configuring-the-jakarta-ee-8-CI-for-the-standalone-jakarta-messaging-resource-adapter]]
== Configuring a Jakarta EE {tck_version} CI for the Standalone Jakarta Messaging Resource Adapter

Review the glassfish-runner/messaging-tck maven runner the the platform-tck repo for the Jakarta Messaging Resource Adapter setup tasks.

[[f.4-modifying-the-runtime-deployment-descriptors-for-the-jakarta-messaging-mdb-and-resource-adapter-tests]]
== Modifying the Runtime Deployment Descriptors for the Jakarta Messaging MDB and Resource Adapter Tests

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 `sun-ejb-jar` runtime deployment descriptor XML files must be modified for the Jakarta Messaging MDB and Resource Adapter tests.

The descriptor XML files in the distribution directory of the Jakarta Messaging MDB and Resource Adapter test directories that exist under the `com.sun.ts.tests.jms.ee.mdb` and `com.sun.ts.tests.jms.ee20.ra` packages of the jakarta.tck:jms-platform-tck artifact.


