dev@glassfish.java.net

Behavior of asadmin stop-instance command

From: Ken <ken.cavanaugh_at_oracle.com>
Date: Mon, 01 Nov 2010 17:22:48 -0700

I don't understand what I am observing with the asadmin stop-instance
command (current build as of around noon
today, rev 42362). I have an orb failover test that runs a number of
requests, then calls (using Runtime.exec)
asadmin stop-instance NAME. I have tested this with and without the
--force true option. In either case, the command
prints out:

The instance, NAME, is stopped.
Command stop-instance executed successfully.

But WITHOUT the --force true option, the server instance PROCESS never
dies: it just stays around in an
odd partially shutdown state, probably with the application shutdown,
causing spurious CORBA errors
(basically looks like the EJB does not exist). This causes my failover
test to fail.

WITH the --force option, everything works correctly: the ORB fails over
to another instance in the cluster,
and stays on the other instance when I bring the shutdown instance back
up with an asadmin start-instance command.
ORB failover is dependent on getting a communication failure with the
instance in order to detect the failover.
I also observe that an instance of the app server is running with a new
PID, so apparently in this case
the process really was destroyed, which is what I require in the
failover test.

Is stop-instance supposed to work this way?
I remember a discussion about (lack of) daemon threads, is this related
to that problem?

Thanks,

Ken.