Announcement Announcement Module
Collapse
No announcement yet.
fetchsize not configurable for HibernateCursorItemReader in 2.1RC1 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • fetchsize not configurable for HibernateCursorItemReader in 2.1RC1

    Hi,
    We started using the latest RC of Spring batch RC1, and we found out that HibernateCursorItemReader doesn't expose anymore fetchsize.
    by looking at the code it seems that HibernateCursorItemReader is using a helper class and somehow it's not setting this property although in HibernateItemReaderHelper it checks that the property is >=0.

    Code:
    public void afterPropertiesSet() throws Exception {
    
    		Assert.state(sessionFactory != null, "A SessionFactory must be provided");
    		Assert.state(fetchSize >= 0, "fetchSize must not be negative");
    
    		if (queryProvider == null) {
    			Assert.notNull(sessionFactory, "session factory must be set");
    			Assert.state(StringUtils.hasText(queryString) ^ StringUtils.hasText(queryName),
    					"queryString or queryName must be set");
    		}
    		// making sure that the appropriate (Hibernate) query provider is set
    		else {
    			Assert.state(queryProvider instanceof AbstractHibernateQueryProvider,
    					"Hibernate query provider must be set");
    		}
    
    	}
    In this class fetchsize is initialized to 0.
    This looks like a refactoring error, or is fetchsize not configurable anymore?

    Thanks

  • #2
    Someone already noticed that. It's fixed in trunk.

    Comment

    Working...
    X