Class OutboundConnectionFactory
- java.lang.Object
-
- org.objectweb.joram.client.connector.OutboundConnectionFactory
-
- All Implemented Interfaces:
Serializable,ConnectionFactory,Referenceable,Referenceable
- Direct Known Subclasses:
OutboundQueueConnectionFactory,OutboundTopicConnectionFactory
public class OutboundConnectionFactory extends Object implements ConnectionFactory, Serializable, Referenceable
AnOutboundConnectionFactoryinstance is used for getting a connection to an underlying JORAM server.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ConnectionManagercxManagerManager for connection pooling.private static booleanDEBUGprivate static Loggerloggerprotected ManagedConnectionFactoryImplmcfCentral manager for outbound connectivity.protected ReferencereferenceNaming reference of this instance.private static longserialVersionUIDdefine serialVersionUID for interoperability
-
Constructor Summary
Constructors Constructor Description OutboundConnectionFactory(ManagedConnectionFactoryImpl mcf, ConnectionManager cxManager)Constructs anOutboundConnectionFactoryinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectioncreateConnection()Requests a connection for the default user, eventually returns anOutboundConnectioninstance.ConnectioncreateConnection(String userName, String password)Requests a connection for a given user, eventually returns anOutboundConnectioninstance.JMSContextcreateContext()JMSContextcreateContext(int sessionMode)JMSContextcreateContext(String userName, String password)JMSContextcreateContext(String userName, String password, int sessionMode)ReferencegetReference()Returns the naming reference of this factory.voidsetReference(Reference ref)Sets the naming reference of this factory.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
define serialVersionUID for interoperability- See Also:
- Constant Field Values
-
logger
private static final Logger logger
-
DEBUG
private static final boolean DEBUG
-
mcf
protected ManagedConnectionFactoryImpl mcf
Central manager for outbound connectivity.
-
cxManager
protected ConnectionManager cxManager
Manager for connection pooling.
-
reference
protected Reference reference
Naming reference of this instance.
-
-
Constructor Detail
-
OutboundConnectionFactory
OutboundConnectionFactory(ManagedConnectionFactoryImpl mcf, ConnectionManager cxManager)
Constructs anOutboundConnectionFactoryinstance.- Parameters:
mcf- Central manager for outbound connectivity.cxManager- Manager for connection pooling.
-
-
Method Detail
-
setReference
public void setReference(Reference ref)
Sets the naming reference of this factory.- Specified by:
setReferencein interfaceReferenceable
-
getReference
public Reference getReference()
Returns the naming reference of this factory.- Specified by:
getReferencein interfaceReferenceable
-
createConnection
public Connection createConnection() throws JMSException
Requests a connection for the default user, eventually returns anOutboundConnectioninstance.- Specified by:
createConnectionin interfaceConnectionFactory- Throws:
JMSSecurityException- If connecting is not allowed.IllegalStateException- If the underlying JORAM server is not reachable.JMSException- Generic exception.
-
createConnection
public Connection createConnection(String userName, String password) throws JMSException
Requests a connection for a given user, eventually returns anOutboundConnectioninstance.- Specified by:
createConnectionin interfaceConnectionFactory- Throws:
JMSSecurityException- If connecting is not allowed.IllegalStateException- If the underlying JORAM server is not reachable.JMSException- Generic exception.
-
createContext
public JMSContext createContext()
- Specified by:
createContextin interfaceConnectionFactory
-
createContext
public JMSContext createContext(String userName, String password)
- Specified by:
createContextin interfaceConnectionFactory
-
createContext
public JMSContext createContext(String userName, String password, int sessionMode)
- Specified by:
createContextin interfaceConnectionFactory
-
createContext
public JMSContext createContext(int sessionMode)
- Specified by:
createContextin interfaceConnectionFactory
-
-