Some improvements to the JPAIdentityStore.