I am attempting the 2nd part of the assignment. I have a question regarding the EJB and DAO. From what i understand, DAO is a OO-pattern, so do we use DAO when we want a persistence layer without EJB and we write our own JDBC and sql code to access the database.
Or is entity bean still required ? then where does the DAO come in ?
DAO is used to abstract the data access to the persistence layer. This frees the client of DAO layer from knowing any implementation specific details, like using EJB or not. The decision to use DAO doesn't dictate that you must use JDBC to implement it. You are free to choose any implementation technology (for example EJB, Hibernate, JDBC) you find appropriate.
So if i intend to use DAO inside my sequence diagram, I need only show the DAO and not EJB ? Cos the DAO encapsulate the db access logic, and we are free to use EJB or hibernate in our implementation.
The assignment says it has to be J2EE compliant, but right now my sequence diagram only shows JSP/servlet, session beans and DAO. No Entity Beans yet, so i am not sure whether this will be truly J2EE compliant.
Appreciate any advice.
Thanks & rgds Mandy
Oh the stink of it! Smell my tiny ad!
SKIP - a book about connecting industrious people with elderly land owners