Announcement Announcement Module
No announcement yet.
Extracting values from JobParameters Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Extracting values from JobParameters

    The situation is, I have a Batch Job that is set up to read messages and stats from all the queues across multiple brokers in an environment. But I want to have a separate deployment of the job for each broker environment and have things configured that between broker environments, all I have to do is change the properties in my .properties file. What I would like to do is set up my job so that a value is passed to through the command line that tells it which properties file it uses. So it has to do this in the Application Context in my configuration of the PropertyPlaceholderConfigurer.

    But I'm running into an issue where it's not resolving they way I thought it would.

    <bean id="placeholderProperties"
    		<property name="location" value="classpath:#{jobParameters[env]}.properties" />
    		<property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
    		<property name="ignoreUnresolvablePlaceholders" value="true" />
    		<property name="order" value="1" />
    Its resolving the location to "classpath:#{jobParameters[env]}.properties" and not what I'm passing in as the parameter. So basically, can I even use values passed to the command line in the Application context this way? How do I go about doing this because I'm definitely missing something.

    Thank you in advance for any and all advice/help!

  • #2

    Can anyone help me out with this? I've not had any real luck finding documentation on this and there are few solid/reliable resources that go into detail on this.


    • #3

      Anyone got any idea on this? Or if this is even possible?