Forums Register Login
Data Access Beans
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.
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.
Are you sure you're not talking about Value Objects instead of Data Accesss Objects, which are supposed to contain the logic for managing/abstracting the underlying datasource?
Data access object is normally not a EJB. It is a just a normal java class (or java bean) to used to assist a EJB.
Please do not confuse with EJB.
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...
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!
How do you package the Data Access Objects ?
I package the DAO with EJB which use it in the same component.
Just the other day, I was thinking ... about this tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database

This thread has been viewed 994 times.

All times above are in ranch (not your local) time.
The current ranch time is
Mar 26, 2019 20:18:31.