Announcement Announcement Module
Collapse
No announcement yet.
DAO testing using client-side transaction demarcation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • DAO testing using client-side transaction demarcation

    Hello,

    How can i create transaction demarcation from my test case which tests a DAO(data access object).
    public class DAO{

    public void a(){
    //some db operations
    }

    public void b(){
    //some db operations
    }

    }

    ---------------------------------------------------------
    MyTest{
    //initialize the dao
    test1(){
    dao.a();
    dao.b();
    }
    }

    I used a TransactionProxyFactoryBean, and marked the transactions declaratively as PROPOGATION_REQUIRED, but i am not able to instantiate a transaction from the test-client code.

    thanks in advance.

  • #2
    Take a look at org.springframework.test for DAO testing with support for transactional execution of test cases (and automatic rollback on completion).

    Comment

    Working...
    X