org.jboss.jms.asf
Class StdServerSession

java.lang.Object
  |
  +--org.jboss.jms.asf.StdServerSession
All Implemented Interfaces:
java.lang.Runnable, javax.jms.ServerSession

public class StdServerSession
extends java.lang.Object
implements java.lang.Runnable, javax.jms.ServerSession

StdServerSession.java Created: Thu Dec 7 18:25:40 2000

Version:
 
Author:
 

Method Summary
 javax.jms.Session getSession()
          Implementation of ServerSession.getSession This simply returns what it has fetched from the connection.
 void run()
          Runs in an own thread, basically calls the session.run(), it is up to the session to have been filled with messages and it will run against the listener set in StdServerSessionPool.
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSession

public javax.jms.Session getSession()
                             throws javax.jms.JMSException
Implementation of ServerSession.getSession This simply returns what it has fetched from the connection. It is up to the jms provider to typecast it and have a private API to stuff messages into it.
Specified by:
getSession in interface javax.jms.ServerSession

start

public void start()
           throws javax.jms.JMSException
Specified by:
start in interface javax.jms.ServerSession

run

public void run()
Runs in an own thread, basically calls the session.run(), it is up to the session to have been filled with messages and it will run against the listener set in StdServerSessionPool. When it has send all its messages it returns. HC: run() also starts a transaction with the TransactionManager and enlists the XAResource of the JMS XASession if a XASession was abvailable. A good JMS implementation should provide the XASession for use in the ASF. So we optimize for the case where we have an XASession. So, for the case where we do not have an XASession and the bean is not transacted, we have the unneeded overhead of creating a Transaction. I'm leaving it this way since it keeps the code simpler and that case should not be too common (JBossMQ provides XASessions).
Specified by:
run in interface java.lang.Runnable


Copyright © 2000 The JBoss Organization. All Rights Reserved.