Oct 28th, 2012, 07:47 AM
Can't update db record via hibernate
Hi, With spring mvc 3.0.4 and hibernate 3.5.3, I am using Netbeans 7 generated ear file backend CXF web service.
The generated class mainly including a AbstractFactory.java class, where the edit(..) function have been created automatically in this class.
I have tested the backend webserivce by calling edit() function from SoapUI, and it does update the database correctly at this point.
When I use a web service client within another .ear file to save the updated same record to the database table, it didn't update the database table record, it leave the record unchanged.
There is no error/exception in the log and console.
Does issue this sound familiar?
Any suggestion is very appreciated.
Oct 28th, 2012, 02:07 PM
Please use the search as this question (not specifically for CXF but in general) has been answered numerous times before.
If nothing gets updated you have no transaction. You have no transaction due to either
1. No transaction setup at all
2. Wrongly configured transactions (for instance only a TransactionManager, or using @Transactional without tx:annotation-driven)
3. Duplicate scanning for @components one transactional the other not (mainly due to scanning in ContextLoaderListener and DispatcherServlet).