Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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 ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Bean implementing the component interface

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
though it's legal for a Session bean to implement it's component interface (the interface that exposes the business methods), I never got to see anyone doing this. Why is it so? Is it because the EJBObject's methods are also exposed to the client (which are anyway exposed to the client through the stub returned by Home)?
Thanks,
Kalyan.
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are not implementing that we make a way for the container to implement.
When we r deploying the EJB, the container creates some .class files one of which would implement the component interface that the container could manage the EJB effectively.
I think that this partially answers ur question
rgds/ Augg
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the bean does not implement the component interface, then it keeps programmers from accidently substituting an instance of the bean class for the actual EJB. You may think "this is never something I'd do", but in fact we had a customer do this over 1000 times in their code...
Kyle
 
    Bookmark Topic Watch Topic
  • New Topic