Saturday 6 October 2007

Finally got everything working as I wanted. The biggest issue is the definition of the datasource. I want to be able to run under jetty as development, and glassfish as test and prod. Each has a different database, and I do not want to make any changes when deploying to different environments. The solution I came up with is to use Spring JndiObjectFactoryBean, and use a jdbc/wicketDatasource definition.

I had to explore a bit to find out how to get jetty to set JNDI names, but the Jetty documentation gave a clear example. After that the only thing to do was put the datasource definition in a different xml file. This is necessary for running tests: I can load the datasource definition from a different xml file when running integration tests.

Everything works great now, I am running straight from Jetty, and should be able to deploy on Glassfish just by creating the JNDI entry for the test database

Wednesday 3 October 2007

Introduction

Hi, this is hopefully a regular blog, documenting my travails using Spring, Wicket, Eclipse, Maven and more to create a (hopefully) useful website for personal financial accounting