Package org.ow2.joram.jakarta.connector
Class OutboundConnectionFactory
- java.lang.Object
-
- org.ow2.joram.jakarta.connector.OutboundConnectionFactory
-
- All Implemented Interfaces:
jakarta.jms.ConnectionFactory,jakarta.resource.Referenceable,Serializable,Referenceable
- Direct Known Subclasses:
OutboundQueueConnectionFactory,OutboundTopicConnectionFactory
public class OutboundConnectionFactory extends Object implements jakarta.jms.ConnectionFactory, Serializable, jakarta.resource.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 jakarta.resource.spi.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, jakarta.resource.spi.ConnectionManager cxManager)Constructs anOutboundConnectionFactoryinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description jakarta.jms.ConnectioncreateConnection()Requests a connection for the default user, eventually returns anOutboundConnectioninstance.jakarta.jms.ConnectioncreateConnection(String userName, String password)Requests a connection for a given user, eventually returns anOutboundConnectioninstance.jakarta.jms.JMSContextcreateContext()jakarta.jms.JMSContextcreateContext(int sessionMode)jakarta.jms.JMSContextcreateContext(String userName, String password)jakarta.jms.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 jakarta.resource.spi.ConnectionManager cxManager
Manager for connection pooling.
-
reference
protected Reference reference
Naming reference of this instance.
-
-
Constructor Detail
-
OutboundConnectionFactory
OutboundConnectionFactory(ManagedConnectionFactoryImpl mcf, jakarta.resource.spi.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 interfacejakarta.resource.Referenceable
-
getReference
public Reference getReference()
Returns the naming reference of this factory.- Specified by:
getReferencein interfaceReferenceable
-
createConnection
public jakarta.jms.Connection createConnection() throws jakarta.jms.JMSExceptionRequests a connection for the default user, eventually returns anOutboundConnectioninstance.- Specified by:
createConnectionin interfacejakarta.jms.ConnectionFactory- Throws:
jakarta.jms.JMSSecurityException- If connecting is not allowed.jakarta.jms.IllegalStateException- If the underlying JORAM server is not reachable.jakarta.jms.JMSException- Generic exception.
-
createConnection
public jakarta.jms.Connection createConnection(String userName, String password) throws jakarta.jms.JMSException
Requests a connection for a given user, eventually returns anOutboundConnectioninstance.- Specified by:
createConnectionin interfacejakarta.jms.ConnectionFactory- Throws:
jakarta.jms.JMSSecurityException- If connecting is not allowed.jakarta.jms.IllegalStateException- If the underlying JORAM server is not reachable.jakarta.jms.JMSException- Generic exception.
-
createContext
public jakarta.jms.JMSContext createContext()
- Specified by:
createContextin interfacejakarta.jms.ConnectionFactory
-
createContext
public jakarta.jms.JMSContext createContext(String userName, String password)
- Specified by:
createContextin interfacejakarta.jms.ConnectionFactory
-
createContext
public jakarta.jms.JMSContext createContext(String userName, String password, int sessionMode)
- Specified by:
createContextin interfacejakarta.jms.ConnectionFactory
-
createContext
public jakarta.jms.JMSContext createContext(int sessionMode)
- Specified by:
createContextin interfacejakarta.jms.ConnectionFactory
-
-