• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why can't session bean business methods be final?  RSS feed

 
Anthony Watson
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the Head First EJB book (p. 235), it says that session bean business methods must not be declared as final. Can anybody tell me why?

I want to create an abstract Template class that has a final method called saveOrder that calls a bunch of methods that are declared as abstract in the Template but which will be implemented by a session bean that extends the Template. I'm wondering if having the saveOrder method declared as final will cause a problem.

Thanks for any wisdom/advice.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The method will be overriden by container specific classes to provide services like Transaction etc, so the methods should not be final.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!