Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

MDB ejbCreate And createException

 
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sunglasses. AKA Coolness prosthetic. This tiny ad doesn't need shades:
The trailboss has a kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic