Details
Description
I have the producer method
@Produces
@ViewScoped
@ViewEntityManager
private EntityManager viewEntityManager() {
return new EntityManagerImpl(entityManagerFactory);
}
The problem is EntityManager.class is not serializable so a error saying EntityManager.class it's not serializable and @ViewScoped should be serializable. But EntityManagerImpl.class is a serializable class. Weld implementation works fine.