dev@glassfish.java.net

Re: Obtaining DAS status

From: Yamini K B <Yamini.Kb_at_Sun.COM>
Date: Thu, 03 Jun 2010 15:35:31 +0530



I'm trying to find out what is the simplest way to check/get the status of DAS? I saw ListDomainsCommand's getStatus() method but the comment from Kedar says it needs to be redone. The comment itself is quite old (2008) so I guess things must've changed now.

It would help if I can get some pointers on which class(es) to look at.

Um, what are you trying to accomplish?  What kind of status are you
looking for and what are you going to do with the results?

I just need to know if DAS running/not running. This is needed for the backup commands (currently the code for this is commented out):

   private boolean isNotRunning() throws CommandValidationException {
        // TODO no status available in V3 yet.

        return true;
        /**
        try {
            ClientPluggableFeatureFactory   cpff  = getFeatureFactory();
            DomainsManager                  dm    = cpff.getDomainsManager();
            DomainConfig                    dc    = getDomainConfig(domainName);
            InstancesManager                im    = dm.getInstancesManager(dc);
            final int                       state = im.getInstanceStatus();

            return state == Status.kInstanceNotRunningCode;
        } catch (Exception e) {
            throw new CommandValidationException(e);
        }
         */
    }


Thanks,
-Yamini