• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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.
 
If we don't do the shopping, we won't have anything for dinner. And I've invited this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic