org.objectweb.jonas_jms
Class JConnectionFactory

java.lang.Object
  |
  +--org.objectweb.jonas_jms.JConnectionFactory
All Implemented Interfaces:
javax.naming.Referenceable, java.io.Serializable
Direct Known Subclasses:
JQueueConnectionFactory, JTopicConnectionFactory

public class JConnectionFactory
extends java.lang.Object
implements javax.naming.Referenceable, java.io.Serializable

Author:
Laurent Chauvirey, Frederic Maistre, Nicolas Tachker Contributor(s): Philippe Durieux Jeff Mesnil connection anonymous
See Also:
Serialized Form

Field Summary
protected  JmsManager jms
           
 
Constructor Summary
JConnectionFactory(java.lang.String name)
          Constructor.
 
Method Summary
 void freeJConnection(JConnection con)
          Free a Connection and return it to the pool
 JConnection getJConnection()
          Get a Connection from the pool for an anonymous user
 JConnection getJConnection(java.lang.String user)
          Get a Connection from the pool for the specified user
 javax.naming.Reference getReference()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jms

protected JmsManager jms
Constructor Detail

JConnectionFactory

public JConnectionFactory(java.lang.String name)
Constructor.
Method Detail

freeJConnection

public void freeJConnection(JConnection con)
Free a Connection and return it to the pool

getJConnection

public JConnection getJConnection()
Get a Connection from the pool for an anonymous user
Returns:
a Connection for an anonymous user

getJConnection

public JConnection getJConnection(java.lang.String user)
Get a Connection from the pool for the specified user
Parameters:
user - User wanting a connection
Returns:
Connection from the pool for the specified user

getReference

public javax.naming.Reference getReference()
                                    throws javax.naming.NamingException
Specified by:
getReference in interface javax.naming.Referenceable