I have WLC question which probably wrong, but I will post to discuss:
Which statement characterizes stateless session beans?
A - They allow the PostConstruct, PreDestroy, and PrePassivate life-cycle callbacks.
B - They require home interfaces.
C - When a client looks up a stateful session bean in the JNDI, the same bean is returned every time.
D - They are asynchronous message consumers.
The correct answer by WLC is A, but PrePassivate callback is only available for stateful beans. I marked D, because MDB is a special stateless bean which supports asynchronous messages. What yours opinions?
here is tricky part, PrePassivate does not make sense for Stateless Session bean, if you have it in your bean, it won't be called but won't complain also about abuse use (not following the contract (rule) mentioned in spec).
But quesiton says, Which statement characterizes stateless session beans? If we talk about having @PrePassivate in SLSB then question should have been , what callbacks are valid / allowed/ don't generate error in SLSB, or something like that. Makes sense ??
I think this could be problem in question.