473,385 Members | 1,309 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Question about implementing Data Access Object design pattern

I'm developing a J2EE aplication and the project leader told me to
investigate about the Data Access Object design pattern. I did some
research at Sun's blueprints for the enterprise site but there are
some things that I seem to be missing...
My main problem is... If I'm using classes to access data why do I
still need to use EJB's?? Would anyone please point me to some source
code about it???

Thanks in advance and sorry if I misspelled something (English is not
my mother language).
Jul 17 '05 #1
3 3144
mr********@yahoo.com (Yoandy Rodriguez) wrote in message news:<64*************************@posting.google.c om>...
I'm developing a J2EE aplication and the project leader told me to
investigate about the Data Access Object design pattern. I did some
research at Sun's blueprints for the enterprise site but there are
some things that I seem to be missing...
My main problem is... If I'm using classes to access data why do I
still need to use EJB's?? Would anyone please point me to some source
code about it???

Thanks in advance and sorry if I misspelled something (English is not
my mother language).

You could start your study from them comments:
http://www.theserverside.com/news/th...hread_id=23250
Jul 17 '05 #2
mr********@yahoo.com (Yoandy Rodriguez) wrote in message
My main problem is... If I'm using classes to access data why do I
still need to use EJB's?? Would anyone please point me to some source
code about it???


Assuming you have some multi-threaded, scalable infrastructure that
can handle requests (e.g. servlets) then theoretically you don't need
to use EJBs at all.

However EJBs are not just a means of accessing databases, they are
there to abstract your business services and to provide scalability,
transactions, etc. within an application container.

The fact that your team-lead has suggested using DAOs within your EJBs
doesn't change this. All the DAO pattern does is separate data-access
code (e.g. JDBC) from business logic code (i.e. the EJBs) - it's a
basic abstraction.

- sarge
Jul 17 '05 #3
Here is some example source code :

http://www.javapractices.com/Topic66.cjp

Yoandy Rodriguez wrote:
I'm developing a J2EE aplication and the project leader told me to
investigate about the Data Access Object design pattern. I did some
research at Sun's blueprints for the enterprise site but there are
some things that I seem to be missing...
My main problem is... If I'm using classes to access data why do I
still need to use EJB's?? Would anyone please point me to some source
code about it???

Thanks in advance and sorry if I misspelled something (English is not
my mother language).


Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: cppaddict | last post by:
I have a design question which I am posting here because the implementation will be in C++ and I think there may be C++ specific language constructs (eg, friends) that might be relevant to the...
55
by: Steve Jorgensen | last post by:
In a recent thread, RKC (correctly, I believe), took issue with my use of multiple parameters in a Property Let procedure to pass dimensional arguments on the basis that, although it works, it's...
8
by: Shaun C Farrugia | last post by:
I have a multi team solution being built where teams are segmented off into seperate projects. One project is an over all framework containing a Broker class responsible for instantiating...
4
by: emma middlebrook | last post by:
Hi Straight to the point - I don't understand why System.Array derives from IList (given the methods/properties actually on IList). When designing an interface you specify a contract. Deriving...
4
by: Griff | last post by:
Two questions really, the first one "conceptual" and the other more involved with design: 1 - There are two schools of thought where I work on the role of the "controller" task. The first is...
4
by: phl | last post by:
hi, My question is: 1. To avoid possible memory leaks, when you use this pattern, after you have dealth with the unmanaged resources and before you take your object off the finalize queue,...
7
by: Ryan | last post by:
I'm in the process of learning more about building my ASP.NET website to use my SQL datastore and am a bit confused about how ADO.NET works with ASP.NET. This Microsoft article implies that using...
6
by: Bill44077 | last post by:
Hi, I am new to the MVP pattern and one of the main reasons that we are going this route is because we are doing Scrum with 30 day sprints - so we have a continually morphing design. We are...
1
by: Peter Duniho | last post by:
I have run into a design question that I don't have strong feelings about one way or the other, so I'm curious what the OOP gurus think about it. :) A recent post led me to suggest using a state...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.