websphere applications often rely on property files to contain environment-specific values. these files usually contain any settings that change between environments, and the files can be in a variety of formats java properties (key/value pairs), xml, or a custom format. many values can be kept the same throughout the environments, but values such as host names, user ids and passwords, database schema names, and urls usually change in each.
we see many of our customers struggling with the problem of how to manage the changes in application property files as the application gets promoted through a number of different environments, such as development, testing, and production. this article will outline some of the more common and proven solutions. while none of these solutions will always be the best for all situations, it is likely that one of the solutions presented here will fit your needs.
roles and responsibilities
we have seen environment-specific properties managed in a number of ways; many of them are outlined in table 1.how to load them? 【程序编程相关:Interview...with Phi】
in a perfect world, groups within an organization would map nicely to the roles and responsibilities defined by j2ee. in reality, a disproportionate amount of the responsibilities fall within the realm of development. we find this especially true for property files where operations only responsibility may be to change a password, and development creates and maintains all of the remaining properties.previously many customers tended to manage all of the property files externally to the application, often deploying and updating these files by hand. now its more common for development teams to create property files for each environment and package them all into the ear file building their applications to use a cue from each runtime environment to indicate which properties are to be used in that environment. we have found that roles and responsibilities generally have the largest impact on which of these solutions work best within an individual organization.
options 【推荐阅读:Interview with Giaco】
at build time using antthere are two common strategies for rep... 下一页