[
https://issues.apache.org/jira/browse/FC-96?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14537073#comment-14537073
]
Shawn McKinney commented on FC-96:
----------------------------------
Ended up reading external configuration parameters as system properties only
and not using the context.xml. The reason, it is difficult to override
properties from applications outside of fortress core. Configuration
initialization happens in the very beginning of application initialization. By
the time any dependent application (including fortress-war) has opportunity to
override an ldap property, the connection pool has already been initialized.
Here are the fortress properties that can be overridden as system.properties:
final private static String EXT_LDAP_HOST = "fortress.host";
final private static String EXT_LDAP_PORT = "fortress.port";
final private static String EXT_LDAP_ADMIN_POOL_UID = "fortress.admin.user";
final private static String EXT_LDAP_ADMIN_POOL_PW = "fortress.admin.pw";
final private static String EXT_LDAP_ADMIN_POOL_MIN =
"fortress.min.admin.conn";
final private static String EXT_LDAP_ADMIN_POOL_MAX =
"fortress.max.admin.conn";
final private static String EXT_ENABLE_LDAP_SSL =
"fortress.enable.ldap.ssl";
final private static String EXT_ENABLE_LDAP_SSL_DEBUG =
"fortress.enable.ldap.ssl.debug";
final private static String EXT_TRUST_STORE = "fortress.trust.store";
final private static String EXT_TRUST_STORE_PW =
"fortress.trust.store.password";
final private static String EXT_SET_TRUST_STORE_PROP =
"fortress.trust.store.set.prop";
final private static String EXT_CONFIG_REALM = "fortress.config.realm";
here is example using tomcat startup.sh:
export JAVA_OPTS="-Dfortress.host=localhost -Dfortress.port=10389
-Dfortress.admin.user=uid=admin,ou=system -Dfortress.admin.pw=secret
-Dfortress.min.admin.conn=10 -Dfortress.max.admin.conn=100"
> Externalize fortress web.war config
> -----------------------------------
>
> Key: FC-96
> URL: https://issues.apache.org/jira/browse/FC-96
> Project: FORTRESS
> Issue Type: Improvement
> Affects Versions: 1.0.0-RC40
> Reporter: Shawn McKinney
> Fix For: 1.0.0-RC41
>
>
> Currently the fortress-web.war contains a configuration artifact,
> fortress.properties, which contains the coordinates for directory or rest
> server. These props need to be settable without breaking apart the war and
> editing the file.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)