public class VistaLinkManagedConnection extends Object implements ManagedConnection
| Modifier | Constructor and Description |
|---|---|
protected |
VistaLinkManagedConnection(VistaLinkManagedConnectionFactory mcf,
long distinguishedIdentifier)
Constructs this instance of the managed connection.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addConnectionEventListener(ConnectionEventListener listener)
Adds a connection event listener to the event notifier for this managed
connection
|
void |
associateConnection(Object connection)
Used by the container to change the association of an application-level
connection handle with a ManagedConnection instance.
|
void |
cleanup()
Application server calls this method to force any cleanup on the
ManagedConnection instance.
|
void |
closeHandle(VistaLinkConnection con)
Closes the associated connection handle.
|
void |
destroy()
Destroys the physical socket connection to M.
|
void |
disassociateConnection(VistaLinkConnectionImpl con)
Disassociates this instance of VistaLinkManagedConnection from the
VistaLinkConnection handle
|
boolean |
equals(Object obj)
This implementation has changed for app server see hashCode->toString
|
VistaLinkResponseVO |
executeInteraction(VistaLinkRequestVO requestVO,
VistaLinkResponseFactory responseFactory)
Executes an interaction with M and returns a response constructed by the
specified response factory
|
RpcResponse |
executeRPC(RpcRequest request)
Executes an interaction with the RpcResponseFactory
|
protected VistaLinkSystemInfoResponse |
executeSystemInfoInteraction() |
VistaLinkResponseVO |
executeSystemInteraction(VistaLinkRequestVO requestVO)
Executes an interaction and returns a response from the default response
factory.
|
String |
getAccessCode() |
protected EMAdapterEnvironment |
getAdapterEnvironment() |
Object |
getConnection(Subject subject,
ConnectionRequestInfo connReqInfo)
Creates a new connection handle for this ManagedConnection instance.
|
ConnectionMetaData |
getConnectionMetaData()
Delegated from VistaLinkConnection class to return connection oriented
metadata
|
VistaLinkConnectionRequestInfo |
getConnReqInfo() |
String |
getConnReqInfoString() |
protected long |
getHeartBeatRate() |
InetAddress |
getHostAddr()
Returns the hostAddr.
|
int |
getHostPort()
Returns the hostPort.
|
long |
getLastInteractionTimeMillis() |
protected long |
getLastTimeRpcExecutedMillis() |
LocalTransaction |
getLocalTransaction()
This method is not supported and will throw a NotSupportedException
|
PrintWriter |
getLogWriter() |
protected VistaLinkManagedConnectionFactory |
getManagedConnectionFactory() |
int |
getMaxConnectionHandles()
Returns the maxConnectionHandles.
|
ManagedConnectionMetaData |
getMetaData()
Returns information about this managed connection
|
protected String |
getMJob() |
protected long |
getReAuthSessionTimeout() |
protected EMReAuthState |
getReAuthState() |
protected VistaSocketConnection |
getSocketConnection()
Returns the socketCon for this managed connection
|
protected long |
getSocketTimeOut() |
String |
getVerifyCode() |
XAResource |
getXAResource()
Returns distributed transaction resource, not supported
|
int |
hashCode()
return cached hashcode
|
protected boolean |
isConnectionHandleAvailable()
Returns true if number of Connection Handles of this instance of the
VistaLinkManagedCoonection is less than the Max number allotted
|
boolean |
isValid() |
void |
notifyErrorOccurred(Exception e)
Notifies event listeners(Application server) that an error has occurred on
this managed connection instance.
|
void |
removeConnectionEventListener(ConnectionEventListener listener)
Removes a connection event listener from the event notifier for this managed
connection
|
void |
setLastInteractionTimeMillis(long lastinteractiontimemillis)
Sets the last interaction time in milliseconds.
|
void |
setLogWriter(PrintWriter wr) |
protected void |
setMJob(String mJob) |
protected void |
setReAuthSessionTimeout(long reAuthSessionTimeout) |
protected void |
setReAuthState(EMReAuthState reAuthState) |
void |
setSocketTimeOut(long socketTimeOut)
Sets the socket timeout to the value of parameter.
|
void |
setValid(boolean valid)
Sets the indicator on whether this managed connectioin is a valid connection
to an M server.
|
String |
toString() |
protected VistaLinkManagedConnection(VistaLinkManagedConnectionFactory mcf, long distinguishedIdentifier) throws VistaLinkResourceException
mcf - - the managed connection factory that created this managed
connectionVistaLinkResourceExceptionpublic void addConnectionEventListener(ConnectionEventListener listener)
addConnectionEventListener in interface ManagedConnectionlistener - - the ConnectionEventListener to addManagedConnection.addConnectionEventListener(javax.resource.spi.ConnectionEventListener)public void removeConnectionEventListener(ConnectionEventListener listener)
removeConnectionEventListener in interface ManagedConnectionlistener - - the ConnectionEventListener to removeManagedConnection.removeConnectionEventListener(javax.resource.spi.ConnectionEventListener)protected boolean isConnectionHandleAvailable()
public void associateConnection(Object connection) throws ResourceException
associateConnection in interface ManagedConnectionconnection - Application-level connection handleResourceExceptionManagedConnection.associateConnection(java.lang.Object)public void disassociateConnection(VistaLinkConnectionImpl con)
con - public void cleanup()
throws ResourceException
ManagedConnection should be cleaned-up to the initial state that is was before getConnection() was called on this object and be ready to be returned to the connection pool.
cleanup in interface ManagedConnectionResourceExceptionManagedConnection.cleanup()public final void destroy()
throws ResourceException
destroy in interface ManagedConnectionVistaLinkResourceExceptionResourceExceptionManagedConnection.destroy()public void closeHandle(VistaLinkConnection con) throws ResourceException
con - ResourceExceptionpublic Object getConnection(Subject subject, ConnectionRequestInfo connReqInfo) throws ConnectionHandlesExceededException, ResourceException
getConnection in interface ManagedConnectionsubject - security context as JAAS subjectconnReqInfo - ConnectionRequestInfo instanceVistaLinkResourceExceptionConnectionHandlesExceededException - thrown if there are no more
allowable connection handlesResourceExceptionManagedConnection.getConnection(javax.security.auth.Subject,
javax.resource.spi.ConnectionRequestInfo)public LocalTransaction getLocalTransaction()
throws ResourceException
getLocalTransaction in interface ManagedConnectionResourceExceptionManagedConnection.getLocalTransaction()public ManagedConnectionMetaData getMetaData()
throws ResourceException
getMetaData in interface ManagedConnectionResourceExceptionManagedConnection.getMetaData()public ConnectionMetaData getConnectionMetaData()
throws ResourceException
ResourceExceptionpublic XAResource getXAResource() throws ResourceException
getXAResource in interface ManagedConnectionResourceExceptionManagedConnection.getXAResource()protected final VistaLinkManagedConnectionFactory getManagedConnectionFactory()
public void setLogWriter(PrintWriter wr) throws ResourceException
setLogWriter in interface ManagedConnectionResourceExceptionManagedConnection.setLogWriter(java.io.PrintWriter)public PrintWriter getLogWriter() throws ResourceException
getLogWriter in interface ManagedConnectionResourceExceptionManagedConnection.getLogWriter()public final int getMaxConnectionHandles()
public final InetAddress getHostAddr()
public final int getHostPort()
public RpcResponse executeRPC(RpcRequest request) throws VistaLinkFaultException, FoundationsException
request - VistaLinkFaultExceptionFoundationsExceptionpublic final VistaLinkResponseVO executeInteraction(VistaLinkRequestVO requestVO, VistaLinkResponseFactory responseFactory) throws VistaLinkFaultException, FoundationsException
requestVO - responseFactory - VistaLinkFaultExceptionFoundationsExceptionpublic VistaLinkResponseVO executeSystemInteraction(VistaLinkRequestVO requestVO) throws VistaLinkFaultException, FoundationsException
requestVO - VistaLinkFaultExceptionFoundationsExceptionprotected VistaLinkSystemInfoResponse executeSystemInfoInteraction() throws FoundationsException
FoundationsExceptionpublic final void notifyErrorOccurred(Exception e)
protected VistaSocketConnection getSocketConnection()
protected long getSocketTimeOut()
public final void setSocketTimeOut(long socketTimeOut)
socketTimeOut - value of to set timeout in millisecondsVistaSocketExceptionpublic final String toString()
toString in class ObjectObject.toString()protected final EMAdapterEnvironment getAdapterEnvironment()
public long getLastInteractionTimeMillis()
public final void setLastInteractionTimeMillis(long lastinteractiontimemillis)
lastinteractiontimemillis - protected long getLastTimeRpcExecutedMillis()
protected final long getHeartBeatRate()
protected final String getMJob()
protected final void setMJob(String mJob)
mJob - The M $JOB for the connection.protected long getReAuthSessionTimeout()
protected final void setReAuthSessionTimeout(long reAuthSessionTimeout)
reAuthSessionTimeout - The reAuthSessionTimeout to set.public final boolean isValid()
public final void setValid(boolean valid)
valid - public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()public final String getAccessCode()
public final String getVerifyCode()
public VistaLinkConnectionRequestInfo getConnReqInfo()
public String getConnReqInfoString()
protected EMReAuthState getReAuthState()
protected final void setReAuthState(EMReAuthState reAuthState)
reAuthState - The reAuthState to set.Copyright © 2026. All rights reserved.