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 ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

ejbCreate method

Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

There is no ejbCreate() method in the session bean interface but bean developer has to implement the corresponding the ejbCreate() method in the stateful session bean or ejbCreate() in case of stateless session bean. Why this assumption is left to the bean developer.

By chance if the bean developer forget to define the ejbCreate() in a bean class or create() in home interface of a Stateless Session Bean. What will happen?

Thanks & Regards,
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lets play by rules !! For Stateless Session Bean, the "Bean Rule" states we MUST have a create() in the home interface and this should be matched with a corresponding/matching ejbCreate()method in the Bean Class.

A CreateException will be thrown back to the client if the Bean Provider forgets to declare the above methods

- Sundar, IBM India.
Story like this gets better after being told a few times. Or maybe it's just a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic