org.jboss.test.jca.adapter
Class TestConnection

java.lang.Object
  extended byorg.jboss.test.jca.adapter.TestConnection
All Implemented Interfaces:
Connection (src)

public class TestConnection
extends java.lang.Object
implements Connection (src)

TestConnection.java Created: Sun Mar 10 19:35:48 2002


Constructor Summary
TestConnection(TestManagedConnection (src)  mc)
           
 
Method Summary
 void close()
          Closes a connection
 Interaction (src) createInteraction()
          Creates a new interaction associated with this connection.
 void fireConnectionError()
           
 LocalTransaction (src) getLocalTransaction()
          Gets a LocalTransaction object which allows the client to manage local transactions for the connection.
 TestManagedConnection (src) getMC()
           
 ConnectionMetaData (src) getMetaData()
          Gets meta data for the underlying resource represented by this connection.
 ResultSetInfo (src) getResultSetInfo()
          Gets information on ResultSet functionality supported by the underlying resource for the connection.
 boolean isInTx()
           
 void setFailInCommit(boolean fail, int xaCode)
           
 void setFailInPrepare(boolean fail, int xaCode)
           
 void simulateConnectionError()
          Similate a connection error
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestConnection

public TestConnection(TestManagedConnection (src)  mc)
Method Detail

setFailInPrepare

public void setFailInPrepare(boolean fail,
                             int xaCode)

setFailInCommit

public void setFailInCommit(boolean fail,
                            int xaCode)

fireConnectionError

public void fireConnectionError()

isInTx

public boolean isInTx()

close

public void close()
Description copied from interface: Connection (src)
Closes a connection

Specified by:
close in interface Connection (src)
Throws:
ResourceException (src) -

getMC

public TestManagedConnection (src)  getMC()

createInteraction

public Interaction (src)  createInteraction()
                              throws ResourceException (src) 
Description copied from interface: Connection (src)
Creates a new interaction associated with this connection.

Specified by:
createInteraction in interface Connection (src)
Returns:
Throws:
ResourceException (src) -

getLocalTransaction

public LocalTransaction (src)  getLocalTransaction()
                                     throws ResourceException (src) 
Description copied from interface: Connection (src)
Gets a LocalTransaction object which allows the client to manage local transactions for the connection.

Specified by:
getLocalTransaction in interface Connection (src)
Returns:
Throws:
ResourceException (src) -

getMetaData

public ConnectionMetaData (src)  getMetaData()
                               throws ResourceException (src) 
Description copied from interface: Connection (src)
Gets meta data for the underlying resource represented by this connection.

Specified by:
getMetaData in interface Connection (src)
Returns:
Throws:
ResourceException (src) -

getResultSetInfo

public ResultSetInfo (src)  getResultSetInfo()
                               throws ResourceException (src) 
Description copied from interface: Connection (src)
Gets information on ResultSet functionality supported by the underlying resource for the connection.

Specified by:
getResultSetInfo in interface Connection (src)
Returns:
Throws:
ResourceException (src) -

simulateConnectionError

public void simulateConnectionError()
                             throws java.lang.Exception
Similate a connection error

Throws:
java.lang.Exception