Hi,
I apologize for rather vague subject line. I have been asked my manager to write a "test bed" for running tests that call dao classes, some thing like Spring without using Spring. I have managed to set up
thread local connection to both Daos and my
test class. That way I have the same connection attributes. Now what I would like to do in my test class is have my DAO class make a db call (say insert) and then use the same connection in my test class to query if the insert really worked) and rollback the changes after my test has been executed. That way the database will roll back to its known state after every test run.
I have an AOP interceptor/listener where I can invoke the connection commit/rollback. But I want to be able to see the results of my insert query in the db before I can query the database. I have set auto commit to false. Are they any configurations that I need to make to the connection to make this possible?
Thanks,
Kartik