Results 1 to 5 of 5

Thread: Missing QuartzBatchJobLauncher

  1. #1
    Join Date
    Dec 2005
    Posts
    8

    Default Missing QuartzBatchJobLauncher

    When I am running the Quartz sample, the class com.accenture.adsj.refapp.batch.launch.QuartzBatch JobLauncher can not be found in the released code base.


    <bean id="tradeLauncher"
    class="org.springframework.scheduling.quartz.JobDe tailBean">
    <property name="jobClass" value="com.accenture.adsj.refapp.batch.launch.Quar tzBatchJobLauncher" />
    <property name="jobDataAsMap">
    <map>
    <entry key="batchRoot" value="src/main/resources/testBatchRoot" />
    <entry key="hostName" value="localhost" />
    <entry key="jobName" value="tradeJob" />
    <entry key="jobStream" value="testStream" />
    <entry key="userName" value="robert.kasanicky" />
    <entry key="jobRun" value="1" />
    </map>
    </property>
    </bean>

  2. #2
    Join Date
    Jun 2005
    Posts
    4,232

    Default

    I think that was an old sample that shouldn't have been included. There is no failed unit test, so there must be an old xml file in there that needs to be weeded out. I'll nuke it and ask around to see if it actually ever had any value (I've never seen it).

  3. #3

    Default

    Quote Originally Posted by Dave Syer View Post
    I think that was an old sample that shouldn't have been included. There is no failed unit test, so there must be an old xml file in there that needs to be weeded out. I'll nuke it and ask around to see if it actually ever had any value (I've never seen it).

    Dave, we are actually using that class that we got from a previous release and then it was gone. Still, it is really useful (and rather standard) so I think it should be added as part of the core spring batch, more if we want to take into account things like the threads hung in the TaskExecutor (see my other post).

    We also extended this class to be able to run a single job. We think that besides the scheduler, there are some times where an operator might want to go for a "single-run" right now, and that was not possible. Maybe this could be a good add-on as well?

    Regards
    AB

  4. #4
    Join Date
    Jun 2005
    Posts
    4,232

    Default

    Can you create an issue on JIRA an attach said Launcher and we can see if it will be easy to integrate (clearly it is old, judging by the package name)?

    Running a single job "on demand" is probably going to be quite common. There are various features to support that scenario - the simplest of which is the BatchCommandLineLauncher. There is also a JMX-oriented demo / sample in adhocLoopJob.xml.

    If you need more features in this area, or more support from the features that are there, we would be more than happy to consider concrete suggestions. Please post again, or craete some issues in JIRA.
    Last edited by Dave Syer; Aug 29th, 2007 at 11:19 AM. Reason: spelling error

  5. #5

    Default

    Oh yeah, we didn't see that class. It is probably a better approach. We are using the same class in order to simplify the way the batch is started (currently we can run our batch with:
    Code:
    java -jar my-batch.jar
    and that is something we would like to keep. (there can only be defined one Main class in the manifest.mf file, right?)

    so to start a one-time job we are doing
    Code:
    java -DfastRun=true -DjobName=someJob -jar -my-batch.jar
    (We are forcing the op. to add two parameters just for possible extensibility in the future).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •