protected void initJpa() {
if(jpaPersistenceUnitName!=null) {
jpaEntityManagerFactory = JpaHelper.createEntityManagerFactory(jpaPersistenceUnitName);
}
if(jpaEntityManagerFactory!=null) {
sessionFactories.put(EntityManagerSession.class, new EntityManagerSessionFactory(jpaEntityManagerFactory, jpaHandleTransaction, jpaCloseEntityManager));
JPAVariableSerializer jpaType = (JPAVariableSerializer) variableSerializers.getSerializerByName(JPAVariableSerializer.NAME);
// Add JPA-type
if(jpaType == null) {
// We try adding the variable right after byte serializer, if available
int serializableIndex = variableSerializers.getSerializerIndexByName(ValueType.BYTES.getName());