Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB and DAO  RSS feed

 
mahesh narayan
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jayant
 
Pj Murray
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!