1

This is a spring 2.5 based project. I need to load a externalized property file when

application server starts up.I am shipping my solution to 10 users.(10 Jboss instances) where

each connect to their own database schema. Each user has a client id value saved in the

database. This will be the name of the externalized property file. If the property file name is fixed I could

load as below

 <context:property-placeholder
    location="classpath:/tmp/client001.properties" />

please help to find a approach how to load this when name of the property file (client001) is in the

database.

Loading dynamic externalized property files

user3558691
  • 117
  • 2
  • 12

1 Answers1

1

You could take the name of the file from a system variable, loaded with the corresponding value on each server.

Take a look at this question. Spring: Injecting different properties file according to profile

Community
  • 1
  • 1
Andres
  • 10,561
  • 4
  • 45
  • 63
  • Is not it possible Before loading the context , execute a query and get the name and assign to system variable without hard coding. This supports to maintain multiple Wars in same jboss instances in future. – user3558691 Jun 13 '14 at 00:14