Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

javax::jms::ServerSession Class Reference

A ServerSession object is an application server object that is used by a server to associate a thread with a JMS session (optional). More...

#include <javax_jms_ServerSession.h>

Inheritance diagram for javax::jms::ServerSession:

Inheritance graph
[legend]
Collaboration diagram for javax::jms::ServerSession:

Collaboration graph
[legend]
List of all members.

Public Types

enum  {
  xmogDefaultFlags = xmog_base::GLOBAL, xmogMajorVersion = 3, xmogMinorVersion = 2, xmogPatchVersion = 9,
  xmogBuildNumber = 2047
}
typedef ::xmog_java_array_template<
::javax::jms::ServerSession
array1D
typedef ::xmog_java_array_template<
::xmog_java_array_template<
::javax::jms::ServerSession > > 
array2D

Public Member Functions

virtual ::javax::jms::Session getSession (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Return the ServerSession's Session.
virtual void start (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Cause the Session's run method to be called to process messages that were just assigned to it.

Detailed Description

A ServerSession object is an application server object that is used by a server to associate a thread with a JMS session (optional).

A ServerSession implements two methods:

A ConnectionConsumer implemented by a JMS provider uses a ServerSession to process one or more messages that have arrived. It does this by getting a ServerSession from the ConnectionConsumer's ServerSessionPool; getting the ServerSession's JMS session; loading it with the messages; and then starting the ServerSession.

In most cases the ServerSession will register some object it provides as the ServerSession's thread run object. The ServerSession's start method will call the thread's start method, which will start the new thread, and from it, call the run method of the ServerSession's run object. This object will do some housekeeping and then call the Session's run method. When run returns, the ServerSession's run object can return the ServerSession to the ServerSessionPool, and the cycle starts again.

Note that the JMS API does not architect how the ConnectionConsumer loads the Session with messages. Since both the ConnectionConsumer and Session are implemented by the same JMS provider, they can accomplish the load using a private mechanism.

Author:
Mark Hapner

Rich Burridge


Member Function Documentation

virtual ::javax::jms::Session javax::jms::ServerSession::getSession ::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Return the ServerSession's Session.

This must be a Session created by the same Connection that will be dispatching messages to it. The provider will assign one or more messages to the Session and then call start on the ServerSession.

Parameters:
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the server session's session

virtual void javax::jms::ServerSession::start ::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Cause the Session's run method to be called to process messages that were just assigned to it.

Parameters:
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:


The documentation for this class was generated from the following file:
Generated on Fri Jun 16 10:19:58 2006 for JMS Courier for C++ by  doxygen 1.4.1