File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 33107

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]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: DAOs and EJBs
It's not a secret anymore!