You can add custom properties to a solution project by
editing the solution_properties.xml file where
you define a name and value for each property. If a property includes
the override_required parameter, the value of
the property must be modified by running the solutionManager setproperty command.
About this task
You use the
solution_properties.xml file
in the root folder of the solution to persist custom properties when
a solution is deployed, undeployed and then deployed again. The properties
apply to the entire solution. For example, the properties might include
connection settings so that several agents can connect and send information
to an external system.
Procedure
- Define custom properties for the solution by adding property
elements in the solution_properties.xml file,
as shown in the following example:
<?xml version="1.1" encoding="UTF-8"?>
<properties>
<property name="db_username">JoeSmith</property>
<property name="db_password" override_required="true"></property>
</properties>
where JoeSmith is the
user name authentication property, and the db_password property
includes the override_required parameter.
- For properties that include the override_required parameter,
modify the value of the property by running the solutionManager setproperty command.
Provide the solution name, the name of the property and the property
value as parameters to the command. You must provide administrator
authentication credentials to run the command.
- Run the command on Windows,
as shown in the following example:
solutionManager setproperty MySolution db_password=tester --username=JoeSmith --password=user1 --trustStorePassword=truststore --trustStoreLocation=C:\IBM\ODMInsights890\runtime\wlp\usr\servers\cisDev\resources\security\key.jks
- Run the command on Linux,
as shown in the following example:
./solutionManager setproperty MySolution db_password=tester --username=JoeSmith --password=user1 --trustStorePassword=truststore --trustStoreLocation=/opt/ibm/ODMInsights890/runtime/wlp/usr/servers/cisDev/resources/security/key.jks
Example
A password is required to connect to an external system,
but the password is not secure when it is encoded in the solution
properties file in plain text. To secure the password, include the
override_required parameter
in the password property, then run the
solutionManager setproperty command
to modify the value of the password and transmit the password securely
to each server in a multiple-server production topology. The password
information persists and remains available when a server is restarted,
and the stored information allows an agent to retrieve the connection
settings when necessary.
What to do next
To determine the current value of all the solution properties,
including properties with override values, or to find override values
that you must modify, run the
getproperties command.
For example:
solutionManager getproperties MySolution --username=JoeSmith --password=user1 --trustStorePassword=truststore --trustStoreLocation=/opt/ibm/ODMInsights890/runtime/wlp/usr/servers/cisDev/resources/security/key.jks