aspose file tools*
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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: 9243
    
    1

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, SCBCD Hints - Demnachst, SCDJWS - Auch Demnachst
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9243
    
    1

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: 9343
    
111

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: 9243
    
    1

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
Why cannot constructors be final
contructor
EJB to EDB Mapping problems