Using Java Persistence API in application client in Java EE platform