This content has been marked as final.
Show 3 replies
-
1. Re: Recover transaction after validation error and EntityHome
radu Mar 16, 2010 10:33 AM (in response to radu)Creating a new instance every time doesn't help. I still get the
Transaction is not active
error.How do you guys perform batch inserts?
The code I use on
onMessage
observer isComponent component = new Component(TestEntityHome.class, "testEntityHome"); TestEntityHome testEntityHome = (TestEntityHome)component.newInstance(); ... testEntityHome.persist(); component.destroy(testEntityHome);
-
2. Re: Recover transaction after validation error and EntityHome
richard.qin Mar 16, 2010 12:31 PM (in response to radu)you may use the EntityManager to persist the Test entity directly.
-
3. Re: Recover transaction after validation error and EntityHome
radu Mar 16, 2010 2:54 PM (in response to radu)Thanks for reply!
The whole point is to use the same persist() method, which has some custom logic.