Java Reference
In-Depth Information
Consequences
Benefits
• Declarative transaction support has no impact on existing source code.
• With the Spring declarative transaction and different transaction manager support,
the same application can be switched from the application server to the web server
with few configuration changes.
• Spring transactions have configurable rollback support.
• Stand-alone applications are no longer required to use programmatic transactions.
These applications can now leverage Spring declarative transaction support out-
side the container as well.
Concerns
• Transaction and AOP concepts are difficult to grasp for less experienced develop-
ers. So, a significant learning curve is involved in using Spring or even EJB
declarative transactions.
Summary
In this chapter, I discussed some critical Java EE application aspects that are generally
ignored or are mostly afterthoughts. Security design is of utmost importance for any
enterprise application, and much has been written on this subject. This is especially
important for Java EE applications because they service a variety of clients. The Authenti-
cation and Authorization Enforcer pattern can be used to prevent any malicious access to
system resources. With out-of-the-box support from Spring Security, you can set up a
security layer with mere configuration.
An audit trail is another widely used but often ignored concern in Java EE applica-
tions. With Spring AOP-based interceptor support, it is possible to deploy a robust,
nonintrusive, and declarative audit trail system. Although EJB containers provide com-
prehensive transaction support, it comes with a price. Your codebase will not run outside
the EJB container, thus severely limiting portability. With Spring AOP-based declarative
transaction support, the domain service objects run almost seamlessly in EJB containers,
web containers, and stand-alone components.
 
Search WWH ::




Custom Search