@@ -0,0 +1,1789 @@
+/*%0A * Copyright (c) 2010, Paul Merlin. All Rights Reserved.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A *%0A */%0A%0Apackage org.n0pe.asadmin.commands;%0A%0Aimport org.n0pe.asadmin.AbstractAsAdminCmd;%0A%0A/**%0A *%0A * @author Christophe Souvignier%0A * This method enable DAS for remote admin console access on Glassfish v3%0A *%0A */%0Apublic class EnableSecureAdmin extends AbstractAsAdminCmd %7B%0A%0A    public static final String ENABLE_SECURE_ADMIN = %22enable-secure-admin%22;%0A    public static final String ADMIN_ALIAS = %22--adminalias%22;%0A    public static final String INSTANCE_ALIAS = %22--instancealias%22;%0A    private String adminAlias = %22s1as%22;%0A    private String instanceAlias = %22s1as%22;%0A%0A    public EnableSecureAdmin withAdminAlias( String adminAlias )%0A    %7B%0A        this.adminAlias = adminAlias;%0A        return this;%0A    %7D%0A%0A    public EnableSecureAdmin withInstanceAlias( String instanceAlias )%0A    %7B%0A        this.instanceAlias = instanceAlias;%0A        return this;%0A    %7D%0A%0A    public boolean needCredentials() %7B%0A        return true;%0A    %7D%0A%0A    public String getActionCommand() %7B%0A        return ENABLE_SECURE_ADMIN;%0A    %7D%0A%0A    public String%5B%5D getParameters() %7B%0A        final String%5B%5D params;%0A        params = new String%5B%5D%7B ADMIN_ALIAS, adminAlias, INSTANCE_ALIAS,  instanceAlias%7D;%0A        return params;%0A    %7D%0A%0A%7D%0A

Add new glassfish v3 command. This command allow to enable DAS mode.