Announcement Announcement Module
Collapse
No announcement yet.
Best Practices on Setting up Standalone Archi Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Best Practices on Setting up Standalone Archi

    Hi,
    Planning on replacing our existing batch archi with Spring Batch - would grow to a large batch integration with possibly 300+ concurrent jobs. Looking to find out more on best practices on the following:

    1) How best to execute the job jar files
    2) Which are the basic dependant libraries needed to load - for running without a container
    3) and how best to organize the file structure - logging etc..

    Any info you could provide on this would be greatly appreciated.
    Thanks

  • #2
    CommandLine Setup

    Originally posted by lynchd1 View Post
    Hi,
    Planning on replacing our existing batch archi with Spring Batch - would grow to a large batch integration with possibly 300+ concurrent jobs. Looking to find out more on best practices on the following:

    1) How best to execute the job jar files
    2) Which are the basic dependant libraries needed to load - for running without a container
    3) and how best to organize the file structure - logging etc..

    Any info you could provide on this would be greatly appreciated.
    Thanks
    The following is what Don and the rest of the team finally worked out. Just thought we'd post the answer to our own question .

    First we took the required dependent JAR files from our Maven local Repo and moved them to a local RunTime Directory:

    c:\batch\repository
    Next we created a script that would place all the dependent JAR's in our Class Path
    Code:
    SET CP=
    SET REPO_PATH=c:\batch\repository\
    SET CP=%REPO_PATH%commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;%CP%
    SET CP=%REPO_PATH%org\springframework\spring-jdbc\2.5.6\spring-jdbc-2.5.6.jar;%CP%
    SET CP=%REPO_PATH%org\springframework\spring-beans\2.5.6\spring-beans-2.5.6.jar;%CP%
    SET CP=%REPO_PATH%org\springframework\spring-core\2.5.6\spring-core-2.5.6.jar;%CP%
    SET CP=%REPO_PATH%org\springframework\spring-context\2.5.6\spring-context-2.5.6.jar;%CP%
    SET CP=%REPO_PATH%aopalliance\aopalliance\1.0\aopalliance-1.0.jar;%CP%
    SET CP=%REPO_PATH%org\springframework\spring-tx\2.5.6\spring-tx-2.5.6.jar;%CP%
    SET CP=%REPO_PATH%org\springframework\batch\spring-batch-core\2.0.0.RELEASE\spring-batch-core-2.0.0.RELEASE.jar;%CP%
    SET CP=%REPO_PATH%org\springframework\batch\spring-batch-infrastructure\2.0.0.RELEASE\spring-batch-infrastructure-2.0.0.RELEASE.jar;%CP%
    SET CP=%REPO_PATH%commons-lang\commons-lang\2.1\commons-lang-2.1.jar;%CP%
    SET CP=%REPO_PATH%org\aspectj\aspectjrt\1.5.4\aspectjrt-1.5.4.jar;%CP%
    SET CP=%REPO_PATH%org\aspectj\aspectjweaver\1.5.4\aspectjweaver-1.5.4.jar;%CP%
    SET CP=%REPO_PATH%com\thoughtworks\xstream\xstream\1.3\xstream-1.3.jar;%CP%
    SET CP=%REPO_PATH%xpp3\xpp3_min\1.1.4c\xpp3_min-1.1.4c.jar;%CP%
    SET CP=%REPO_PATH%org\codehaus\jettison\jettison\1.0\jettison-1.0.jar;%CP%
    SET CP=%REPO_PATH%stax\stax-api\1.0.1\stax-api-1.0.1.jar;%CP%
    SET CP=%REPO_PATH%org\springframework\spring-aop\2.5.6\spring-aop-2.5.6.jar;%CP%
    SET CP=%REPO_PATH%commons-dbcp\commons-dbcp\1.2.2\commons-dbcp-1.2.2.jar;%CP%
    SET CP=%REPO_PATH%commons-pool\commons-pool\1.3\commons-pool-1.3.jar;%CP%
    SET CP=%REPO_PATH%commons-io\commons-io\1.4\commons-io-1.4.jar;%CP%
    SET CP=%REPO_PATH%log4j\log4j\1.2.14\log4j-1.2.14.jar;%CP%
    SET CP=%REPO_PATH%hsqldb\hsqldb\1.8.0.7\hsqldb-1.8.0.7.jar;%CP%
    SET CP=%REPO_PATH%javax\persistence\com.springsource.javax.persistence\1.0.0\com.springsource.javax.persistence-1.0.0.jar;%CP%
    SET CP=%REPO_PATH%org\apache\ibatis\ibatis-sqlmap\2.3.0\ibatis-sqlmap-2.3.0.jar;%CP%
    SET CP=%REPO_PATH%org\springframework\org.springframework.orm\2.5.6.A\org.springframework.orm-2.5.6.A.jar;%CP%
    SET CP=%REPO_PATH%org\apache\commons\com.springsource.org.apache.commons.logging\1.1.1\com.springsource.org.apache.commons.logging-1.1.1.jar;%CP%
    SET CP=%REPO_PATH%org\springframework\org.springframework.beans\2.5.6.A\org.springframework.beans-2.5.6.A.jar;%CP%
    SET CP=%REPO_PATH%org\springframework\org.springframework.core\2.5.6.A\org.springframework.core-2.5.6.A.jar;%CP%
    SET CP=%REPO_PATH%org\springframework\org.springframework.jdbc\2.5.6.A\org.springframework.jdbc-2.5.6.A.jar;%CP%
    SET CP=%REPO_PATH%org\springframework\org.springframework.transaction\2.5.6.A\org.springframework.transaction-2.5.6.A.jar;%CP%
    SET CP=%REPO_PATH%org\aopalliance\com.springsource.org.aopalliance\1.0.0\com.springsource.org.aopalliance-1.0.0.jar;%CP%
    SET CP=%REPO_PATH%org\apache\ibatis\com.springsource.com.ibatis\2.3.0.677\com.springsource.com.ibatis-2.3.0.677.jar;%CP%
    SET CP=%REPO_PATH%org\apache\log4j\com.springsource.org.apache.log4j\1.2.15\com.springsource.org.apache.log4j-1.2.15.jar;%CP%
    SET CP=%REPO_PATH%net\sourceforge\cglib\com.springsource.net.sf.cglib\2.1.3\com.springsource.net.sf.cglib-2.1.3.jar;%CP%
    SET CP=%REPO_PATH%com\oracle\jdbc\com.springsource.oracle.jdbc\10.2.0.2\com.springsource.oracle.jdbc-10.2.0.2.jar;%CP%
    SET CP=%REPO_PATH%org\springframework\ws\spring-ws\1.5.2\spring-ws-1.5.2.jar;%CP%
    SET CP=%REPO_PATH%partner-library\partner-library\16.0\partner-library-16.0.jar;%CP%
    SET CP=%REPO_PATH%wsc\wsc\16_0\wsc-16_0.jar;%CP%
    SET CP=%REPO_PATH%org\apache\ws\commons\axiom\axiom-api\1.2.8\axiom-api-1.2.8.jar;%CP%
    SET CP=%REPO_PATH%jaxen\jaxen\1.1.1\jaxen-1.1.1.jar;%CP%
    SET CP=%REPO_PATH%xml-apis\xml-apis\1.3.04\xml-apis-1.3.04.jar;%CP%
    SET CP=%REPO_PATH%xerces\xercesImpl\2.6.2\xercesImpl-2.6.2.jar;%CP%
    SET CP=%REPO_PATH%org\apache\ws\commons\axiom\axiom-impl\1.2.8\axiom-impl-1.2.8.jar;%CP%
    SET CP=%REPO_PATH%org\apache\geronimo\specs\geronimo-activation_1.1_spec\1.0.1\geronimo-activation_1.1_spec-1.0.1.jar;%CP%
    SET CP=%REPO_PATH%org\apache\geronimo\specs\geronimo-javamail_1.4_spec\1.2\geronimo-javamail_1.4_spec-1.2.jar;%CP%
    SET CP=%REPO_PATH%org\apache\geronimo\specs\geronimo-stax-api_1.0_spec\1.0.1\geronimo-stax-api_1.0_spec-1.0.1.jar;%CP%
    SET CP=%REPO_PATH%af2f.jar;%CP%
    [b]Note[b] the last CP entry is to our Batch App Jar file "af2f.jar"

    Next we have a script to kick off the command line job.

    Code:
    java -classpath %CP% org.springframework.batch.core.launch.support.CommandLineJobRunner application-context.xml ioSampleJob

    Comment

    Working...
    X