Java Reference
In-Depth Information
One disadvantage of adding methods to the generated session beans
is that if for any reason they need to be regenerated, we will lose our
custom methods and they will need to be re-added. In order to avoid this
situation, it is a good idea to extend the generated session beans and add
additional methods in the child classes (as of Java EE 5, session beans can
extend one another), this will prevent our methods from being "wiped
out" if we ever need to regenerate our session beans.
Summary
In this chapter, we gave an introduction to session beans, and explained how
NetBeans can help us speed up session bean development. We covered how
Enterprise JavaBeans in general and session beans in particular, allow us to easily
implement transaction strategies in our enterprise applications. We also covered
how we can implement Aspect Oriented Programming ( AOP ) with session beans
via interceptors. Additionally, we discussed how session beans can have one of
their methods invoked periodically by the EJB container by taking advantage of
the EJB Timer Service. Lastly, we covered how NetBeans can help speed up the
implementation of the data access layer of our applications by generating session
beans implementing the Data Access Object ( DAO ) design pattern automatically.
Search WWH ::




Custom Search