Monday, April 18, 2011

JBoss Seam Architect Solution

JBoss Seam is also a key component of the JBoss Enterprise Application Platform.

JBoss Seam used to hibernate-annotion for Object Relational Mapping (ORM) data access.

JPA stands for Java Persistence API , also known as EJB3 persistence , It is the Java standard for creating object oriented Java database applications.

Data Access Object (DAO) is an object than provides an abstract interface to some type of database or persistence mecanism,providing some specific opertaion without exposing details of database.It provides a mapping from application calls to the persistence layer.This isolation separates the concerns of what data accesses the application needs, in terms of domain-specific objects and data types(the public interface of the DAO), and how these needs can be satisfied with specific DBMS database schema.
Advantages:
de-couple data access related code like java,sql package api, webservice apis etc from business/client layer/code.
stateless for concurrency and scalabe system.
encapsulate datastore related exception handling from client/caller code.
easy to mock up data access for early in developement and unit testing to happen.
provide simple to use abstraction to the data access API.
Disadvantages:
Requires large volumes of implementation code to be written (unless a DAO code Generator is being used for example HibernateTools).
Writting code to navigate the object model requies some understanding of the database schema.

for service layer a developer can used to intercept exception and transaction result in example seam framework CDI.