Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Subject: Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Subject: Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
Subject: Session - > DAO - > CMP

Subject: Session - > DAO - > CMP

2004-06-10       - By Amit Angerkar

 Back
Reply:     1     2     3     4     5     6     7     8  

Hi,

Example at sun site shows you two ways of implementing the DAO with XMLDAO and
JDBCDAO as samples :
http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html

Cheers,
~Amit

Koala wrote:

> ashraf galal wrote:
>
> > It is a good approach based on good OO design principles. It uses
> > ordinary java interfaces rather than special infrastructure such as
> > that associated with entity beans.
> >
> >
> >
> > DAO uses an abstraction layer of ordinary java interfaces between
> > business logic and persistence components.
> >
> > The implementation of this interfaces handle persistence logic.
> >
> >
> >
> > Entity beans provide a similar abstraction between business logic and
> > persistence storage, but they lock us into one way of accessing data
> > and one particular O/R mapping solution.
> >
> >
> >
> > DAO pattern leaves us a choice, we can use JDO, JDBC, or entity beans
> > to implement DAO interfaces.
> >
> >
> >
> > With DAO, we can work inside or outside an EJB container, so we can
> > use same DAO implementations in any location, that means flexibility.
> >
> >
> >
> > We are not handle transaction or security, leaving this to business
> > logic components.
> >
> >
> >
> > You can find good  information in the http://www.corej2eepatterns.com
> > <http://65.54.187.250/cgi-bin/linkrd?_lang=EN&lah
=38c68bcbcd405911ed54e61b76d97d5e&lat=1086804232&hm___action=http%3a%2f%2fwww
%2ecorej2eepatterns%2ecom>
> >
> >
> >
> > DAO can be used anywhere in a J2EE application.
> >
> >
> >
> >
> >
> >
> > Ashraf Galal
> > (416)804-8359
> >
> > -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
> > Free yourself from those irritating pop-up ads With MSN Premium
> > <http://g.msn.com/8HMBENCA/2734??PS=47575> Get 2 Months FREE*
>
> So, if my application use only EJB for persistence it makes no sense use
> DAO.
>
> But, as you said above, if this is not the case (I have persistence
> layer implemented in EJB, SQL, JDO etc) I can use this solution.
>
> At this point the question is: is it possible have an application with a
> persistence layer implemented with EJB, SQL, JDO, Hibernate and so on?
>
> I know that in some EJB application could be useful use SQL for BULK
> operations. In this case what should be the approach? I mean, is DAO
> sufficient
> for abstraction or I need others  patterns?
>
> Again, is it possible use EJB, JDO and Hibernate (or other persistent
> mechanism) at the same time? If, so can you tell me an example?
>
> ====================================================================
> Companion Site: http://www.corej2eepatterns.com
> J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
> List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
> Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)

--
NOTICE: If received in error, please destroy and notify sender.  Sender does
not waive confidentiality or privilege, and use is prohibited.


====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi,
<p>Example at sun site shows you two ways of implementing the DAO with
XMLDAO and JDBCDAO as samples :
<br><A HREF="http://java.sun.com/blueprints/corej2eepatterns/Patterns
/DataAccessObject.html">http://java.sun.com/blueprints/corej2eepatterns/Patterns
/DataAccessObject.html</A>
<p>Cheers,
<br>~Amit
<p>Koala wrote:
<blockquote TYPE=CITE>ashraf galal wrote:
<p>> It is a good approach based on good OO design principles. It uses
<br>> ordinary java interfaces rather than special infrastructure such
as
<br>> that associated with entity beans.
<br>>
<br>>
<br>>
<br>> DAO uses an abstraction layer of ordinary java interfaces between
<br>> business logic and persistence components.
<br>>
<br>> The implementation of this interfaces handle persistence logic.
<br>>
<br>>
<br>>
<br>> Entity beans provide a similar abstraction between business logic
and
<br>> persistence storage, but they lock us into one way of accessing data
<br>> and one particular O/R mapping solution.
<br>>
<br>>
<br>>
<br>> DAO pattern leaves us a choice, we can use JDO, JDBC, or entity beans
<br>> to implement DAO interfaces.
<br>>
<br>>
<br>>
<br>> With DAO, we can work inside or outside an EJB container, so we can
<br>> use same DAO implementations in any location, that means flexibility.
<br>>
<br>>
<br>>
<br>> We are not handle transaction or security, leaving this to business
<br>> logic components.
<br>>
<br>>
<br>>
<br>> You can find good&nbsp; information in the <a href="http://www
.corej2eepatterns.com">http://www.corej2eepatterns.com</a>
<br>> &lt;<a href="http://65.54.187.250/cgi-bin/linkrd?_lang=EN&lah
=38c68bcbcd405911ed54e61b76d97d5e&lat=1086804232&hm___action=http%3a%2f%2fwww
%2ecorej2eepatterns%2ecom">http://65.54.187.250/cgi-bin/linkrd?_lang=EN&amp;lah
=38c68bcbcd405911ed54e61b76d97d5e&amp;lat=1086804232&amp;hm___action=http%3a%2f
%2fwww%2ecorej2eepatterns%2ecom</a>>
<br>>
<br>>
<br>>
<br>> DAO can be used anywhere in a J2EE application.
<br>>
<br>>
<br>>
<br>>
<br>>
<br>>
<br>> Ashraf Galal
<br>> (416)804-8359
<br>>
<br>> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
<br>> Free yourself from those irritating pop-up ads With MSN Premium
<br>> &lt;<a href="http://g.msn.com/8HMBENCA/2734??PS=47575">http://g.msn.com
/8HMBENCA/2734??PS=47575</a>>
Get 2 Months FREE*
<p>So, if my application use only EJB for persistence it makes no sense
use
<br>DAO.
<p>But, as you said above, if this is not the case (I have persistence
<br>layer implemented in EJB, SQL, JDO etc) I can use this solution.
<p>At this point the question is: is it possible have an application with
a
<br>persistence layer implemented with EJB, SQL, JDO, Hibernate and so
on?
<p>I know that in some EJB application could be useful use SQL for BULK
<br>operations. In this case what should be the approach? I mean, is DAO
<br>sufficient
<br>for abstraction or I need others&nbsp; patterns?
<p>Again, is it possible use EJB, JDO and Hibernate (or other persistent
<br>mechanism) at the same time? If, so can you tell me an example?
<p>====================================================================
<br>Companion Site: <a href="http://www.corej2eepatterns.com">http://www
.corej2eepatterns.com</a>
<br>J2EE BluePrints: <a href="http://java.sun.com/blueprints/corej2eepatterns"
>http://java.sun.com/blueprints/corej2eepatterns</a>
<br>List Archive: <a href="http://archives.java.sun.com/archives/j2eepatterns
-interest.html">http://archives.java.sun.com/archives/j2eepatterns-interest.html
</a>
<br>Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)
.com</blockquote>

<p>--
<br>NOTICE: If received in error, please destroy and notify sender.&nbsp;
Sender does not waive confidentiality or privilege, and use is prohibited.
<br>&nbsp;</html>
====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.