I'm using PropertyOverrideConfigurer and an external config file to build a
single WAR for our dev and production servers.  I added the following bean
to deployerConfigContext.xml and auditTrailContext (for logging):

     <bean
class="org.springframework.beans.factory.config.PropertyOverrideConfigurer"
        p:location="file:/usr/local/etc/cas-connection.properties"
        p:ignoreResourceNotFound="false" />

And then all of the configuration in the rest of the file is generic -- I've
got all of the config options that are the same across all my servers
(search filters, baseDN, etc) but all of the connection parameters are
blank.  Then /usr/local/etc/cas-connection.properties has all of the
server-specific info:

contextSource.urls=ldap://localhost:389,ldap://example.edu:389
contextSource.userDn=uid=admin,o=example.edu
contextSource.password=secret

ServicesdataSource.driverClassName=com.mysql.jdbc.Driver
ServicesdataSource.url=jdbc:mysql://localhost:3306/cas?autoReconnect=true
ServicesdataSource.username=root
ServicesdataSource.password=secret

AuditDataSource.driverClassName=com.mysql.jdbc.Driver
AuditDataSource.url=jdbc:mysql://localhost:3306/audit?autoReconnect=true
AuditDataSource.username=root
AuditDataSource.password=secret


  Eric Pierce, RHCE -- University of South Florida -- (813) 974-8868 --
epie...@usf.edu


On Mon, Jun 22, 2009 at 3:02 PM, Marvin Addison <marvin.addi...@gmail.com>wrote:

> Another option would be to use
> ServletContextPropertyPlaceholderConfigurer or
> PropertyPlaceholderConfigurer classes to load placeholders into your
> Spring config.  For example, you could have a NAS share that is
> exported to all your hosts at the same path and use
> PropertyPlaceholderConfigurer to suck in property placeholders into
> your Spring context config.  A solution similar to this was preferable
> to us since we didn't want the complexity of JNDI.
>
> M
>
> --
> You are currently subscribed to cas-user@lists.jasig.org as:
> epie...@usf.edu
> To unsubscribe, change settings or access archives, see
> http://www.ja-sig.org/wiki/display/JSG/cas-user
>

-- 
You are currently subscribed to cas-user@lists.jasig.org as: 
arch...@mail-archive.com
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to