Map<Class<? extends Packet>, PacketSerializer> packetSerializers = GeneralUtils.getPacketSerializers("be.demmel.jgws.packets.loginserver.outbound");
// Retrieve the PacketHandlers for every incoming (login) packet
Map<Class<? extends Packet>, PacketHandler> packetHandlers = GeneralUtils.getPacketHandlers("be.demmel.jgws.packets.handlers.login");
Jpa jpaConfiguration = loginServerConfiguration.getJpa();
Map<String, String> properties = new HashMap<>();
properties.put("javax.persistence.jdbc.driver", jpaConfiguration.getDriver());
properties.put("javax.persistence.jdbc.url", jpaConfiguration.getUrl());
properties.put("javax.persistence.jdbc.user", jpaConfiguration.getUser());
properties.put("javax.persistence.jdbc.password", jpaConfiguration.getPassword());
final EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("jgws", properties);
EntityManagerFactoryTool.setEntityManagerFactory(entityManagerFactory);