public class OutboundConnection extends Object implements javax.jms.Connection, OutboundConnectionMBean
OutboundConnection
instance is a handler for a physical
connection to an underlying JORAM server, allowing a component to
transparently use this physical connection possibly within a transaction
(local or global).Modifier and Type | Field and Description |
---|---|
static org.objectweb.util.monolog.api.Logger |
logger |
(package private) ManagedConnectionImpl |
managedCx
The managed connection this "handle" belongs to.
|
(package private) Vector |
sessions
Vector of the connection's sessions.
|
(package private) boolean |
valid
true if this "handle" is valid. |
(package private) javax.jms.XAConnection |
xac
The physical connection this "handle" handles.
|
Constructor and Description |
---|
OutboundConnection(ManagedConnectionImpl managedCx,
javax.jms.XAConnection xac)
Constructs an
OutboundConnection instance. |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
close all session.
|
void |
close()
Requests to close the physical connection.
|
boolean |
cnxEquals(Object obj)
returns
true if the
parameter is a Connection instance sharing the same
proxy identifier and connection key. |
javax.jms.ConnectionConsumer |
createConnectionConsumer(javax.jms.Destination destination,
String messageSelector,
javax.jms.ServerSessionPool sessionPool,
int maxMessages)
Forbidden call on an application or component's outbound connection,
throws a
IllegalStateException instance. |
javax.jms.ConnectionConsumer |
createDurableConnectionConsumer(javax.jms.Topic topic,
String subscriptionName,
String messageSelector,
javax.jms.ServerSessionPool sessionPool,
int maxMessages)
Forbidden call on an application or component's outbound connection,
throws a
IllegalStateException instance. |
javax.jms.Session |
createSession() |
javax.jms.Session |
createSession(boolean transacted,
int acknowledgeMode)
Returns the unique authorized JMS session per connection wrapped
in an
OutboundSession instance. |
javax.jms.Session |
createSession(int sessionMode) |
javax.jms.ConnectionConsumer |
createSharedConnectionConsumer(javax.jms.Topic topic,
String subscriptionName,
String messageSelector,
javax.jms.ServerSessionPool sessionPool,
int maxMessages) |
javax.jms.ConnectionConsumer |
createSharedDurableConnectionConsumer(javax.jms.Topic topic,
String subscriptionName,
String messageSelector,
javax.jms.ServerSessionPool sessionPool,
int maxMessages) |
String |
getClientID()
Forbidden call on an application or component's outbound connection,
throws a
IllegalStateException instance. |
javax.jms.ExceptionListener |
getExceptionListener()
Forbidden call on an application or component's outbound connection,
throws a
IllegalStateException instance. |
String |
getJMXBeanName(javax.jms.XAConnection cnx) |
javax.jms.ConnectionMetaData |
getMetaData()
Delegates the call to the wrapped JMS connection.
|
int |
getNumberOfSession() |
String[] |
getSessions() |
String |
registerMBean() |
void |
setClientID(String clientID)
Forbidden call on an application or component's outbound connection,
throws a
IllegalStateException instance. |
void |
setExceptionListener(javax.jms.ExceptionListener listener)
Forbidden call on an application or component's outbound connection,
throws a
IllegalStateException instance. |
void |
start()
Delegates the call to the wrapped JMS connection.
|
void |
stop()
Forbidden call on an application or component's outbound connection,
throws a
IllegalStateException instance. |
String |
toString() |
void |
unregisterMBean() |
public static org.objectweb.util.monolog.api.Logger logger
ManagedConnectionImpl managedCx
javax.jms.XAConnection xac
boolean valid
true
if this "handle" is valid.Vector sessions
OutboundConnection(ManagedConnectionImpl managedCx, javax.jms.XAConnection xac)
OutboundConnection
instance.managedCx
- The managed connection building the handle.xac
- The underlying physical connection to handle.public void setClientID(String clientID) throws javax.jms.JMSException
IllegalStateException
instance.setClientID
in interface javax.jms.Connection
javax.jms.JMSException
public void setExceptionListener(javax.jms.ExceptionListener listener) throws javax.jms.JMSException
IllegalStateException
instance.setExceptionListener
in interface javax.jms.Connection
javax.jms.JMSException
public javax.jms.Session createSession(boolean transacted, int acknowledgeMode) throws javax.jms.JMSException
OutboundSession
instance.createSession
in interface javax.jms.Connection
javax.jms.IllegalStateException
- If the handle is invalid.javax.jms.JMSException
- Generic exception.public String getClientID() throws javax.jms.JMSException
IllegalStateException
instance.getClientID
in interface javax.jms.Connection
javax.jms.JMSException
public javax.jms.ConnectionMetaData getMetaData() throws javax.jms.JMSException
getMetaData
in interface javax.jms.Connection
javax.jms.IllegalStateException
- If the handle is invalid.javax.jms.JMSException
- Generic exception.public javax.jms.ExceptionListener getExceptionListener() throws javax.jms.JMSException
IllegalStateException
instance.getExceptionListener
in interface javax.jms.Connection
javax.jms.JMSException
public void start() throws javax.jms.JMSException
start
in interface javax.jms.Connection
javax.jms.IllegalStateException
- If the handle is invalid.javax.jms.JMSException
- Generic exception.public void stop() throws javax.jms.JMSException
IllegalStateException
instance.stop
in interface javax.jms.Connection
javax.jms.JMSException
public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Destination destination, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException
IllegalStateException
instance.createConnectionConsumer
in interface javax.jms.Connection
javax.jms.JMSException
public javax.jms.ConnectionConsumer createDurableConnectionConsumer(javax.jms.Topic topic, String subscriptionName, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException
IllegalStateException
instance.createDurableConnectionConsumer
in interface javax.jms.Connection
javax.jms.JMSException
public void close() throws javax.jms.JMSException
close
in interface AutoCloseable
close
in interface javax.jms.Connection
close
in interface OutboundConnectionMBean
javax.jms.IllegalStateException
- If the handle is invalid.javax.jms.JMSException
- Generic exception.public boolean cnxEquals(Object obj)
true
if the
parameter is a Connection
instance sharing the same
proxy identifier and connection key.public void cleanup()
public String getJMXBeanName(javax.jms.XAConnection cnx)
public String registerMBean()
public void unregisterMBean()
public int getNumberOfSession()
getNumberOfSession
in interface OutboundConnectionMBean
public String[] getSessions()
getSessions
in interface OutboundConnectionMBean
public javax.jms.Session createSession(int sessionMode) throws javax.jms.JMSException
createSession
in interface javax.jms.Connection
javax.jms.JMSException
public javax.jms.Session createSession() throws javax.jms.JMSException
createSession
in interface javax.jms.Connection
javax.jms.JMSException
public javax.jms.ConnectionConsumer createSharedConnectionConsumer(javax.jms.Topic topic, String subscriptionName, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException
createSharedConnectionConsumer
in interface javax.jms.Connection
javax.jms.JMSException
public javax.jms.ConnectionConsumer createSharedDurableConnectionConsumer(javax.jms.Topic topic, String subscriptionName, String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException
createSharedDurableConnectionConsumer
in interface javax.jms.Connection
javax.jms.JMSException
Copyright © 2018 ScalAgent D.T.. All Rights Reserved.