aspose file tools *
The moose likes EJB and other Java EE Technologies and the fly likes EJB lookup and Jboss SEAM Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB lookup and Jboss SEAM " Watch "EJB lookup and Jboss SEAM " New topic
Author

EJB lookup and Jboss SEAM

sumit anand kumar
Ranch Hand

Joined: Apr 28, 2010
Posts: 83
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB lookup and Jboss SEAM