Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Bean implementing the component interface  RSS feed

 
Kalyan Mudumbai
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.
 
Augg Stine
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
 
Kyle Brown
author
Ranch Hand
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!