Forums Register Login

www.ejbcertificate.com

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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 ]
+Pie Number of slices to send: Send
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.
Story like this gets better after being told a few times. Or maybe it's just a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 645 times.
Similar Threads
Why CMT SFSB ejbCreate can access other bean ?
operations allowed in the methods of stateful session bean
More Mock Questions Here
Question about accessing another bean's methods
ejbcertificate.com - Session Bean Lifecycle
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:25:05.