• Post Reply Bookmark Topic Watch Topic
  • New Topic

Session Beans & Entity Beans together  RSS feed

 
Murat Balkan
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • 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
 
v Gupta
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • 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
  • 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)
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
  • 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
 
Raj Mehta
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using EJB 2.0, you can use the "Local" interface instead of the Remote interface.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!