Win a copy of AWS Security this week in the Cloud/Virtualization 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

MDB ejbCreate And createException

 
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can an ejbCreate() method in MDB throw CreateException? What happens if it does throw? If it's not allowed , then why not? can anybody explain....
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can not throw CreateException in ebjCreate() methods of MDB , session bean and entity bean.the mothods its name begin with "ejb" invoked by container,container does expect get application exception such as CreateException .But you can throw CreateException in Create() methods of session bean and entity bean home interface, but not MDB.beasause MDB have not client, if you throw one, who will receive it.(MDB have not Home interface and component interface.)
[ March 04, 2004: Message edited by: si yi ]
 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Si
CreateExceptions are allowed to be thrown from ejbCreate methods of session and entity beans but not from MDB beans. See EJB Spec Pg 96 7.10.3.
 
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also spec section 15.7.3 page 324 - you aren't supposed to even declare any application exception on the ejbCreate for an MDB.
 
machines help you to do more, but experience less. Experience this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic