com.infoengine.connector
Class IeSPILocalTransaction

java.lang.Object
  extended bycom.infoengine.connector.IeSPILocalTransaction
All Implemented Interfaces:
javax.resource.spi.LocalTransaction

public class IeSPILocalTransaction
extends Object
implements javax.resource.spi.LocalTransaction

SPI LocalTransaction implementation


Field Summary
private  IeConnection cx
           
private  javax.resource.cci.Interaction is
           
private  IeInteractionSpec isSpec
           
private  Log log
           
private  String session_id
           
private  String session_instance
           
private  int state
           
(package private) static int STATE_COMMITTING
           
(package private) static int STATE_EXECUTING
           
(package private) static int STATE_READY
           
(package private) static int STATE_ROLLINGBACK
           
 
Constructor Summary
(package private) IeSPILocalTransaction(IeConnection cx, Log l)
          create a new transaction tied to a connection handle this handle should NOT be closed.
 
Method Summary
 void begin()
          start a new transaction
 void commit()
          commit the current transaction
private  Group execute(String functionName)
          execute a named function on teh "com.infoengine.connector" SOAP class.
(package private)  String getSessionId()
          get this transaction's sessionId (Windchill sessionId to be attached to further interactions in order for them to be transacted).
(package private)  String getSessionInstance()
          get this transaction's sessionInstance (Windchill instance further interactions should be sent to in order for them to be transacted).
(package private)  int getState()
          get the current state of this transaction
private  void resetState()
          reset the state of this transaction to ready and re-initialize sessionId and sessionInstance
 void rollback()
          rollback the current transaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATE_READY

static final int STATE_READY
See Also:
Constant Field Values

STATE_EXECUTING

static final int STATE_EXECUTING
See Also:
Constant Field Values

STATE_COMMITTING

static final int STATE_COMMITTING
See Also:
Constant Field Values

STATE_ROLLINGBACK

static final int STATE_ROLLINGBACK
See Also:
Constant Field Values

log

private Log log

cx

private IeConnection cx

is

private javax.resource.cci.Interaction is

isSpec

private IeInteractionSpec isSpec

state

private int state

session_instance

private String session_instance

session_id

private String session_id
Constructor Detail

IeSPILocalTransaction

IeSPILocalTransaction(IeConnection cx,
                      Log l)
                throws javax.resource.ResourceException
create a new transaction tied to a connection handle this handle should NOT be closed.

Parameters:
cx - connection handle
l - Log
Throws:
javax.resource.ResourceException - if there's a problem interacting with cx
Method Detail

getSessionId

String getSessionId()
get this transaction's sessionId (Windchill sessionId to be attached to further interactions in order for them to be transacted).

Returns:
String

getSessionInstance

String getSessionInstance()
get this transaction's sessionInstance (Windchill instance further interactions should be sent to in order for them to be transacted).

Returns:
String

getState

int getState()
get the current state of this transaction

Returns:
int

resetState

private void resetState()
reset the state of this transaction to ready and re-initialize sessionId and sessionInstance


begin

public void begin()
           throws javax.resource.ResourceException
start a new transaction

Specified by:
begin in interface javax.resource.spi.LocalTransaction
Throws:
javax.resource.ResourceException - if there's a problem interacting with the connection
javax.resource.spi.LocalTransactionException - if in the wrong state

commit

public void commit()
            throws javax.resource.ResourceException
commit the current transaction

Specified by:
commit in interface javax.resource.spi.LocalTransaction
Throws:
javax.resource.ResourceException - if there's a problem interacting with the connection
javax.resource.spi.LocalTransactionException - if in the wrong state

rollback

public void rollback()
              throws javax.resource.ResourceException
rollback the current transaction

Specified by:
rollback in interface javax.resource.spi.LocalTransaction
Throws:
javax.resource.ResourceException - if there's a problem interacting with the connection
javax.resource.spi.LocalTransactionException - if in the wrong state

execute

private Group execute(String functionName)
               throws javax.resource.ResourceException
execute a named function on teh "com.infoengine.connector" SOAP class.

Parameters:
functionName - the function to execute
Returns:
Group results
Throws:
javax.resource.ResourceException - if there's a problem interacting with the connection