Package org.jboss.as.cli

Examples of org.jboss.as.cli.CommandContext.terminateSession()


                    executeCommands(ctx);
                }
                executeScripts(ctx);

            } finally {
                ctx.terminateSession();
                ctx.bindClient(null);
            }
        }

    }
View Full Code Here


            response = controllerClient.execute(request);
            outcome = response.get("outcome").asString();
            Assert.assertEquals("Adding mod_cluster subsystem failed! " + request.toJSONString(false), "success", outcome);
        } finally {
            ctx.terminateSession();
        }
    }

    @Test
    @InSequence(2)
View Full Code Here

            request = ctx.buildRequest("/extension=org.jboss.as.modcluster:remove");
            response = controllerClient.execute(request);
            outcome = response.get("outcome").asString();
            Assert.assertEquals("Removing mod_cluster extension failed! " + request.toJSONString(false), "success", outcome);
        } finally {
            ctx.terminateSession();
        }
    }
}
View Full Code Here

            // check that both wars are undeployed
            assertTrue(checkUndeployed(getBaseURL(url) + "deployment0/SimpleServlet"));
            assertTrue(checkUndeployed(getBaseURL(url) + "deployment1/SimpleServlet"));
        } finally {
            ctx.terminateSession();
        }
    }

    @Test
    public void testUnDeployArchive() throws Exception {
View Full Code Here

            // check that both wars are undeployed
            assertTrue(checkUndeployed(getBaseURL(url) + "deployment0/SimpleServlet"));
            assertTrue(checkUndeployed(getBaseURL(url) + "deployment1/SimpleServlet"));
        } finally {
            ctx.terminateSession();
        }
    }

    @AfterClass
    public static void after() throws Exception {
View Full Code Here

            // check that both wars are undeployed
            assertTrue(checkUndeployed(getBaseURL(url) + "deployment0/SimpleServlet"));
            assertTrue(checkUndeployed(getBaseURL(url) + "deployment1/SimpleServlet"));
        } finally {
            ctx.terminateSession();
        }
    }

    @AfterClass
    public static void after() throws Exception {
View Full Code Here

                            throw new IllegalArgumentException(String.format("Command '%s' was unsuccessful. Reason: %s", cmd, Operations.getFailureDescription(result)));
                        }
                    }
                }
            } finally {
                ctx.terminateSession();
            }
        }
    }

    /**
 
View Full Code Here

                cmdCtx.handleSafe(line.trim());
                line = reader.readLine();
            }
        } finally {
            StreamUtils.safeClose(reader);
            cmdCtx.terminateSession();
            _logger.info("CLI session is terminated with exit code '" + cmdCtx.getExitCode() + "'");
        }
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.