Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

HFEJB common EJBObject SessionBean interface

Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Page 86 lists a way for the compiler to enforce that the stub and bean both contain the same methods. But the methods for EJBObject should throw RemoteException, and the bean methods shouldn't.
How can this be resolved?
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to define 2 interfaces A and B, B extends A and have the same methods but without RemoteException. Parent interface A will declare RemoteException and your remote interface can extend it. Your bean will implement B which does not throw RemoteException. Child can specialize or not declare exceptions when overwriting operations from parent.
Posts: 4012
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops, has this question really been sitting alone since July?

Even though it was prompted by the book HF EJB, I think it might be better off in the EJB forum where it will have more company. Movin' it over there...
[ September 28, 2004: Message edited by: Pauline McNamara ]
I'm a lumberjack and I'm okay, I sleep all night and work all day. Lumberjack ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic