• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Business Method final??

 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any specific reason why the business method in a bean must not be final
 
shalu saxena
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi rahul ,
i feel that as business methods have to be defined in your bean's remote interface and have to be overridden in the bean class , u can't declare them as final . coz' if they r declared final how will they be overridden .
 
Asuthosh Borikar
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The container/server has to implement the stubs and skeletons for the Remote interface of the EJB. The stub resides on the client machine and delegates the method call to the skeleton, which resides in the container. The skeleton interprets the parameters sent to it, and delegates the call to the appropriate business method in the EJB. One of the ways a container can implement this skeleton is to extend the EJB class, and have the method call delegate to the superclass. If the business methods are declared final, the container can no longer extend the EJB class to implement the skeleton. Of course, the skeleton can be implemented in other ways, but I guess Sun decided to leave the decision to the J2EE app.servers.
 
hanumanth reddy
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

hi rahul
hope u now undertands why the bussiness methds cant be declered final
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic