Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

EJB Gurus, what methods a CMP entity bean must and must not implement ?

 
Rancher
Posts: 3645
38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, EJB Gurus !
Reading EJB Specs for topic


Identify the interfaces and methods a CMP entity bean must and must not implement.


I can not realize, is it *mandatory* to provide implementations for ALL
callback methods from EntityBean interface (ejbLoad, ejbStore, ejbPassivate, ejbActivate) ? Even empty .... I suspect that we MUST provide even empty, but for what reason ? And where it written in specs ?
Since class will *alwayls* be abstract, we MAY omit some methods implemenations from interface (according for *general* Java rules).
But, CAN we do this in EJB ?
Thanks.
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mikalai,
First thanks for the positive feedback (27/10/03) on JDiscuss regarding www.revisingscbcd.co.uk much appreciated.
To understand why you need to implement these methods you need to understand how the container works and how it provides callback methods to the entity bean (also what callback methods are). You may find it useful reading the EJB specification starting at about 10.7.7 (regarding entity bean lifecyle).
I will be posting some examples of entity beans soon on my site so it may be worth running through a few of them to get to grips with what is actually happening to the "empty" methods.
Good luck with the exam,
Mike Cogan
[ November 14, 2003: Message edited by: Mike Cogan ]
[ November 14, 2003: Message edited by: Mike Cogan ]
    Bookmark Topic Watch Topic
  • New Topic