• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

EJB and DAO

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Jayant
 
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ...
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic