Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ejbPostCreate()

 
Venkatesh Kumar
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All;
In a CMP entity bean every create method of home interface must be matched by ejbCreate and ejbPostCreate methods.
On page 318 in HF-EJB ejbPostCreate() is missing in the CustomerBeanCMP.Is that an error or...?
Why is the entity bean declared abstract??
Thanks in advance
Kumar
 
Keith Rosenfield
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Venkatesh:

On page 318 in HF-EJB ejbPostCreate() is missing in the CustomerBeanCMP.Is that an error or...?

I noticed the same thing and brought it to Kathy Sierra's attention. She confirmed it to be an error.
Why is the entity bean declared abstract??

The spec requires a CMP entity bean to declared abstract. The following can be found in 10.3.1.
� The Bean Provider must define the entity bean class as an abstract class. The container provides
the implementation class that is used at runtime.

The class must be declared as abstract because it contains abstract methods. The container will subclass the entity bean class with a concrete subclass.
I hope this clears things up.
[ January 02, 2004: Message edited by: Keith Rosenfield ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic