• 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
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

EJB lookup and Jboss SEAM

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I recently started reading Head First EJB and very quickly have been able to start understanding EJB.
One comon thing in EJB remote is use of lookup.
We use lookup to get the EJB home and from EJB home we can get EJBObject thats used to access the bean.
This is how it happens in EJB2.0 I am not sure how it happens in EJB3.0
The project i am working on uses SEAM and EJB3. I saw they are directly looking up the session beans using the Intitial Context.
The HOME classes are only there for entity beans and not session beans.
More over we are not even doing lookup for entity beans.
Simply from session bean we are doing
@In(create = true)
private MyEntityHome myEntityHome;

My question is why are we not doing lookup for the entity bean. Is it that since my session bean and entity bean are both at server so it can be treated locally ?
In that case when should i do lookup for entity bean?
Also why there is no HOME class for the session bean? How come we are directly doing lookup for the session bean. I it legal?
 
Don't sweat petty things, or pet sweaty things. But cuddle this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic