July 21, 2017 at 8:41 pm #18222stevenswjParticipant
There are two different AMConfig.properties files my OpenAM client program (runs on Tomcat 7) needs to be able to run. One connects to an integration OpenAM, the other a production. But it appears the Java SDK does not allow for specifying a different properties filename other than just AMConfig.properties? Is this hardcoded? Cannot be changed? If this is true then it looks like I will need to create two different web deployment copies for the same program that uses the SDK instead of the same deployment that uses different properties files (based on which OpenAM the user wishes to connect)? Any way around this? Thanks!July 23, 2017 at 9:49 am #18237Peter MajorModerator
The ClientSDK only supports one environment at a time. Trying to connect a single SDK to several OpenAM deployments will result in pain:
Best way around this limitation is to use the REST APIs instead.July 24, 2017 at 2:58 pm #18245stevenswjParticipant
This tool actually only uses one environment at a time. I would just like it to be able to choose which config file it uses. Is it possible to switch configs and maybe do a reload?
July 24, 2017 at 10:33 pm #18253Peter MajorModerator
- This reply was modified 5 years, 2 months ago by stevenswj.
The SystemProperties class is responsible of loading the right config file, you can also manually initialize it and not have any properties file on classpath. Having said this, I just want to reiterate: the clientsdk cannot be used against more than one environment during a lifetime of a JVM. Once the ClientSDK has been initialized to use one OpenAM deployment, changing the settings to point at a different OpenAM deployment will result in undefined behavior.
You must be logged in to reply to this topic.