-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: rollback
PostPosted: Fri Jul 11, 2008 7:37 am 
Newbie

Joined: Fri Jul 11, 2008 7:32 am
Posts: 1
Hi,
I'm doing an API for a database using spring+hibernate.
The arhitecture is: my testcase call a service, the service calls many methods from many DAO's,
the DAO's use hibernate to get the data from DB.
My goal is to keep the data of database unchanged after I'm runing the testcase.
I would like to make rollback before to end the testcase (to the service level).
I don't want for this transaction to use an EJB container.
How can I solv this problem?

Thanks in advance!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 11, 2008 10:48 am 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
Coulding you just use a temporary, separate database table?

You could load it up, test against it, and then delete everything, and recreate the database again. That's fairly easy to do with scripts and the Hibernate SchemaExport class.

What's wrong with doing it that way?

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.