Committing JDBC and JPA cod