• 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

www.ejbcertificate.com

 
Ranch Hand
Posts: 358
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which method can access an enterprise bean in a consistent manner for a container managed stateful session bean that implements the SessionSynchronization interface?

1. constructor()
2. setSessionContext()
3. ejbCreate()
4. beforeCompletion()
5. afterCompletion()

The correct is 4 - afterCompletion()

But according to page 196 of the HF EJB ejbCreate() can access another bean's menthods. Please advise.
 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More surprises! Refer to the table in Page:80 in the spec. ejbCreate() and beforeCompletion() are allowed to access EJBs.
[ March 21, 2005: Message edited by: Keerthi P ]
 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there Parmeet,

Its talkin about consistancy, when I came accross this question on ejbcertificate.com, here is what I thought and answered right.

1)constructor : cant access
2)setSessionContext: cant access
3) ejbCreate: you can access, but remember its CMT with stateful bean ..this will create problems when called method asks for client context and caller has anything like NotSupported, Never, Supports.
4)beforeCompletion: damn correct......dont need explaination..(its correct)
5)afterCompletion: simply incorrect...dont need explainagion( he he).

Amol.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic