Examples of VaultJBossASClient


Examples of org.rhq.common.jbossas.client.controller.VaultJBossASClient

     * @throws Exception
     */
    public static void createObfuscationVault(ModelControllerClient mcc, HashMap<String, String> serverProperties)
        throws Exception {

        final VaultJBossASClient client = new VaultJBossASClient(mcc);

        if (!client.isVault()) {
            ModelNode request = client.createNewVaultRequest(PropertyObfuscationVault.class.getName());
            ModelNode results = client.execute(request);
            if (!VaultJBossASClient.isSuccess(results)) {
                String vaultClass = client.getVaultClass();
                if (PropertyObfuscationVault.class.getName().equals(vaultClass)) {
                    LOG.info("RHQ Vault already configured, vault detected on the second read attempt");
                } else {
                    throw new FailureException(results, "Failed to create the RHQ vault");
                }
            } else {
                LOG.info("RHQ Vault created");
            }
        } else {
            String vaultClass = client.getVaultClass();
            if (PropertyObfuscationVault.class.getName().equals(vaultClass)) {
                LOG.info("RHQ vault already configured, skipping the creation process");
            } else {
                throw new FailureException("Failed to create the RHQ vault; a different vault is already configured");
            }
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.