The moose likes Bunkhouse Porch and the fly likes HFEJB common EJBObject SessionBean interface Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Books and Education » Bunkhouse Porch
Reply Bookmark "HFEJB common EJBObject SessionBean interface" Watch "HFEJB common EJBObject SessionBean interface" New topic
Author

HFEJB common EJBObject SessionBean interface

Rick DeBay
Ranch Hand

Joined: Jul 11, 2003
Posts: 70
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?
Victor Larr
Greenhorn

Joined: Mar 29, 2004
Posts: 16
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.
Pauline McNamara
Sheriff

Joined: Jan 19, 2001
Posts: 4011
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 ]
 
 
subject: HFEJB common EJBObject SessionBean interface
 
Threads others viewed
non remote expection in beans
Doubt on EJBObject
difference between in pool and out of pool
HFEJB common EJBObject SessionBean interface
Home object stub and EJB object stub
IntelliJ Java IDE