The GlassFish Server supports the development and deployment of resource adapters that are compatible with the Connector 1.6 specification (and, for backward compatibility, the Connector 1.0 and 1.5 specifications).
The Connector 1.0 specification defines the outbound connectivity system contracts between the resource adapter and the GlassFish Server. The Connector 1.5 specification introduces major additions in defining system level contracts between the GlassFish Server and the resource adapter with respect to inbound connectivity, life cycle management, and thread management. The Connector 1.6 specification introduces further additions in defining system level contracts between the GlassFish Server and the resource adapter with respect to the following:
Generic work context contract — A generic contract that enables a resource adapter to control the execution context of a Work instance that it has submitted to the GlassFish Server for execution. The Generic work contract provides the mechanism for a resource adapter to augment the runtime context of a Work instance with additional contextual information flown-in from the EIS. This contract enables a resource adapter to control, in a more flexible manner, the contexts in which the Work instances submitted by it are executed by the application server's WorkManager.
Security work context — A standard contract that enables a resource adapter to establish security information while submitting a Work instance for execution to a WorkManager and while delivering messages-to-message endpoints residing in the GlassFish Server. This contract provides a mechanism to support the execution of a Work instance in the context of an established identity. It also supports the propagation of user information or Principal information from an EIS to a MessageEndpoint during message inflow.
Transaction context — The transaction context contract between the resource adapter and the application server leverages the Generic Work Context mechanism by describing a standard WorkContext, the TransactionContext. It represents the standard interface a resource adapter can use to propagate transaction context information from the EIS to the application server.
In the Administration Console, connector, JMS, and JDBC resources are handled differently, but they use the same underlying Connector architecture. In the GlassFish Server, all communication to an EIS, whether to a message provider or an RDBMS, happens through the Connector architecture. To provide JMS infrastructure to clients, the GlassFish Server uses the GlassFish Message Queue software. To provide JDBC infrastructure to clients, the GlassFish Server uses its own JDBC system resource adapters. The GlassFish Server automatically makes these system resource adapters available to any client that requires them.
For more information about JMS in the GlassFish Server, see Chapter 17, Using the Java Message Service. For more information about JDBC in the GlassFish Server, see Chapter 14, Using the JDBC API for Database Access.
The GlassFish Server does not need to use sun-ra.xml, which previous GlassFish Server versions used, to store server-specific deployment information inside a Resource Adapter Archive (RAR) file. (However, the sun-ra.xml file is still supported for backward compatibility.) Instead, the information is stored in the server configuration. As a result, you can create multiple connector connection pools for a connection definition in a functional resource adapter instance, and you can create multiple user-accessible connector resources (that is, registering a resource with a JNDI name) for a connector connection pool. In addition, dynamic changes can be made to connector connection pools and the connector resource properties without restarting the GlassFish Server.