So my Service layer is @ApplicationScoped.
Since Inject the @Repository into my service layer and is @Dependent it
will be an @ApplicationScoped. I'm producing my EM like:
public class EntityManagerProducerImpl implements EntityManagerProducer
@PersistenceContext(unitName = "unit")
private EntityManager entityManager;
public EntityManager get()
So...will it work properly? or do I have to mark my EM as @RequestScoped?
On Tue, Feb 13, 2018 at 10:24 AM, Thomas Andraschko <
> the default scope is @Dependent but i suggest everyone to use
> The EM will be proxied if you use a NormalScope like @RequestScoped, ....
> 2018-02-13 10:54 GMT+01:00 Luís Alves <luisalve...@gmail.com>:
> > Hi,
> > What is the scope of @Repository? Do you use a similar approach of
> > @Singleton and proxy the EM?
> > Regards,
> > LA