According to what I have found so far, I can use the following code:
LocalSessionFactoryBean sessionFactory = (LocalSessionFactoryBean)super.getApplicationContext().getBean('&sessionFactory'); System.out.println(sessionFactory.getConfiguration().buildSettings().getJdbcBatchSize());
but then I get a Hibernate Exception:
org.hibernate.HibernateException: No local DataSource found for configuration – dataSource property must be set on LocalSessionFactoryBean
Can somebody shed some light?
Try the following (I can’t test it since I don’t use Spring):