|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.j2ee.k2.BlasterManagedConnection
public class BlasterManagedConnection
ManagedConnection for xmlBlaster.
The way I have interpreted the spec it is possible for one ManagedConection to hold one physical connection and no more.
We now support connection sharing.
This is the old note about it: This might not be totaly spec compliant, since it does not support connection sharing. However, according to a mail on the Connector list from the lead spec writer, one way to be spec compliant without support for connection sharing is throwing an exception in getConnection if there already is one active. This will also happen in asociatConnection. This is the way it is done here. Comment: this is NOT the way it is implemented int JBoss, therefore we need to suppport connection sharing!
This mc now supports the session based login.
Field Summary | |
---|---|
(package private) Global |
clonedGlob
|
(package private) boolean |
closed
|
private java.util.Set |
handles
Holds all current BlasterConnectionImpl handles. |
(package private) boolean |
isDestroyed
|
(package private) java.util.Vector |
listeners
|
(package private) java.io.PrintWriter |
logWriter
|
(package private) BlasterManagedConnectionFactory |
mcf
|
(package private) java.lang.String |
me
|
(package private) I_XmlBlasterAccess |
physicalPipe
|
(package private) java.lang.String |
pwd
|
(package private) java.lang.String |
user
|
Constructor Summary | |
---|---|
BlasterManagedConnection(BlasterManagedConnectionFactory mcf,
java.lang.String user,
java.lang.String pwd)
|
Method Summary | |
---|---|
void |
addConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
|
void |
associateConnection(java.lang.Object obj)
Move a handler from one mc to this one |
void |
cleanup()
Cleans up the connection. |
void |
destroy()
Destroy the physical connection |
private void |
destroyHandles()
Destroy all handles. |
private void |
doLogin()
|
(package private) I_XmlBlasterAccess |
getBlasterConnection()
|
java.lang.Object |
getConnection(javax.security.auth.Subject subject,
javax.resource.spi.ConnectionRequestInfo info)
Get the physical connection handler. |
(package private) I_XmlBlasterAccess |
getFailoverBlasterConnection()
This is used both internaly and by handles. |
(package private) Global |
getGlobal()
|
javax.resource.spi.LocalTransaction |
getLocalTransaction()
|
java.io.PrintWriter |
getLogWriter()
|
(package private) BlasterManagedConnectionFactory |
getManagedConnectionFactory()
|
javax.resource.spi.ManagedConnectionMetaData |
getMetaData()
|
(package private) java.lang.String |
getUserName()
|
javax.transaction.xa.XAResource |
getXAResource()
|
(package private) void |
handleClose(BlasterConnection impl)
|
(package private) void |
handleError(BlasterConnection impl,
java.lang.Exception ex)
|
void |
removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
|
(package private) void |
removeHandle(BlasterConnectionImpl handle)
|
void |
setLogWriter(java.io.PrintWriter out)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
BlasterManagedConnectionFactory mcf
java.lang.String user
java.lang.String pwd
I_XmlBlasterAccess physicalPipe
java.io.PrintWriter logWriter
boolean isDestroyed
boolean closed
java.lang.String me
java.util.Vector listeners
Global clonedGlob
private java.util.Set handles
Constructor Detail |
---|
public BlasterManagedConnection(BlasterManagedConnectionFactory mcf, java.lang.String user, java.lang.String pwd) throws javax.resource.ResourceException
javax.resource.ResourceException
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
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.
1. When a new mc has bean created and a connection is needed
2. When an mc has been fetched from the pool (returned in match*)
It may also be called multiple time without a cleanup, to support connection sharing.
getConnection
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
private void destroyHandles() throws javax.resource.ResourceException
javax.resource.ResourceException
- Failed to close one or more handles.public void destroy() throws javax.resource.ResourceException
destroy
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
public void cleanup() throws javax.resource.ResourceException
cleanup
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
public void associateConnection(java.lang.Object obj) throws javax.resource.ResourceException
associateConnection
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
public void addConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
addConnectionEventListener
in interface javax.resource.spi.ManagedConnection
public void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
removeConnectionEventListener
in interface javax.resource.spi.ManagedConnection
public javax.transaction.xa.XAResource getXAResource() throws javax.resource.ResourceException
getXAResource
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
public 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
public void setLogWriter(java.io.PrintWriter out) throws javax.resource.ResourceException
setLogWriter
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
public java.io.PrintWriter getLogWriter() throws javax.resource.ResourceException
getLogWriter
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
void removeHandle(BlasterConnectionImpl handle)
I_XmlBlasterAccess getBlasterConnection() throws XmlBlasterException
XmlBlasterException
I_XmlBlasterAccess getFailoverBlasterConnection() throws XmlBlasterException
XmlBlasterException
void handleClose(BlasterConnection impl)
void handleError(BlasterConnection impl, java.lang.Exception ex)
java.lang.String getUserName()
BlasterManagedConnectionFactory getManagedConnectionFactory()
Global getGlobal()
private void doLogin() throws javax.resource.spi.CommException
javax.resource.spi.CommException
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |