Specify the transaction attribute of the bean as RequiresNew. Then as per section 11.6.2.4 of the EJB v 1.1 spec EJB container automatically starts a new transaction before the method call. The container also performs the commit protocol before the method result is sent to the client.
This site provides Java Tutorial, J2EE Tutorial, Spring Tutorial, Hibernate Tutorial, Struts Tutorial and Spring Tutorial. It has complete source code demonstration and Hello World excercise for Freshers and experienced IT Professionals.
Thursday, January 19, 2012
Java Interview Question and Java Beginner Tutorial - Part 4
Is there any way to force an Entity Bean to store itself to the db? I don’t wanna wait for the container to update the db, I want to do it NOW! Is it possible?
Specify the transaction attribute of the bean as RequiresNew. Then as per section 11.6.2.4 of the EJB v 1.1 spec EJB container automatically starts a new transaction before the method call. The container also performs the commit protocol before the method result is sent to the client.
Specify the transaction attribute of the bean as RequiresNew. Then as per section 11.6.2.4 of the EJB v 1.1 spec EJB container automatically starts a new transaction before the method call. The container also performs the commit protocol before the method result is sent to the client.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment