public class SampleConnection
extends java.lang.Object
implements javax.resource.cci.Connection
Connection
interface, which is a client handle
of the physical connection.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
Copyright statement.
|
Constructor and Description |
---|
SampleConnection(SampleManagedConnection smc)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
This method closes the sample managed connection.
|
javax.resource.cci.Interaction |
createInteraction()
This methods creates a new SampleInteraction.
|
boolean |
getAutoCommit()
This method gets whether auto commit is enabled.
|
javax.resource.cci.LocalTransaction |
getLocalTransaction()
This method gets the local transaction.
|
SampleManagedConnection |
getManagedConnection()
This method provides access to the sample managed connection.
|
javax.resource.cci.ConnectionMetaData |
getMetaData()
This method gets the connections metadata.
|
javax.resource.cci.ResultSetInfo |
getResultSetInfo()
This method gets information on the result set.
|
void |
setAutoCommit(boolean param)
This method sets auto commit.
|
public static final java.lang.String COPYRIGHT
public SampleConnection(SampleManagedConnection smc) throws javax.resource.ResourceException
SampleManagedConnection
- The managed connection.javax.resource.ResourceException
- If a J2EE resource exception is thrown.public SampleManagedConnection getManagedConnection()
public void close() throws javax.resource.ResourceException
close
in interface javax.resource.cci.Connection
javax.resouce.ResourceException
- Raised if the connection cannot close successfully.javax.resource.ResourceException
public javax.resource.cci.Interaction createInteraction() throws javax.resource.ResourceException
createInteraction
in interface javax.resource.cci.Connection
javax.resource.ResourceException
- If the interaction cannot be created.public boolean getAutoCommit() throws javax.resource.ResourceException
javax.resource.ResourceException
Connection getAutoCommit()
public void setAutoCommit(boolean param) throws javax.resource.ResourceException
param
- True if auto commit; false otherwise.javax.resource.ResourceException
- Raised if param is false.public javax.resource.cci.LocalTransaction getLocalTransaction() throws javax.resource.ResourceException
getLocalTransaction
in interface javax.resource.cci.Connection
javax.resource.ResourceException
public javax.resource.cci.ResultSetInfo getResultSetInfo() throws javax.resource.ResourceException
getResultSetInfo
in interface javax.resource.cci.Connection
javax.resource.ResourceException
public javax.resource.cci.ConnectionMetaData getMetaData() throws javax.resource.ResourceException
getMetaData
in interface javax.resource.cci.Connection
javax.resource.ResourceException
- If any exception occured.