Thanks Eric, do you have to substitute the values from the properties in the xml?
Chris Whittle SWAT Team Developer J.B. Hunt Transport Service, Inc. Office Phone:(479) 419-3122 Ext:73122 Fax Phone:(479) 820-1769 [email protected] What's your next move?TM Intermodal | Dedicated | Truckload | LTL | Delivery | Refrigerated | Flatbed | Expedited Eric Pierce <[email protected]> Sent by: [email protected] 06/23/2009 08:26 AM Please respond to [email protected] To [email protected] cc Subject Re: [cas-user] Externalizing Info used in deployerConfigContext.xml 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 -- [email protected] On Mon, Jun 22, 2009 at 3:02 PM, Marvin Addison <[email protected]> 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 [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
<<image/gif>>
