File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Business Method final?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Business Method final??" Watch "Business Method final??" New topic
Author

Business Method final??

Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1844
Is there any specific reason why the business method in a bean must not be final
shalu saxena
Greenhorn

Joined: Jan 18, 2001
Posts: 11
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

Joined: Sep 29, 2000
Posts: 75
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

Joined: Jun 12, 2000
Posts: 118

hi rahul
hope u now undertands why the bussiness methds cant be declered final


<a href="http://www.jobklub.com" target="_blank" rel="nofollow">http://www.jobklub.com</a><br /> 'Add Job To Life'
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Business Method final??
 
Similar Threads
Can helper method be defined static or final in bean class?
illegal combos
Can ejbHome Methods be declared as final?
static methods and EJB
private method