Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

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
 
Something about .... going for a swim. With this tiny ad ...
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic