|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.messaging.ra.JBMManagedConnection
public class JBMManagedConnection
The managed connection
Constructor Summary | |
---|---|
JBMManagedConnection(JBMManagedConnectionFactory mcf,
JBMConnectionRequestInfo cri,
java.lang.String userName,
java.lang.String password)
Constructor |
Method Summary | |
---|---|
void |
addConnectionEventListener(javax.resource.spi.ConnectionEventListener l)
Add a connection event listener. |
void |
associateConnection(java.lang.Object obj)
Move a handler from one mc to this one. |
void |
cleanup()
Cleanup |
void |
destroy()
Destroy the physical connection. |
java.lang.Object |
getConnection(javax.security.auth.Subject subject,
javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
Get a connection |
protected JBMConnectionRequestInfo |
getCRI()
Get the request info for this connection. |
javax.resource.spi.LocalTransaction |
getLocalTransaction()
Get the location transaction for the connection. |
java.io.PrintWriter |
getLogWriter()
Get the log writer -- NOT SUPPORTED |
protected JBMManagedConnectionFactory |
getManagedConnectionFactory()
Get the connection factory for this connection. |
javax.resource.spi.ManagedConnectionMetaData |
getMetaData()
Get the meta data for the connection. |
protected javax.jms.Session |
getSession()
Get the session for this connection. |
protected java.lang.String |
getUserName()
Get the user name |
javax.transaction.xa.XAResource |
getXAResource()
Get the XAResource for the connection. |
protected javax.jms.XASession |
getXASession()
Get the XA session for this connection. |
protected boolean |
isXA()
Is managed connection running in XA mode |
protected void |
lock()
Aqquire a lock on the managed connection |
void |
onException(javax.jms.JMSException exception)
Notifies user of a JMS exception. |
void |
removeConnectionEventListener(javax.resource.spi.ConnectionEventListener l)
Remove a connection event listener. |
protected void |
removeHandle(JBMSession handle)
Remove a handle from the handle map. |
protected void |
sendEvent(javax.resource.spi.ConnectionEvent event)
Send an event. |
void |
setLogWriter(java.io.PrintWriter out)
Set the log writer -- NOT SUPPORTED |
protected void |
tryLock()
Aqquire a lock on the managed connection within the specified period |
protected void |
unlock()
Unlock the managed connection |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JBMManagedConnection(JBMManagedConnectionFactory mcf, JBMConnectionRequestInfo cri, java.lang.String userName, java.lang.String password) throws javax.resource.ResourceException
mcf
- The managed connection factorycri
- The connection request informationuserName
- The user namepassword
- The password
javax.resource.ResourceException
Method Detail |
---|
public java.lang.Object getConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequestInfo) throws javax.resource.ResourceException
getConnection
in interface javax.resource.spi.ManagedConnection
subject
- The security subjectcxRequestInfo
- The request info
javax.resource.ResourceException
- Thrown if an error occurspublic void destroy() throws javax.resource.ResourceException
destroy
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
- Could not property close the session and connection.public void cleanup() throws javax.resource.ResourceException
cleanup
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
- Thrown if an error occurspublic void associateConnection(java.lang.Object obj) throws javax.resource.ResourceException
associateConnection
in interface javax.resource.spi.ManagedConnection
obj
- An object of type JBMSession.
javax.resource.ResourceException
- Failed to associate connection.
javax.resource.spi.IllegalStateException
- ManagedConnection in an illegal state.protected void lock()
protected void tryLock() throws javax.jms.JMSException
javax.jms.JMSException
- Thrown if an error occursprotected void unlock()
public void addConnectionEventListener(javax.resource.spi.ConnectionEventListener l)
addConnectionEventListener
in interface javax.resource.spi.ManagedConnection
l
- The connection event listener to be added.public void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener l)
removeConnectionEventListener
in interface javax.resource.spi.ManagedConnection
l
- The connection event listener to be removed.public javax.transaction.xa.XAResource getXAResource() throws javax.resource.ResourceException
getXAResource
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
- XA transaction not supportedpublic javax.resource.spi.LocalTransaction getLocalTransaction() throws javax.resource.ResourceException
getLocalTransaction
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
- Thrown if operation fails.public javax.resource.spi.ManagedConnectionMetaData getMetaData() throws javax.resource.ResourceException
getMetaData
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
- Thrown if the operation fails.
javax.resource.spi.IllegalStateException
- Thrown if the managed connection already is destroyed.public void setLogWriter(java.io.PrintWriter out) throws javax.resource.ResourceException
setLogWriter
in interface javax.resource.spi.ManagedConnection
out
- The log writer
javax.resource.ResourceException
- If operation failspublic java.io.PrintWriter getLogWriter() throws javax.resource.ResourceException
getLogWriter
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
- If operation failspublic void onException(javax.jms.JMSException exception)
onException
in interface javax.jms.ExceptionListener
exception
- The JMS exceptionprotected boolean isXA()
protected javax.jms.XASession getXASession()
protected javax.jms.Session getSession()
protected void sendEvent(javax.resource.spi.ConnectionEvent event)
event
- The event to send.protected void removeHandle(JBMSession handle)
handle
- The handle to remove.protected JBMConnectionRequestInfo getCRI()
protected JBMManagedConnectionFactory getManagedConnectionFactory()
protected java.lang.String getUserName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |