Connection Understanding the JMS API

Understanding WebLogic JMS 2-9 For information on configuring connection factories, see Configure connection factories in the Oracle WebLogic Server Administration Console Help. A system administrator establishes cluster-wide, transparent access to JMS destinations from any server in the cluster by targeting to the cluster or by targeting to one or more server instances in the cluster. This way, each connection factory can be deployed on multiple WebLogic Server instances. For more information on JMS clustering, refer to Configuring Advanced WebLogic JMS Resources in Configuring and Managing JMS for Oracle WebLogic Server.

2.4.1.3 The ConnectionFactory Class

The ConnectionFactory class does not define methods; however, its subclasses define methods for the respective messaging models. A connection factory supports concurrent use, enabling multiple threads to access the object simultaneously. The following table describes the ConnectionFactory subclasses. To learn how to use the ConnectionFactory class within an application, see Chapter 5, Developing a Basic JMS Application, or the javax.jms.ConnectionFactory Javadoc at http:java.sun.comjavaee5docsapijavaxjmsConnectionFactor y.html .

2.4.2 Connection

A Connection represents an open communication channel between an application and the messaging system, and is used to create a Session see Section 2.4.3, Session for producing and consuming messages. A connection creates server-side and client-side objects that manage the messaging activity between an application and JMS. A connection may also provide user authentication. A Connection is created by a ConnectionFactory see Section 2.4.1, ConnectionFactory , obtained through a JNDI lookup. Due to the resource overhead associated with authenticating users and setting up communications, most applications establish a single connection for all messaging. In the WebLogic Server, JMS traffic is multiplexed with other WebLogic services on the client connection to the server. No additional TCPIP connections are created for JMS. Servlets and other server-side objects may also obtain JMS Connections. By default, a connection is created in stopped mode. For information about how and when to start a stopped connection, see Section 6.3.3, Starting, Stopping, and Closing a Connection. Note: For this release, you can use the JMS Version 1.1 specification connection factories or you can choose to use the subclasses. Table 2–4 ConnectionFactory Subclasses Subclass. . . In Messaging Model. . . Is Used to Create. . . QueueConnectionFactory PTP QueueConnection to a JMS PTP provider. TopicConnectionFactory PubSub TopicConnection to a JMS PubSub provider. 2-10 Programming JMS for Oracle WebLogic Server Connections support concurrent use, enabling multiple threads to access the object simultaneously. The following table describes the Connection subclasses. To learn how to use the Connection class within an application, see Chapter 5, Developing a Basic JMS Application, or the javax.jms.Connection Javadoc at http:java.sun.comjavaee5docsapijavaxjmsConnection.html .

2.4.3 Session