Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

EJB Spec VS HFEJB(ejbCreate)

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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.
 
There’s no place like 127.0.0.1. But I'll always remember this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic