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

  • 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
    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).

    Comment


    • #3
      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

      Comment


      • #4
        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, 11:19 AM. Reason: spelling error

        Comment


        • #5
          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).

          Comment

          Working...
          X