FileDocCategorySizeDatePackage
TransactionsRecoveryEventListenerImpl.javaAPI DocGlassfish v2 API3664Fri May 04 22:35:58 BST 2007com.sun.enterprise.transaction

TransactionsRecoveryEventListenerImpl

public class TransactionsRecoveryEventListenerImpl extends Object implements com.sun.enterprise.admin.event.tx.TransactionsRecoveryEventListener

Fields Summary
private static com.sun.enterprise.util.i18n.StringManager
sm
Constructors Summary
Methods Summary
public voidprocessEvent(com.sun.enterprise.admin.event.tx.TransactionsRecoveryEvent event)
Recovers taransactions for given instance

param
event - TransactionsRecoveryEvent containing data to recovery



                    
        
   
       // System.out.println("====>TransactionsRecoveryEventListener.processEvent"+
       //     "request for recovery transactions on server="+
       //     event.getServerName() + " logDir=" + event.getLogDir());

        String currentServer = ApplicationServer.getServerContext().getInstanceName();

        boolean delegated = (!currentServer.equals(event.getServerName()));

        //call recover method.
        try {
            JTSMonitorMBean.recover(delegated, event.getLogDir());
        } catch (Exception ex) {
            if (ex.getMessage() != null)
                throw new AdminEventListenerException(ex.getMessage());
            else
                throw new AdminEventListenerException(sm.getString("transaction.unexpected_exception_in_recover-transactions"));
        }