Announcement Announcement Module
Collapse
No announcement yet.
Setup to use batch-oracle.properties Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setup to use batch-oracle.properties

    Hi,

    Have a newbie question about setup for using specifically the batch-oracle.properties file from the application run. I am using a Oracle 9i database.
    I have setup the batch-oracle.properties file with the required url, user, password and schema values. But getting the message like -

    PropertyPlaceholderConfigurer:178 Loading properties file from the class path resource [batch-hsql.properties]

    How can have it load the batch-oracle.properties instead if that is something I need to do?

    Thanks

  • #2
    Probably I should ask how do the batch-hsql.properties setup for the batch.jdbc.url name value. Do I need to setup my Oracle DB instance on my localhost if I want to that way? If so what would be the syntax for doing so?

    Thanks

    Comment


    • #3
      There's a bean definition in the data-source-context.xml of the samples:

      Code:
      <bean id="environment"
      	class="org.springframework.batch.support.SystemPropertyInitializer">
      	<property name="defaultValue" value="hsql"/>
      </bean>
      If you use that as well, you should be able to set -Dorg.springframework.batch.support.SystemPropertyI nitializer.ENVIRONMENT=oracle, or reset the default in the bean definition. You can also change the -D key name in the bean definition.

      Comment


      • #4
        Thanks Dave! I'll make the changes and try it out.

        Comment


        • #5
          Hi Dave,

          Sorry for not following quite what you suggested needs to be done to have my Oracle DB setup for running the examples. I have edited the batch-oracle.properties with the url, user, password and schema values with my Oracle DB settings. Ran the schema-oracle10g.sql script to create the test tables and sequences. Populated the CUSTOMER table with data in the script. Ran also the sql script that creates the BATCH_JOB_INSTANCE, BATCH_JOB_EXECUTION, BATCH_JOB_PARAMS, BATCH_STEP_EXECUTION, BATCH_STEP_EXECUTION_CONTEXT, BATCH_JOB_EXECUTION_CONTEXT etc. tables and sequences in my database. I just wanted to run your samples that would do some sort of database transactions like query and updates in the test tables as well see if the meta-data tables are getting populated. Am I missing any setups? Please forgive my ignorance I did'nt quite understand what you suggested. Are you saying I can change the value in the data-source-context.xml like to use Oracle? Like -
          <bean id="environment"
          class="org.springframework.batch.support.SystemPro pertyInitializer">
          <property name="defaultValue" value="oracle"/> <!-- instead of value="hsql" -->
          </bean>

          One other question about your sample programs. Which sample application would you suggest running to do things I mentioned above?

          Thanking you again!

          Comment

          Working...
          X