public class WmConnection
extends java.lang.Object
implements javax.resource.cci.Connection
Connection
,
WmManagedConnection
Modifier and Type | Field and Description |
---|---|
protected WmConnectionFactory |
_connectionFactory
CCI Connection Factory this connection object was created from.
|
protected boolean |
_isActive
Indicates this connection handle is active.
|
protected boolean |
_isClosed
Indicates this connection handle is closed.
|
protected boolean |
_isInvalid
To invalidate the connection
|
protected WmManagedConnection |
_managedConnection
Managed Connection object this handle refers to.
|
Constructor and Description |
---|
WmConnection()
Creates an un-initialized WmConnection instance.
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Sets the state of this connection handle to active, if the connection handle is not closed.
|
void |
close()
Initiate a close on this connection handle.
|
javax.resource.cci.Interaction |
createInteraction()
Create an interaction
|
void |
deactivate()
Set the state of this connection handle to deactivated.
|
boolean |
getAutoCommit()
Gets the AutoCommit mode for the Connection.
|
WmConnectionFactory |
getFactory()
Get the underlying CCI connection factory this instance was allocated from.
|
javax.resource.cci.LocalTransaction |
getLocalTransaction()
Returns an LocalTransaction instance that enables a component
to demarcate resource manager local transactions on the Connection.
|
WmManagedConnection |
getManagedConnection()
Get the underlying managed connection instance this CCI conection object corresponds to.
|
javax.resource.cci.ConnectionMetaData |
getMetaData()
Returns the information on the underlying EIS instance represented through an active connection.
|
javax.resource.cci.ResultSetInfo |
getResultSetInfo()
Gets the information on the ResultSet functionality
supported by a connected EIS instance.
|
boolean |
isActive()
Returns true if the connection handle is open and active.
|
boolean |
isClosed()
Returns true if the connection handle is closed
|
boolean |
isInvalid() |
void |
setAutoCommit(boolean autoCommit)
Sets the AutoCommit mode for the Connection
|
void |
setClosed()
Set the state of this connection handle to closed.
|
void |
setFactory(WmConnectionFactory factory)
Set the underlying CCI connection factory this instance was allocated from.
|
void |
setInvalidate()
Once invalidated, there will not be any option to
make it valid again.
|
void |
setManagedConnection(WmManagedConnection connection)
Set the underlying managed connection instance this CCI connection object corresponds to.
|
protected WmConnectionFactory _connectionFactory
protected boolean _isActive
protected volatile boolean _isClosed
protected boolean _isInvalid
protected WmManagedConnection _managedConnection
public WmConnection()
public void activate()
public void close() throws javax.resource.ResourceException
close
in interface javax.resource.cci.Connection
javax.resource.ResourceException
- Resource Exception is thrown if there is any problems
closing this handlepublic javax.resource.cci.Interaction createInteraction() throws javax.resource.ResourceException
createInteraction
in interface javax.resource.cci.Connection
javax.resource.ResourceException
public void deactivate()
public boolean getAutoCommit()
public WmConnectionFactory getFactory()
public javax.resource.cci.LocalTransaction getLocalTransaction() throws javax.resource.ResourceException
getLocalTransaction
in interface javax.resource.cci.Connection
javax.resource.ResourceException
public WmManagedConnection getManagedConnection()
public javax.resource.cci.ConnectionMetaData getMetaData() throws javax.resource.ResourceException
getMetaData
in interface javax.resource.cci.Connection
javax.resource.ResourceException
public javax.resource.cci.ResultSetInfo getResultSetInfo()
getResultSetInfo
in interface javax.resource.cci.Connection
public boolean isActive()
public boolean isClosed()
public boolean isInvalid()
public void setAutoCommit(boolean autoCommit)
public void setClosed()
public void setFactory(WmConnectionFactory factory)
factory
- WmConnectionFactory instance that this handle was created from.public void setInvalidate()
public void setManagedConnection(WmManagedConnection connection) throws javax.resource.ResourceException
connection
- WmManagedConnection object accociated with this connection handlejavax.resource.ResourceException
- a Resource Exception is thrown if there is any problems
associating this handle with the underlying Managed Connection instance.WmManagedConnection
Copyright © 2003 - 2021 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.