Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

CreateException for entity beans

 
Sven Thor
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Enterprise JavaBeans by Monson-Haefel it says on page 78 about entity beans:

"Although it is not required by the EJB specification, some J2EE application vendors insist that ejbCreate() throw a javax.ejb.CreateException..."

However, 10.6.4 in the EJB2.1 specification says about entity beans, "The throws clause must define the javax.ejb.CreateException..."

Can anybody clarify this point for me ? Is it a MUST for ejbCreate() to throw CreateException ?

BR,
Sven Thor
 
sawan parihar
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
The throws clause of ejbCreate must define the javax.ejb.CreateException for entity beans.[ EJB 2.0 and EJB 2.1]

hope it helps.
[ July 15, 2005: Message edited by: sawan parihar ]
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is true for CMP beans, but BMP beans have the option to declare javax.ejb.CreateException.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!