some more work towards our JpaRealm impl