• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The ejbPostCreate Method

 
Maria George
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am going through the sun J2EE tutorials...I have some doubts on entity bean example:
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/
It says: For each ejbCreate method, you must write an ejbPostCreate method in the entity bean class. The EJB container invokes ejbPostCreate immediately after it calls ejbCreate.
My question is can we allow a client to invoke this method (indirectly ofcourse) by defining postCreate method in the home interface..
[ December 25, 2006: Message edited by: Maria George ]
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nope.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No that is not allowed. You have a postCreate() to tell the bean that an EJBObject is now available for use. You create the primary key in ejbCreate() and by the time its postCreate() the bean has full beaness and can even enter into a transaction.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic