Adding JPA project and rewriting part of the logic in session beans