Announcement Announcement Module
Collapse
No announcement yet.
HibernatePagingItemReader doesn’t read all rows from DB Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • HibernatePagingItemReader doesn’t read all rows from DB

    Hi

    I’m new in Spring Batch and I want to write some application using hibernate as framework to access to DB.
    I have a problem with HibernatePagingItemReader when I try to modify in processor same fields which I use in queryString to find records from DB. If I modify same others everything is ok.
    My DB (Oracle) table: Book consists of 5 elements
    ID NAME STATE
    1 BOOK_1 0
    2 BOOK_2 0
    3 BOOK_3 0
    4 BOOK_4 0
    5 BOOK_5 0
    When I search for elements STATE=0 and in processor I modify only NAME field – everything goes ok. My HibernatePagingItemReader configuration has pageSize set to 1 and every of these records has been processed (in one cycle).
    But when I search for element STATE=0 and in processor I modify STATE field (setting another value) Spring Batch processes only records 1,3 and 5 (in one cycle) – records 2 and 4 stay unchanged.
    There is no exceptions or errors. Process finishes successfully.

    My question is why I can’t modify search parameters?

    In the attachment there is my Spring, Spring Batch, Hibernate configuration.
    Attachment

    Can someone Please advice me what I do wrong?
    Thanks

    P.S. Sorry for my English

    Spring 3.1.1
    Spring Batch 2.1.8
    Hibernate 3.6.10
    Oracle 10g
    Weblogic 11
    Attached Files
Working...
X