Hi ,
I am using Hibernate Session injected in my EJB3 Session Bean code for my database operations.
@PersistenceContext
private Session session;
I am trying to put the below operations inside a transaction block.
If any one of the inserts fail ,say If insert of Child Table 2 fails
,I want the insert of the Parent Table alone to be rolled back .How would I achieve this in my code ?
Hope my query is clear.