the DAO-pattern

Hi,I hava some questions about the DAO-pattern.Do I need for every client that access the data-source over the DAO a new Trasfer/Value-Object?Is the DAO-Object a threadsafe singelton object, or do I create for every client a new DAO-Object?--
[277 byte] By [_edoA_a] at [2007-9-29 18:44:56]
# 1
http://daoexamples.sourceforge.net/ http://www.ibm.com/developerworks/java/library/j-dao/ http://wiki.java.net/bin/view/Javapedia/DataAccessObject
scsulliva at 2007-7-15 18:44:03 > top of Java-index,Other Topics,Patterns & OO Design...
# 2

Hi,

A J2EE Data Access Object is used by a Composite Entity for Bean-managed persistence (BMP).

A J2EE Transfer Object is used to send data to a Session Facade (to then send to client).

You can create a pool of DAO objects that provide services to the pool of stateless session beans (your Session Facade objects)

The CMP 2.* model has gone through significant improvements, you should explore switching over to CMP to avoid these concerns and focus on business-related requirements.

Hope this helps,

Christian

cvelez69a at 2007-7-15 18:44:03 > top of Java-index,Other Topics,Patterns & OO Design...
# 3
Hi,@cvelez69 thank you for the helpful suggestions.I do not use EntityBean-Container at all. I write my own DataAccess with JDBC, cause for my application a EJB-Container would be overstated.--
_edoA_a at 2007-7-15 18:44:03 > top of Java-index,Other Topics,Patterns & OO Design...