FileDocCategorySizeDatePackage
TransactionServiceManagerMBean.javaAPI DocGlassfish v2 API6986Fri May 04 22:24:10 BST 2007com.sun.enterprise.admin.mbeans

TransactionServiceManagerMBean

public class TransactionServiceManagerMBean extends com.sun.enterprise.admin.config.BaseConfigMBean
object name for this mbean: :type=transaction-service-manager,category=config Based on the target calls the appropriate mbean
author
sridatta

Fields Summary
private static final com.sun.enterprise.admin.target.TargetType[]
VALID_TARGET_TYPES
private static final com.sun.enterprise.util.i18n.StringManager
_strMgr
public static final Logger
_logger
Constructors Summary
public TransactionServiceManagerMBean()

        
     
    
        super();
    
Methods Summary
private voidfinest(java.lang.String s)

       _logger.finest("TransactionServiceManagerMBean: " + s); 
   
public voidfreeze(java.lang.String serverName)

          finest("freeze called for target: " + serverName);
          validateServerName(serverName);
          try {
                  getMBS().invoke(getTransactionServiceObjectName(serverName), "freeze", null, null);
          } catch(javax.management.InstanceNotFoundException  e) {
                 throw new MBeanException(e, _strMgr.getString("admin.mbeans.server_not_running", new Object[] {serverName})); 
          }
      
protected com.sun.enterprise.config.ConfigContextgetConfigContext()

        ConfigContext result = super.getConfigContext();
        if (result == null) {
            result = AdminService.getAdminService().getAdminContext().getAdminConfigContext();
        }
        return result;
    
private javax.management.MBeanServergetMBS()

         return com.sun.enterprise.admin.common.MBeanServerFactory.getMBeanServer();
      
private javax.management.ObjectNamegetTransactionServiceObjectName(java.lang.String server)

          return new ObjectName(
                getDomainName() + 
                ":type=TransactionService,J2EEServer=" 
                + server 
                + ",category=runtime"); 
      
public voidrollback(java.lang.String[] txids, java.lang.String serverName)

          finest("rollback called for target: " + serverName);
          validateServerName(serverName);
          try {
              getMBS().invoke(getTransactionServiceObjectName(serverName), 
                        "rollback", 
                        new Object[] {txids},
                        new String[] {"[Ljava.lang.String;"});
          } catch(javax.management.InstanceNotFoundException  e) {
                 throw new MBeanException(e, _strMgr.getString("admin.mbeans.server_not_running", new Object[] {serverName})); 
          }
      
public voidunfreeze(java.lang.String serverName)

          finest("unfreeze called for target: " + serverName);
          validateServerName(serverName);
          try {
              getMBS().invoke(getTransactionServiceObjectName(serverName), "unfreeze", null, null);
          } catch(javax.management.InstanceNotFoundException  e) {
                 throw new MBeanException(e, _strMgr.getString("admin.mbeans.server_not_running", new Object[] {serverName})); 
          }
      
private voidvalidateServerName(java.lang.String server)

       finest("validating the target " + server);
         final Target target = TargetBuilder.INSTANCE.createTarget(
                VALID_TARGET_TYPES,  
                server, getConfigContext());
         finest("Target is valid: " + server);