Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB lookup and Jboss SEAM  RSS feed

sumit anand kumar
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • 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?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!