How do you create UserTransaction Object? How do you
rollback a transaction in a method?



How do you create UserTransaction Object? How do you rollback a transaction in a method?..

Answer / gnani

the user transactin object created using session
Transaction tx=session.beginTransaction();
the rollback is:
tx.rollback();

Is This Answer Correct ?    2 Yes 9 No

Post New Answer

More Java J2EE AllOther Interview Questions

Write a interface "CarOperations" with the following methods void turnOnEngin() void turnOffEngin() void turnOnLigths() void turnOffLights() void turnLeft() void turnRight() void accelerate() void deaccelerate() void putBreaks() void releaseBreaks()

1 Answers  


What are the types of java collections? : java collections

0 Answers  


What is need of DAO? Write one simple DAO example?

2 Answers   IBM,


what is the diffrence between insurance and telecom domain?

1 Answers  


when exactly should we use throws ,and wen exactly should we use the try and catch for exceptional handling

0 Answers  


Explain JSP life cycle?

2 Answers   Accenture,


what is class/object diagram

3 Answers   Zycus Infotech,


How do you debug your java program?

2 Answers   HCL, Inforica,


what is acl(access control list)?

1 Answers   Athena, HCL,


What is the use of hashcode in java ?

0 Answers  


Why do you use Context Object

2 Answers   HCL,


Hi frnds how to lock an user when he enter wrong credentials more than 3 time using java or j2ee tech take username and password in a bean no need to connect DB and validate give me some sample application code or links its urgent for me thanks in advance

0 Answers   NSN,


Categories