public synchronized void run() {
bc.addServiceListener(this);
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
CommandGroup cg;
if (commandGroupRef != null) {
cg = (CommandGroup) bc.getService(commandGroupRef);
if (cg == null) {
status = -2;
return null;
}
} else {
cg = sessionCommandGroup;
}
if (out instanceof PrintWriter) {
status = cg.execute(args, in, (PrintWriter) out, session);
} else {
status = cg.execute(args, in, new PrintWriter(out), session);
}
if (commandGroupRef != null) {
try {
bc.ungetService(commandGroupRef);
} catch (IllegalStateException ignore) {