Java Reference
In-Depth Information
Listing 2.6. BidService stateless session bean code
The BidDao injected into the EJB is a CDI-managed bean with an interface. The DAO
relies on the transaction and thread-safety context of the EJB and doesn't need to have any
services other than basic dependency injection offered by CDI. Any other services, like se-
curity and asynchronous processing, are also likely best applied at the service tier rather
than the persistence tier. The next listing shows the code for the DAO.
Listing 2.7. BidDao CDI-managed bean
 
Search WWH ::




Custom Search