File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes EJB and DAO Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "EJB and DAO" Watch "EJB and DAO" New topic
Author

EJB and DAO

mahesh narayan
Ranch Hand

Joined: Aug 12, 2003
Posts: 41
Hi

I am quite new to concept of EJB. I have a requirement of invoking a DAO object from EJB. Can someone guide me on this. Any help would be highly appreciated. Thanks

rgds
Mahesh
jayant shanker
Greenhorn

Joined: Feb 18, 2004
Posts: 5
Hi mahesh..
As you r new to this concept of DAO and EJB.Let me just brief you when to use DAO in EJB.When you are just looking up some records or extrcat record on the basis of some complex join do it with DAO instaed of EJB QL.
Its better to avoid Create and Update thing with DAO ,do it with EJB.
So how to use it ..well
write a session bean method which makes a call to java class.The java class should use the same connection object made in the session bean.
The java class will, use the connection object make a sql query or a procedure ,execute it and extract the result and send it again to that session bean method and that session bean will use this result for further manipulation.
mahesh narayan
Ranch Hand

Joined: Aug 12, 2003
Posts: 41
Thanks Jayant
Pj Murray
Ranch Hand

Joined: Sep 24, 2004
Posts: 194
Hello,

You can read a little about EJBs and DAOs here:

http://www.codefutures.com/ejb-code-generation/

FireStorm/DAO generates EJB DAOs - so you could learn a lot by downloading and trying it out:

http://www.codefutures.com/products/firestorm/download/

Hope this helps ...


PJ Murray - Sites developed using CodeFutures technology:
lawinjuryaccidentsclaim
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB and DAO
 
Similar Threads
Data Access Beans
share entitymanager between sessionbeans (jpa)
Thread problem
DAO and EJB etc..
DAO class generation with XDoclet