[
https://issues.apache.org/jira/browse/CAMEL-5311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13284687#comment-13284687
]
Henryk Konsek commented on CAMEL-5311:
--------------------------------------
Hi Claus,
Thanks for the feedback.
> Can you avoid any refactorings in the parent/pom.xml file.
> This makes backporting patches and whatnot much harder, when the pom.xml have
> merge conflicts.
Grrrr, apparently IntelliJ sometimes reformat patch before export even when I
explicitly tell it not to do so. I'll create patches with command line next
time.
> allow to configure the name to lookup in the registry,
> in case the default name "jobLauncher" is not to your needs.
It's already there -
to("spring-batch:mockJob?jobLauncherRef=alternativeJobLauncher") .
> And if there is 1 or more, you grab the first. I suggest to change
> this to only grab it, if there is exactly 1. If there is 2 or more, then
> throw a failure.
I agree - I'll change it.
> And maybe add a getter/setter for the JobLauncher instance,
> so you can set explicit a launcher on the component.
I'll do it.
> Also I suggest to add this logic to the doStart method, so its run once upon
> initialization of the component.
> ...
> In the endpoint class, then do the lookup in the doStart method,
> and keep the getter/setter as plain, eg the setJobLauncherRef method.
Although doStart() seems like a good place to put this logic there but actually
I followed the logic from the JdbcComponent here. Could you explain to me why
JdbcComponent can perform lookup in createEndpoint()?
> In the CamelJobExecutionListener I would assume the afterJob method should
> send a
> header with AFTER in the key. eg currently it looks like a copy/paste mistake.
Maybe instead of setting boolean SPRING_BATCH_JOB_EVENT_BEFORE flag, I'll set
String flag SPRING_BATCH_JOB_EVENT_TYPE with possible values of "BEFORE" and
"AFTER"? What do you think?
I'll let you know when I apply the fixes to the patch.
> Spring Batch component
> ----------------------
>
> Key: CAMEL-5311
> URL: https://issues.apache.org/jira/browse/CAMEL-5311
> Project: Camel
> Issue Type: New Feature
> Affects Versions: 2.10.0
> Reporter: Henryk Konsek
> Fix For: 2.10.0
>
> Attachments: spring-batch.patch
>
>
> I'm attaching completed Spring Batch Component.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira