I switched to injecting connections with Hivemind and I would say it's
well worth the effort. I could never figure out how to test code when
using the Tomcat database connections but with the Hivemind method you
can just get a connection and add it to the objects you want to test.
There is an example in the tapestry-examples/TimeTracker application.
It's a bit difficult to setup the first time and involves Hivemind and
Java Proxies, but in the end it's well worth the effort. I also create
a separate Eclipse project called TestDB that can create test database
connections the in my test code I do this
private static Repository repository;
@BeforeClass
public static void setUpBeforeClass() throws Exception {
repository =
Repository.newTestInstance(TestConnection.getConnection());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]