JAX-RS Extension

The JAX-RS Extension is an application specific extension that can assist you in improving the coding of certain aspects of any application that uses the standard JAX-RS Client API. At the moment the following features are supported:

  • Define the alias of SSL certificate entry that will be used to establish secure communication in a mutual TLS transport setting.


To install this extension, simply include its JAR file in the application’s WAR file. Using Maven, it is as simple as declaring the dependency through its GAV coordinates:



SSL Certificate Alias Configuration

To configure the alias of the SSL certificate to be used in secure communications established by the client, the following system property must be defined when establishing a new REST client call through the use of the javax.ws.rs.client.ClientBuilder class:

Property Description



The name of the property is defined as a constant in the fish.payara.security.client.PayaraConstants class.
The certificate that corresponds to the given alias must exist in the domain’s configured keystore.


Here’s an example of how to set up the property when executing a new JAX-RS client call:

              .property(PayaraConstants.JAXRS_CLIENT_CERTIFICATE_ALIAS, "someAliasName")
              .target(new URI("https://localhost:8080/service"))
For this example to work, you need to include the certificate with the given alias in the default Payara Server keystore.