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

EJB Spec VS HFEJB(ejbCreate)

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
on pg 192 , EJB spec says that CreateException is a must for ejbCreate.
on page 335 in HFEJB , its not ...
please clarify...
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You must declare javax.ejb.CreateException for the ejbCreate() method of an entity bean, but this is optional for a session bean (see p96 of the EJB spec).
For a message-driven bean, the ejbCreate() method must not declare any application exceptions.
 
Ramakrishna Allam
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks very much . Its a great point . I could not observe that . Looks like i need to see everything very clearly .
 
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nice explanation, Roger Chung-Wee... Thanks for it...
 
Ramakrishna Allam
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Chung,I think its true for irrespective of the statefull ness of the bean (its true for both stateful and stateless beans) .And , all the create methods in remote homes muct throw CreateException. Isnt it?
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I think its true for irrespective of the statefull ness of the bean (its true for both stateful and stateless beans)


Correct.

And , all the create methods in remote homes muct throw CreateException. Isnt it?


The create() method of a remote home interface must always declare both a javax.ejb.CreateException and a java.rmi.RemoteException. This applies to session and entity beans. Of course, none of this applies to message-driven beans as they have no client.
 
Don't MAKE me come back there with this tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic