Results 1 to 3 of 3

Thread: get last item of chunk tasklet

  1. #1
    Join Date
    Nov 2012
    Posts
    2

    Default get last item of chunk tasklet

    Hi,
    beside the normal chunk execution with reader and writer I wanna get the very last item of the chunk's tasklet to store the ID additionally in another database. Are there any listener to be called for the last item or what's the best practice for it?

  2. #2
    Join Date
    Oct 2012
    Location
    Madrid
    Posts
    20

    Default

    Hi tobe96,

    I think you can save always the item you are processing and implements the @AfterChunk event. In this implementation, you can get the value of the last item you saved before.



    Regards,

  3. #3
    Join Date
    Nov 2012
    Posts
    2

    Default

    thanks maxjuiz, now I simply saved each item in my implemented ItemWriter and at the end stored the last value in the other database.

Posting Permissions

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