FileDocCategorySizeDatePackage
JTAStats.javaAPI DocGlassfish v2 API5909Fri May 04 22:25:48 BST 2007com.sun.enterprise.admin.monitor.stats

JTAStats

public interface JTAStats implements javax.management.j2ee.statistics.JTAStats
Defines additional Sun ONE Application Server specific statistic to transaction service.
author
Kedar Mhaswade
since
S1AS8.0
version
$Revision: 1.5 $

Fields Summary
Constructors Summary
Methods Summary
public voidfreeze()
Freezes the transaction subsystem. This operation is advised before an attempt is made to rollback any transactions to avoid the possibility of transaction completion before the rollback request is issued. The transaction subsystem is expected be active before it can be frozen. Calling this methd on an already frozen transaction subsystem has no effect.

public com.sun.enterprise.admin.monitor.stats.StringStatisticgetActiveIds()
Returns the IDs of the transactions that are currently active, as a StrignStatistic. An active transaction is same as an in-flight transaction. Every such transaction can be rolled back after freezing the transaction service.

see
javax.management.j2ee.statistics.JTAStats#getActiveCount
return
a comma separated String of IDs

public com.sun.enterprise.admin.monitor.stats.StringStatisticgetState()
Returns the current state of the transaction service as a StringStatistic.

return
String representing the current state of the transaction service.

public java.lang.BooleanisRecoveryRequired()
Utility method to find out if in place recovery is required.

return
true if the recovery is required, else false

public java.util.ListlistActiveTransactions()
Rolls back the given transactions. It is advisable to call this method when the transaction subsystem is in a frozen state so that transactions won't be completed before this request. It is left to implementation how the transactions are rolled back.

param
String array representing the unique ids of the transactions that need to be frozen. Every transaction that can be rolled back has to be an in flight transaction.
return
String[] containing the status for the given transaction ids. status contains "Successful","Invalid transaction Id or Transaction is over", "Rollback unsuccessful. Current Thread is not associated with the transaction", "Rollback unsuccessful. Unexpected error condition encountered by Transaction Manager". public String[] rollback(String[] txnIds);

public java.lang.Stringrollback(java.lang.String txnId)
Rolls back a given transaction. It is advisable to call this method when the transaction subsystem is in a frozen state so that transactions won't be completed before this request. It is left to implementation how the transactions are rolled back.

param
String representing the unique id of the transaction that needs to be rolled-back. Every transaction that can be rolled back has to be an in flight transaction.
return
String contains the status of the rollback operation for the given txnId. status contains "Rollback successful", "Rollback unsuccessful. Current Thread is not associated with the transaction", "Rollback unsuccessful. Thread is not allowed to rollback the transaction", "Rollback unsuccessful. Unexpected error condition encountered by Transaction Manager".

public voidunfreeze()
Unfreezes the transaction subsystem. It is required to unfreeze the transaction subsystem after it is frozen earlier. Calling this method when system is not active, has no effect.