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

ejbCreate() and ejbRemove() on SLSB

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The HFEJB (pg 228) and Spec (pg 90) both state that a SLSB can get a reference to its EJB object in ejbCreate() and ejbRemove() via the SessionContext's getEJBObject() and getEJBLocalObject().
This doesn't make any sense to me. SLSB instantiation and removal is completely decoupled from client calls to create() and remove(). Furthermore the container does not link a bean to its EJB object until the client invokes biz methods on the EJB object (pg 226 HFEJB and section 7.9 of spec).
So how does the SessionObject return a valid EJB object in ejbCreate and ejbRemove()?
Carlos
 
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's been a post going on about this for several days. You may want to check it out and see if it answers all of your questions. https://coderanch.com/t/159060/java-EJB-SCBCD/certification/ejbCreate-Stateless-Session-Bean
 
carlos fernandez
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks.
it looks i violated the first commandment of forums before i posted
thy shall scour the forum before posting
 
Did you miss me? Did you miss 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