Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
Bug 1630170 - Set the same properties as jboss-cli-commands.txt (#355)
Browse files Browse the repository at this point in the history
- Allows the installer to write jboss.tx.node.id even if not set at install time
 - Sets jackson.deserialization.whitelist.packages
  • Loading branch information
josejulio authored and spinder committed Oct 5, 2018
1 parent c097b97 commit 1f2860c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
Expand Up @@ -442,6 +442,9 @@ public void install(HashMap<String, String> serverProperties, ServerDetails serv
// create the obfuscation vault
ServerInstallUtil.createObfuscationVault(mcc, serverProperties);

// create system properties
ServerInstallUtil.configureSystemProperties(mcc);

// ensure the server info is up to date and stored in the DB
ServerInstallUtil.setSocketBindings(mcc, serverProperties);

Expand Down
Expand Up @@ -241,11 +241,11 @@ public static void configureTransactionManager(ModelControllerClient mcc, HashMa
client.setDefaultTransactionTimeout(600);
LOG.info("Default transaction timeout set to 600 seconds.");

if(serverProperties.containsKey(ServerProperties.PROP_JBOSS_HA_NODE_ID)) {
String nodeId = buildExpression(ServerProperties.PROP_JBOSS_HA_NODE_ID, serverProperties, true, false, false);
client.setTransactionNodeId(nodeId);
LOG.info("Set high availability nodeId to " + nodeId);
}
// Set expression and its default regardless if a value was specified at install time
final HashMap<String, String> transactionNodeIdDefault = new HashMap();
transactionNodeIdDefault.put(ServerProperties.PROP_JBOSS_HA_NODE_ID, "1");
String nodeId = buildExpression(ServerProperties.PROP_JBOSS_HA_NODE_ID, transactionNodeIdDefault, true, false, false);
client.setTransactionNodeId(nodeId);
}

/**
Expand All @@ -261,6 +261,11 @@ public static void configureDeploymentScanner(ModelControllerClient mcc) throws
LOG.info("Deployment scanner turned off.");
}

public static void configureSystemProperties(ModelControllerClient mcc) throws Exception {
CoreJBossASClient client = new CoreJBossASClient(mcc);
client.setSystemProperty("jackson.deserialization.whitelist.packages", "org.rhq.enterprise.server.rest.domain");
}

/**
* Prepares the mail service by configuring the SMTP settings.
*
Expand Down

0 comments on commit 1f2860c

Please sign in to comment.