dimanche 17 mai 2015

CDI bean in JAVA EE

Recently I have seen CDI bean uses in DDD Sample Project "Cargo Tracker". Where a CDI bean was used with @ApplicationScoped annotation with Entity Manager for data access repository. My Question are as follows:

Is it a good practice to use Entity Manager with CDI bean instead a @stateless bean(EJB)?

What benefit we get by using CDI bean with Entity Manager without container managed approach?

Exactly when should we use CDI bean instead stateless container managed bean?

Aucun commentaire:

Enregistrer un commentaire