public void execute(AdminCommandContext ctxt) { command.execute(ctxt); }
AdminCommand cmd = cmdMgr.createCommand("createCluster"); //gotoStep CommandStep step = ((TaskCommand) cmd).gotoStep("clusterConfig"); step.setParameter("clusterName", ClusterName); step.setParameter("preferLocal", true); cmd.setConfigSession(session); cmd.execute();
@Override public Void run() { try { if (origCL != ccl) { thread.setContextClassLoader(ccl); } otherWrappedCommand.execute(progressHelper.wrapContext4MainCommand(context)); return null; } finally { if (origCL != ccl) { thread.setContextClassLoader(origCL); } } }
@Override public Void run() { try { if (origCL != ccl) { thread.setContextClassLoader(ccl); } otherWrappedCommand.execute(progressHelper.wrapContext4MainCommand(context)); return null; } finally { if (origCL != ccl) { thread.setContextClassLoader(origCL); } } }
@Override public void execute(AdminCommandContext ctxt) { Thread thread = Thread.currentThread(); ClassLoader origCL = thread.getContextClassLoader(); ClassLoader ccl = sc.getCommonClassLoader(); if (progressStatus != null) { ctxt = new AdminCommandContextForInstance(ctxt, progressStatus); } if (origCL != ccl) { try { thread.setContextClassLoader(ccl); if (command instanceof AdminCommandSecurity.Preauthorization) { ((AdminCommandSecurity.Preauthorization) command).preAuthorization(ctxt); } command.execute(ctxt); } finally { thread.setContextClassLoader(origCL); } } else { if (command instanceof AdminCommandSecurity.Preauthorization) { ((AdminCommandSecurity.Preauthorization) command).preAuthorization(ctxt); } command.execute(ctxt); } }
public void restartDomain() { final ModulesRegistry registry = InjectedValues.getInstance().getModulesRegistry(); final AdminCommandContext ctx = new AdminCommandContextImpl(AMXLoggerInfo.getLogger(), new PlainTextActionReporter()); final AdminCommand cmd = new RestartDomainCommand(registry); cmd.execute(ctx); }