i was reading the j2EE manual for ibm visual age for java 4.0-just wondering what data acess beans were-i know what session and entity beans are. will only know what/how many types of EJBs are needed for a particular proj once i can differentiate between all the different types. thanks.
Hi, I think you are talking about Data Access Objects. These objects are used within Enterprise beans to minimize remote calls (which are expensive). Using them the call is reduced to a single object get/set call instead of the individual get/set methods for each attribute in the EJB. Do not confuse them for a different type of EJBs. Hope that clarifies your doubt.
Riju, Data Access Bean is something PROPRIETARY to IBM. It is a kind of Data Access Object which inherit from an IBM class. If you use them, you won't be able to deploy on a app server but IBM WebSphere.... So... As it was said before, Data Access Bean is not part of the EJB spec. Be aware you'll be stucked forever with IBM if you use them
My 2 cents...
/ JeanLouis<br /><i>"software development has been, is, and will remain fundamentally hard" (Grady Booch)</i><br /> <br />Take a look at <a href="http://www.epfwiki.net/wikis/openup/" target="_blank" rel="nofollow">Agile OpenUP</a> in the Eclipse community
Data Access Beans employ the (com.ibm.db.dbbeans?), which is a package that just extends the functionality of the java.sql package adding methods for more flexibility and optimization. But the concept is different from a DAO. I think of data access beans, which you can write without the IBM extensions, as a means of managing data sources without using RMI-IIOP. In this sense, they are not entity beans and I believe they are probably just applicable to web servers. However, I still find the terminology confusing. Can one of the local gurus around here provide a more precise definition (i.e, would it be appropriate to call them JDBC session beans?). [ July 23, 2002: Message edited by: Elizabeth Reynolds ]
Only the original poster can add more clarity to the discussion by quoting more references. However, I can add my two cents worth by explaining what Data Access Object pattern is in the context of EJB development. DAO ( aka Data Access Command Bean ) encapsulates the logic to talk to the database using JDBC. It has a bunch of attributes that can be set using setters and four main commands - update(), delete(), select() and insert() that can be invoked to talk to the database. DAOs can be very useful if you perform direct JDBC calls for reading and use EJB layer if you need transaction capabilities. Since the JDBC-calls and ResultSet manipulation is common between the two scenarios, it makes sense to encapsulate the common logic in a domain-centric DAO( one for each domain object ) and make use of it both for plain JDBC calls as well as from the entity beans layer. It is, according to Floyd Marinscu, the author of famous "EJB Desing Patterns" book, one of the early lifecycle component that you design and write before writing the EJB layer. Hope that helps!
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).