Since a provider may allocate some resources on behalf of a session outside the JVM, clients should Close the resources when they are not needed. Relying on garbage collection to eventually reclaim these resources may not be timely enough.
There is no need to Close the producers and consumers of a closed session.
This call will block until a Receive call or message listener in progress has completed. A blocked message consumer Receive call returns null when this session is closed.
Closing a transacted session must roll back the transaction in progress.
This method is the only ISession method that can be called concurrently.
Invoking any other ISession method on a closed session must throw a MessageException.IllegalStateException. Closing a closed session must not throw an exception.
| Exception Type | Condition |
|---|---|
| MessageException | if the JMS provider fails to Close the session due to some internal error. |
ISession Interface | WebLogic.Messaging Namespace