com.sun.enterprise.admin.monitor.stats
Interface JTAStats

All Superinterfaces:
JTAStats, Stats

public interface JTAStats
extends JTAStats

Defines additional Sun ONE Application Server specific statistic to transaction service.

Since:
S1AS8.0
Version:
$Revision: 1.4 $
Author:
Kedar Mhaswade

Method Summary
 void freeze()
          Freezes the transaction subsystem.
 StringStatistic getActiveIds()
          Returns the IDs of the transactions that are currently active, as a StrignStatistic.
 StringStatistic getState()
          Returns the current state of the transaction service as a StringStatistic.
 Boolean isRecoveryRequired()
          Utility method to find out if in place recovery is required.
 List<Map<String,String>> listActiveTransactions()
          Rolls back the given transactions.
 String rollback(String txnId)
          Rolls back a given transaction.
 void unfreeze()
          Unfreezes the transaction subsystem.
 
Methods inherited from interface org.glassfish.j2ee.statistics.JTAStats
getActiveCount, getCommittedCount, getRolledbackCount
 
Methods inherited from interface org.glassfish.j2ee.statistics.Stats
getStatistic, getStatisticNames, getStatistics
 

Method Detail

getActiveIds

StringStatistic getActiveIds()
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.

Returns:
a comma separated String of IDs
See Also:
JTAStats.getActiveCount()

getState

StringStatistic getState()
Returns the current state of the transaction service as a StringStatistic.

Returns:
String representing the current state of the transaction service.

freeze

void freeze()
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.


unfreeze

void unfreeze()
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.


rollback

String rollback(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.

Parameters:
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.
Returns:
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".

listActiveTransactions

List<Map<String,String>> listActiveTransactions()
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.

Parameters:
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.
Returns:
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);

isRecoveryRequired

Boolean isRecoveryRequired()
Utility method to find out if in place recovery is required.

Returns:
true if the recovery is required, else false


Copyright © 2012. All Rights Reserved.