Aug 25th, 2011, 12:01 AM
I am using Spring Batch with Hibernate/JPA and SQL Server 2005 and all is working happily. In the course of troubleshooting a deadlock issue in my code, I discovered that I wasn't using the Spring Batch namespace and hadn't implemented an AOP strategy (as indicated at http://static.springsource.org/sprin...rJobRepository)
After experimenting with both techniques, I am facing an issue where the job instance isn't being created. I've verified via a previously working @BeforeJob annotation, and can also confirm that no data is being written to the Spring Batch tables. I've also run a trace on SQL Server, and it appears that no INSERT/UPDATE commands are being sent. Certainly no deadlocks are being presented.
Would it be useful if I posted the relevant JPA/Spring Batch XML, or does anyone have an idea where to start? Everything looks correct...!
Aug 25th, 2011, 12:02 AM
PS. Despite the manual saying that it's essential to configure the transactional behaviour if not using the Spring Batch namespace (which I'm not doubting), the Spring Batch examples don't appear to do either...
Aug 25th, 2011, 12:16 AM
Ah. Just realised that I'm using the JobRepositoryFactoryBean, which already handles the transactional stuff. Feel free to ignore me ;-)
Tags for this Thread