1. /*
  2. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  3. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  4. */
  5. package javax.jms;
  6. /** A <CODE>ServerSessionPool</CODE> object is an object implemented by an
  7. * application server to provide a pool of <CODE>ServerSession</CODE> objects
  8. * for processing the messages of a <CODE>ConnectionConsumer</CODE> (optional).
  9. *
  10. * <P>Its only method is <CODE>getServerSession</CODE>. The JMS API does not
  11. * architect how the pool is implemented. It could be a static pool of
  12. * <CODE>ServerSession</CODE> objects, or it could use a sophisticated
  13. * algorithm to dynamically create <CODE>ServerSession</CODE> objects as
  14. * needed.
  15. *
  16. * <P>If the <CODE>ServerSessionPool</CODE> is out of
  17. * <CODE>ServerSession</CODE> objects, the <CODE>getServerSession</CODE> call
  18. * may block. If a <CODE>ConnectionConsumer</CODE> is blocked, it cannot
  19. * deliver new messages until a <CODE>ServerSession</CODE> is
  20. * eventually returned.
  21. *
  22. * @version 1.0 - 9 March 1998
  23. * @author Mark Hapner
  24. * @author Rich Burridge
  25. *
  26. * @see javax.jms.ServerSession
  27. */
  28. public interface ServerSessionPool {
  29. /** Return a server session from the pool.
  30. *
  31. * @return a server session from the pool
  32. *
  33. * @exception JMSException if an application server fails to
  34. * return a <CODE>ServerSession</CODE> out of its
  35. * server session pool.
  36. */
  37. ServerSession
  38. getServerSession() throws JMSException;
  39. }