• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB Entity Class, its methods and Persistence variables must not be final

 
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
EJB Persistence Spec Section 2.1 : The entity class must not be final. No methods or persistent instance variables of the entity class may be
final.


Hi ,
As you know that Entity class must not be declared as final. The only reason , I can think of it is that the Application server might be extending the user written entity class. Cause the excat reverse of this is the purpose of final. Is this explanation correct?
Question 2: If yes can i see the resulting class which could have extended my Entity class?
Queston 3: Further to this rule, any method in the entity class must not be declared as final. This means that Application server again would be extending the class and overriding all the methods in the entity class. Is this correct?
I think if one can get to see the resulting class, these questions can be answered very easily.
Question 4: Whats with not allowing to declare variables with final? Why is this rule applied ?

I hope to get answers to my questions.

 
LOOK! OVER THERE! (yoink) your tiny ad is now my tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic