Methods Summary |
---|
public void | afterBegin()
rollbackState = transactionState;
|
public void | afterCompletion(boolean committed)
if (!committed)
transactionState = rollbackState;
|
public void | annotatedInit()
initialized += "YES";
|
public void | beforeCompletion()
beforeCalled = true;
|
public java.lang.String | createAccountId(Customer customer)
return getId() + "." + customer.getName() + "." + (nextAccountId++);
|
public java.lang.String | createCustomerId()
return getId() + "." + (nextCustomerId++);
|
public java.lang.String | getEnvEntryId()
InitialContext jndiContext = new InitialContext();
String value = (String)jndiContext.lookup(ID);
return value;
|
public java.lang.String | getId()
return id;
|
public java.lang.String | getTransactionState()
return transactionState;
|
public void | init()
initialized += "YES";
|
public java.lang.String | interceptCustomerId(java.lang.String customerId)
return customerId;
|
public java.lang.String | isActivated()
return activated;
|
public java.lang.String | isInitialized()
return initialized;
|
public void | remove()
|
public java.lang.String | retrieveCustomerId()
return customerId;
|
public void | storeCustomerId(java.lang.String customerId)
this.customerId = customerId;
|
public void | testResource()
if (customerDb == null) throw new Exception("customerDb resource not set");
Connection connection = customerDb.getConnection();
connection.close();
|
public void | testTransactionTimeout()
try
{
Thread.sleep(2000);
transactionState = "ok";
}
catch (Exception e)
{
e.printStackTrace();
}
|