Should integration testing of DAOs be done in an application server?

Posted by HDave on Stack Overflow See other posts from Stack Overflow or by HDave
Published on 2010-06-07T05:24:25Z Indexed on 2010/06/07 6:02 UTC
Read the original article Hit count: 281

I have a three tier application under development and am creating integration tests for DAOs in the persistence layer. When the application runs in Websphere or JBoss I expect to use the connection pooling and transaction manager of those application servers. When the application runs in Tomcat or Jetty, we'll be using C3P0 for pooling and Atomikos for transactions.

Because of these different subsystems, should the DAO's be tested in a fully configured application server environment or should we handle those concerns when integration testing the service layer? Currently we plan on setting up a simple JDBC data source with non-JTA (i.e. resource-local) transactions for DAO integration testing, thus no application server is involved....but this leaves me wondering about environmental problems we won't uncover.

© Stack Overflow or respective owner

Related posts about java

Related posts about integration-testing