Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Local Home interface

 
Jayashree Mohan
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am confused in this part. The EJB 2.0 specs say that
The local home interface allows a local client to do the following:
� Create a new session object.
� Remove a session object.

how is this possible? Session objects do not have primary keys that are accessible to clients, invoking the
javax.ejb.EJBLocalHome.remove(Object primaryKey) method on a session results in the javax.ejb.RemoveException.
So it local home interface can be used only for creating a new session object? Am I right?
 
Greg Charles
Sheriff
Posts: 3002
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The EJB 2.0 specification is full of minor internal consistencies. This one is on page 60, in section 6.4. It is just wrong; there is no usable remove method from the local home interface for session beans. I'm guessing there was a cut-and-paste error from remote interfaces. Section 6.4.2 on the same page, which elaborates on the remove process, correctly describes the remove operation through the component interface, and notes that javax.ejb.EJBLocalHome.remove(Object primaryKey) will result in a remove exception.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic