TRUE or FALSE for these 2 statements:
1) Only stateful session beans can be passivated.
2) session bean class can support overloaded constructors.
=====================
I think (1) should be false while (2) should be true, although the answer says (1) is true (2) is false.
Both questions use the
word 'CAN' meaning they are true if the specification does not explicitly prohibit them.
Well, I search thru the specification and cant really find any comment about stateless bean cannot be passivated. Recall that their bean class
need to give empty implementation of ejbActivate/ejbPassivate anyway. It is meaningless, but possible that the container can call these 2 methods and serialize the bean instance to hdd.
Also,
EJB spec section 7.10.2 says a public constructor with no argument must be provided to sbean class. But it does not mention it cannot provide other constructors taking some arguments (although would not be called anyway).
Am I right?