17.1. Deploying and Configuring the WS-TX Service on GlassFish V3
Before you can begin using atomic transactions in Metro on GlassFish V3, you have to deploy and configure the WS-TX services. In previous releases of GlassFish, the services were automatically deployed and available. For now, you have to use the following workaround in GFv3:
- Manually deploy wstx-services.war to each GFv3 domain using the context root "__wstx-services" (note the leading double underscore). You can deploy this war using the GlassFish admin console or the asadmin command.
- Make sure that HTTPS is enabled.
- Log into the GlassFish Admin Console and look at: Configuration> HTTP Service> HTTP Listeners
- You should see an http listener configured with security enabled
- In this case, the HTTPS service is configured to run on port 81, but the default in GlassFish is usually 8181. You may use whatever port you like, but you may have to specify the override property described in the next section.
17.1.1. Overriding the HTTPS Port
If the sample fails to run, check the GlassFish server log for the following warning:
"WSTX-COMMON-2015: Failed to get the FQDN and secure and non-secure http listener ports from AS, falling back to <some-address-and-port>"
If you see this message, and the fallback address and port don't correspond to the actual domain's configuration, then try to add the following JVM argument to the GFv3 domain startup options (in domain.xml config file):
where XXXX value should be set to the proper value of domain's HTTPS port (the default is 8181)