Recently I was looking for different ways to develop applications in Java and thought that it would be interesting trying to use ActiveRecord in my persistence layer instead of implementing the traditional approach with a DAO. My idea is not to create …
Our team is currently working with a client on a medium sized, medium complexity Java application which has quite low test coverage. We are introducing characterisation tests to snapshot functionality. These will give us the confidence to refactor away technical debt and extend the application without regression. One of the problems we are experiencing is [...]
Sun Glassfish server can be run in embeded mode, very useful for automated integration tests. Here’s how: Maven Dependencies: <dependency> <groupId>org.glassfish.distributions</groupId> <artifactId>web-all</artifactId> <version>10.0-build-20080430</version> <scope>test</scope> </dependency> <dependency> <groupId>org.glassfish.embedded</groupId> <artifactId>gf-embedded-api</artifactId> <version>1.0-alpha-4</version> <scope>test</scope> </dependency> If you are not using maven then add the above libs to you classpath. Getting the server started in simple final URI APP_URI= UriBuilder.fromUri(“http://localhost/”).port(8888).path(“myapp”).build(); [...]