implementing persistence with derby instead of sqlite