Sun GlassFish Enterprise Server v3 Administration Guide

Configuring Resource Adapters for JMS

Enterprise Server implements JMS by using a system resource adapter named jmsra. When you create JMS resources, Enterprise Server automatically creates connector resources. The resource adapter can be configured to indicate whether the JMS provider supports XA or not. It is possible to indicate what mode of integration is possible with the JMS provider.

Two modes of integration are supported by the resource adapter. The first one uses JNDI as the means of integration. In this situation, administered objects are set up in the JMS provider's JNDI tree and will be looked up for use by the generic resource adapter. If that mode is not suitable for integration, it is also possible to use the Java reflection of JMS administered object javabean classes as the mode of integration.

Generic resource adapter 1.6 for JMS is a Java EE connector 2.0 resource adapter that can wrap the JMS client library of external JMS providers such as IBM WebSphere MQ, Tibco EMS, and Sonic MQ among others. This integrates any JMS provider with a Java EE 6 application server, such as the Sun GlassFish Enterprise Server. The adapter is a .rar archive that can be deployed and configured using Java EE 6 application server administration tools.

ProcedureTo Configure the Generic Resource Adapter

Before deploying the generic resource adapter, JMS client libraries must be made available to Enterprise Server. For some JMS providers, client libraries might also include native libraries. In such cases, these native libraries must be made available to any Enterprise Server JVMs.

  1. Deploy the generic resource adapter the same way you would deploy a connector module.

  2. Create a connector connection pool.

    See To Create a Connector Connection Pool.

  3. Create a connector resource.

    See To Create a Connector Resource.

  4. Create an administered object resource.

    See To Create an Administered Object.

  5. Make the following changes to the security Enterprise Server policy files:

    • Modify the sjsas_home/domains/domain1/config/server.policy file to add the following:


      java.util.logging.LoggingPermission "control"
    • Modify the sjsas_home/lib/appclient/client.policy file to add permission:


      javax.security.auth.PrivateCredentialPermission 
      "javax.resource.spi.security.PasswordCredential ^ \"^\"","read":