org.objectweb.joram.client.connector
Class OutboundConnectionFactory

java.lang.Object
  extended byorg.objectweb.joram.client.connector.OutboundConnectionFactory
All Implemented Interfaces:
javax.jms.ConnectionFactory, javax.naming.Referenceable, javax.resource.Referenceable, java.io.Serializable
Direct Known Subclasses:
OutboundQueueConnectionFactory, OutboundTopicConnectionFactory

public class OutboundConnectionFactory
extends java.lang.Object
implements javax.jms.ConnectionFactory, java.io.Serializable, javax.resource.Referenceable

An OutboundConnectionFactory instance is used for getting a connection to an underlying JORAM server.

See Also:
Serialized Form

Field Summary
protected  javax.resource.spi.ConnectionManager cxManager
          Manager for connection pooling.
protected  ManagedConnectionFactoryImpl mcf
          Central manager for outbound connectivity.
protected  javax.naming.Reference reference
          Naming reference of this instance.
 
Method Summary
 javax.jms.Connection createConnection()
          Requests a connection for the default user, eventually returns an OutboundConnection instance.
 javax.jms.Connection createConnection(java.lang.String userName, java.lang.String password)
          Requests a connection for a given user, eventually returns an OutboundConnection instance.
 javax.naming.Reference getReference()
          Returns the naming reference of this factory.
 void setReference(javax.naming.Reference ref)
          Sets the naming reference of this factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mcf

protected ManagedConnectionFactoryImpl mcf
Central manager for outbound connectivity.


cxManager

protected javax.resource.spi.ConnectionManager cxManager
Manager for connection pooling.


reference

protected javax.naming.Reference reference
Naming reference of this instance.

Method Detail

createConnection

public javax.jms.Connection createConnection()
                                      throws javax.jms.JMSException
Requests a connection for the default user, eventually returns an OutboundConnection instance.

Specified by:
createConnection in interface javax.jms.ConnectionFactory
Throws:
javax.jms.JMSSecurityException - If connecting is not allowed.
javax.jms.IllegalStateException - If the underlying JORAM server is not reachable.
javax.jms.JMSException - Generic exception.

createConnection

public javax.jms.Connection createConnection(java.lang.String userName,
                                             java.lang.String password)
                                      throws javax.jms.JMSException
Requests a connection for a given user, eventually returns an OutboundConnection instance.

Specified by:
createConnection in interface javax.jms.ConnectionFactory
Throws:
javax.jms.JMSSecurityException - If connecting is not allowed.
javax.jms.IllegalStateException - If the underlying JORAM server is not reachable.
javax.jms.JMSException - Generic exception.

setReference

public void setReference(javax.naming.Reference ref)
Sets the naming reference of this factory.

Specified by:
setReference in interface javax.resource.Referenceable

getReference

public javax.naming.Reference getReference()
Returns the naming reference of this factory.

Specified by:
getReference in interface javax.naming.Referenceable


Copyright ? 2004 Scalagent - All rights reserved