WebLogic Messaging API Class Library

IConnection Interface

An IConnection object is a client's active JMS connection from the WebLogic Server client host to the JMS server. The JMS server may run on the same WebLogic Server as the client host.

Important: Applications must call IConnection.Start() to enable receivers to receive messages because new connections begin in a stopped state.

Connections support concurrent use.

A connection serves several purposes:

Because the creation of a connection involves setting up authentication and communication, a connection is a relatively heavyweight object to create and close. Most clients will do all their messaging with a single connection. Other more advanced applications may use several connections.

A JMS client typically creates a connection, one or more sessions, and a number of message producers and consumers. When a connection is created, it is in stopped mode. That means that no messages are being delivered.

It is typical to leave the connection in stopped mode until setup is complete (that is, until all message consumers have been created). At that point, the client calls the connection's Start method, and messages begin arriving at the connection's consumers. This setup convention minimizes any client confusion that may result from asynchronous message delivery while the client is still in the process of setting itself up.

A connection can be started immediately, and the setup can be done afterwards. Clients that do this must be prepared to handle asynchronous message delivery while they are still in the process of setting up.

A message producer can send messages while a connection is stopped.

For a list of all members of this type, see IConnection Members.

public interface IConnection

Requirements

Namespace: WebLogic.Messaging

Assembly: WebLogic.Messaging (in WebLogic.Messaging.dll)

See Also

IConnection Members | WebLogic.Messaging Namespace | IConnectionFactory