• 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:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Session Beans & Entity Beans together

 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
How Entity beans are called from Session beans.? I mean the same steps required that client has to do? (JNDI lookup,home stub vs.)
Thnks
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is only one difference, in case of Session beans you get remote object by calling create method but in the case of Entity means we call finder() methods or create() when new data needs to be inserted into the database.
 
Murat Balkan
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want the client to call a session bean. This bean will make the db processes through entity beans. Client has to make a JNDI query, and then create for the session bean, thats ok. But my question is this session bean has to make jndi lookups for entity beans that it will be using? (They are on the same VM)
 
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Murat Balkan:
I want the client to call a session bean. This bean will make the db processes through entity beans. Client has to make a JNDI query, and then create for the session bean, thats ok. But my question is this session bean has to make jndi lookups for entity beans that it will be using? (They are on the same VM)



Yes, you'll have to do a lookup, you should consider using a homecache pattern, also you can get the local interface instead of the remote one if you're using ejb 2.0
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are using EJB 2.0, you can use the "Local" interface instead of the Remote interface.
 
When I was younger I felt like a man trapped inside a woman’s body. Then I was born. My twin is a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic