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

HFEJB: Pg 560, getPrimaryKey() on Session bean context!

 
Keerthi P
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

A session bean calls getPrimaryKey() on its context.
The bean gets IllegalStateException.


How can this be possible when there is no getPrimaryKey() method in a session bean's context (javax.ejb.SessionContext)? Neither SessionContext nor its super type, EJBContext, has getPrimaryKey() method. Only EntityContext has it. A SessionBean cannot see it, though.
[ February 10, 2005: Message edited by: Keerthi P ]
 
Jeff Walker
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Keerthi,
Your point is taken. You are correct of course, I think it's a typo.
Try replacing 'context' with 'component interface' and the question makes more sense?
-jeff walker
 
Keerthi P
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. Thats exactly what I thought that the author's intention might be. Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic