|
JBoss API: Class JmsManagedConnection
org.jboss.jms.ra
|
Constructor Summary | |
JmsManagedConnection(JmsManagedConnectionFactory mcf,
javax.resource.spi.ConnectionRequestInfo info,
java.lang.String user,
java.lang.String pwd)
Create a JmsManagedConnection. |
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()
Cleans up the, from the spec - The cleanup of ManagedConnection instance resets its client specific state. |
void |
destroy()
Destroy the physical connection. |
java.lang.Object |
getConnection(javax.security.auth.Subject subject,
javax.resource.spi.ConnectionRequestInfo info)
Get the physical connection handler. |
protected javax.resource.spi.ConnectionRequestInfo |
getInfo()
Get the request info for this connection. |
javax.resource.spi.LocalTransaction |
getLocalTransaction()
Get the location transaction for the connection. |
protected JmsLogger |
getLogger()
Get the logger for this connection. |
java.io.PrintWriter |
getLogWriter()
Get the log writer for this connection. |
protected JmsManagedConnectionFactory |
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 for this connection. |
javax.transaction.xa.XAResource |
getXAResource()
Get the XAResource for the connection. |
void |
removeConnectionEventListener(javax.resource.spi.ConnectionEventListener l)
Remove a connection event listener. |
protected void |
removeHandle(JmsSession 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 for this connection. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JmsManagedConnection(JmsManagedConnectionFactory mcf, javax.resource.spi.ConnectionRequestInfo info, java.lang.String user, java.lang.String pwd) throws javax.resource.ResourceException
mcf
- info
- user
- pwd
- javax.resource.ResourceException
- Method Detail |
public java.lang.Object getConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo info) throws javax.resource.ResourceException
This bummer will be called in two situations:
It may also be called multiple time without a cleanup, to support connection sharing.
getConnection
in interface javax.resource.spi.ManagedConnection
subject
- info
- javax.resource.ResourceException
- public 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
public void associateConnection(java.lang.Object obj) throws javax.resource.ResourceException
associateConnection
in interface javax.resource.spi.ManagedConnection
obj
- An object of type JmsSession.javax.resource.ResourceException
- Failed to associate connection.javax.resource.spi.IllegalStateException
- ManagedConnection in an illegal state.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
- public javax.resource.spi.ManagedConnectionMetaData getMetaData() throws javax.resource.ResourceException
getMetaData
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
- javax.resource.spi.IllegalStateException
- ManagedConnection already destroyed.public void setLogWriter(java.io.PrintWriter out) throws javax.resource.ResourceException
setLogWriter
in interface javax.resource.spi.ManagedConnection
out
- The log writer for this connection.javax.resource.ResourceException
- public java.io.PrintWriter getLogWriter() throws javax.resource.ResourceException
getLogWriter
in interface javax.resource.spi.ManagedConnection
protected javax.jms.Session getSession()
protected JmsLogger getLogger()
protected void sendEvent(javax.resource.spi.ConnectionEvent event)
event
- The event to send.protected void removeHandle(JmsSession handle)
handle
- The handle to remove.protected javax.resource.spi.ConnectionRequestInfo getInfo()
protected JmsManagedConnectionFactory getManagedConnectionFactory()
protected java.lang.String getUserName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |