wood burning stoves 2.0
The moose likes EJB and other Java EE Technologies and the fly likes DAOs and EJBs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "DAOs and EJBs" Watch "DAOs and EJBs" New topic

DAOs and EJBs

Anand Gondhiya
Ranch Hand

Joined: Feb 24, 2004
Posts: 155
Hi All,

I use Weblogic 8 , Win 2000 , Struts , EJB ( Bean Managed persistence- BMP ), design patterns like DAOs(Data Access Objects) and Data Transfer Objects/Value Objects ( DTOs/ VOs). IDE is Eclipse.

Now I have three Projects in the App.

1. NEA -> It's got JSPs , Struts Classes.
2. NEA_EJB -> Entity Beans with BMP + DAOs
3. NEA_DTO -> seperate project containng DTOs which is being used by NEA_EJB.

Is it a professional attitude to put DAOs and EJBs together in one JAR file ???

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 31421

Yes, it is fine to put the DAOs and EJBs in the same project. Both are in the data transfer layer. It would be even better to put them behind a stateless session bean. That abstracts the client from even knowing what technology you are using for db access.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
subject: DAOs and EJBs