wood burning stoves 2.0*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Doubt in SessionBean contract Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Doubt in SessionBean contract" Watch "Doubt in SessionBean contract" New topic
Author

Doubt in SessionBean contract

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

Guys,

Why can't a SessionBean class be declared as final. It is understandable that it can't be abstract, but why not final? Discussions...


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

Is there any mention from the specifications that it cannot be declared final? Anyways, the best solution for me would be to try it and I'm going to do that now.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9947
    
160

Is there any mention from the specifications that it cannot be declared final?

It's mentioned in the spec:

EJB3 Spec, Section 4.6.2 wrote:The class must be deļ¬ned as public, must not be final, and must not be abstract. The class must be a top level class.


but why not final?


It's a way to allow EJB container implementations to subclass the bean class if required.


[My Blog] [JavaRanch Journal]
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

Good. Thanks for the reference from the Specifications.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt in SessionBean contract
 
Similar Threads
[static constructor]....
requirements for session beans
contructor
Why cannot constructors be final
EJB to EDB Mapping problems