Package org.apache.geronimo.deployment.cli

Examples of org.apache.geronimo.deployment.cli.ServerConnection


    @Argument(required = true, description = "Module name")
    String moduleNames;

    @Override
    protected Object doExecute() throws Exception {
        ServerConnection connection = connect();

        AbstractCommand command = new CommandStart();

        BaseCommandArgs args = new BaseCommandArgs(moduleNames.split(" "));
View Full Code Here


@Command(scope = "deploy", name = "list-targets", description = "List targets")
public class ListTargetsCommand extends ConnectCommand {

    @Override
    protected Object doExecute() throws Exception {
        ServerConnection connection = connect();

        AbstractCommand command = new CommandListTargets();

        BaseCommandArgs args = new BaseCommandArgs(new String[1]);
View Full Code Here

     *
     * @return
     * @exception Exception
     */
    protected Object doExecute() throws Exception {
        ServerConnection connection = openConnection(false);
        // Forward to the override
        return doExecute(connection);
    }
View Full Code Here

     * to the target host and use it.
     *
     * @return A ServerConnection object for talking to the target server.
     */
    protected ServerConnection connect() throws Exception {
        ServerConnection connection = (ServerConnection)session.get(SERVER_CONNECTION);

        if (connection == null) {
            connection = openConnection(false);
        }

View Full Code Here

    /**
     * Disconnect the current server connection, if any.
     */
    protected void disconnect() {
        // disconnect the session if there is something set in the command session
        ServerConnection connection = (ServerConnection)session.get(SERVER_CONNECTION);

        if (connection != null) {
            try {
                connection.close();
            }
            catch (Exception e) {
                // ignore
            }
        }
View Full Code Here

     * @exception Exception
     */
    protected ServerConnection openConnection(boolean quiet) throws Exception {
        Kernel kernel = getKernel();
       
        ServerConnection connection;
       
        if (isEmbedded(kernel)) {
            connection = new OfflineServerConnection(kernel, false);
        } else {
            if (!quiet) {
View Full Code Here

    @Argument(description = "Target name")
    List<String> targets;

    @Override
    protected Object doExecute() throws Exception {
        ServerConnection connection = connect();

        AbstractCommand command = new CommandListModules();

        ListModulesCommandArgs args = new ListModulesCommandArgsImpl((targets == null ? new String[0]
                : (String[]) targets.toArray()), all, started, stopped);
View Full Code Here

    @Argument(required = true, multiValued = true, description = "Module name")
    List<String> moduleNames;

    @Override
    protected Object doExecute() throws Exception {
        ServerConnection connection = connect();

        AbstractCommand command = new CommandUndeploy();

        BaseCommandArgs args = new BaseCommandArgs(moduleNames.toArray(new String[moduleNames.size()]));
View Full Code Here

        while (!started) {
            if (timedOut) {
                throw new Exception("Unable to verify if the server was started in the given time");
            }
            ServerConnection connection;
            ServerProxy server = null;
            try {
                connection = connect();
                server = new ServerProxy(((RemoteDeploymentManager)connection.getDeploymentManager()).getJMXConnector());
            } catch (Exception error) {
                log.debug("Server query failed; ignoring", error);
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
View Full Code Here

        println("Geronimo server is started");
        return null;
    }

    protected ServerConnection connect() {
        ServerConnection connection = (ServerConnection) session.get(SERVER_CONNECTION);

        if (connection == null) {
            try {
                connection = openConnection(true);
            } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.geronimo.deployment.cli.ServerConnection

Copyright © 2018 www.massapicom. 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.