• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJBContext methods

 
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Prasad Kuppa
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sudhir V
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oops!!! I completely misunderstood the question.
 
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Prasad Kuppa
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.. but the getEJBHome() and getEJBLocalHome() also do not make sense with MessageDrivenContext ( no home interface for Message driven beans.. )
Prasad
 
reply
    Bookmark Topic Watch Topic
  • New Topic