On Tue, Jan 23, 2007 at 01:58:23PM -0500, YosarianTheGreat wrote:
> We're trying to upgrade to 4.0.5 but have hit a snag. We use
> Class.findResource and ResourceBundle.getBundle to locate properties files
> which exist in WEB-INF/classes. Because we have different environments (dev,
> stage, prod) we need multiple versions of these properties files. In order
> to keep from having a mess in source control, we have three distinct files
> and symlink to the correct file in the given environment. Previously with
> 4.0.1 this worked fine, but with 4.0.5 it can't locate the file. Removing
> the symlink and making a copy or even making a hard link works, but symlinks
> don't. Hard links is a workable solution, but it's not as desirable as
> symlinks b/c it looks like a distinct file, and that might be confusing.
>
> Here's what we have:
>
> WEB-INF/classes/Configuration.properties ->
> WEB/classes/Configuration.properties.prod
> WEB-INF/classes/Configuration.properties.dev
> WEB-INF/classes/Configuration.properties.stage
> WEB-INF/classes/Configuration.properties.prod
You could load the right one based on a java.property
set at start time with the -D option of run.sh,
e.g.
run.sh -Druntime=stage ....
and then the app would load Configuration.properties.${stage}
Or copy the correct properties file to an external dir
specified with --classpath
Matt
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user