There are three ways to set properties in AMConfig.properties. The following sections contain more information.
You can set properties in AMConfig.properties by editing the file with a text editor. Each property is defined as:
property-name=property-value
You can set properties programmatically using the com.iplanet.am.util.SystemProperties class. For example:
import com.iplanet.am.util.SystemProperties; import java.util.Properties; public static void main(String[] args) { // To initialize a set of properties Properties props = new Properties(); props.setProperty(”com.iplanet.am.naming.url’, ”http://sample.com/opensso/namingservice’); props.setProperty(”com.sun.identity.agents.app.username’, ”URLAccessAgent’); props.setProperty(”com.iplanet.am.service.password’, ”11111111’); SystemProperties.initializeProperties(props) ; // To initialize a single property SystemProperties.initializeProperties(“com.iplanet.am.naming.url’, ”http://sample.com/opensso/namingservice’); // Application specific code ... } |
To set a value to a particular property at run time, declare the JVM option using the following format:
-Dproperty-name=property-value