Announcement Announcement Module
Collapse
No announcement yet.
Doubt in deployment Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Doubt in deployment

    Hi,

    Problem back ground:

    We are working on two different modules. The development environment is eclipse.

    In our batch java projects, just like src folders we have created properties folder.

    The properties are loaded in application context XML using ResourceBundleMessageSource.

    Code:
    	<!-- Loading Prop files Starts -->
        <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
           <property name="basenames">
                <list>
                	<value>Common/batchApplication</value>
                    <value>Config/firstBatchJob_Config</value>
                    <value>SQL-Queries/firstBatchJob_SQL</value>
                    ....
                    ....
                    ....
                </list>
            </property>
        </bean>
        <!-- Loading Prop files Ends -->
    We had problems in reading property files. Just like web applications where we specify path from WEB-INF/..., we could not specify here.
    The property files were not getting recognized. We were getting resource not found exception.

    To read the property files we had to load the property files in class path. Java Build Path --> Source folder --> Add properties folder here.

    To run the batch programs( for unit testing) we use command line job runner in "Run cofigurations" settings of eclipse.

    In real time the JAR will be used.
    The problem is:

    Same batch JAR will be used for different modules with different set of property files.
    How to read the property files from outside the JAR.
    What are the commands that can be used to load them into batch application from out side the JAR.

    Please help me.

    Thanks
    Mahesh
Working...
X