That's more or less an easy problem to solve. But why do you want to inject it using @PersistenceContext instead of @Inject??