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

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

 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. Thats exactly what I thought that the author's intention might be. Thanks.
 
reply
    Bookmark Topic Watch Topic
  • New Topic