The getEJBObject() and getEJBLocalObject() methods are provided in both EntityContext and SessionContext interfaces. Why didn't they provide these two methods in super interface - EJBContext? ( like in getEJBHome(), getEJBLocalHome() in EJBContext..) Thanks, Prasad
good question!!!. I think this is because of the way EJBObjects behave in Session and Entity beans. There are subtle differences like "In session beans for a connected client there is one dedicated EJBObject but for entity beans an EJBObject can handle multiple clients. However the home still behaves the same i.e. one home for al beans of the same type". So I think the implementation of the getEJBObject and getEJBLocalObject needed some change. This is what I think. Does that make sense :roll: Hope someone else throws some light on this.
Sudhir, I am not sure on what you are trying to explain. My question is not about implementation, it is about the interfaces and its super interfaces. I think implementation never rules the interface design in the object oriented programming. Prasad
I wondered about this too. My guess is that those method are not provided in EJBContext because they would make no sense for MessageDrivenContext. Since MessageDrivenContext, SessionContext, and EntityContext extends EJBContext, EJBContext should attempt to only provide methods that make sense for all three. Hope this helps.