session beans: a call to remove a passivated bean will NOT invoke ejbActivate(). HFEJB - question 7 page 253 Entity beans: a call to remove a passivated bean will invoke ejbActivate(). HFEJB - question 16 page 371 Just want to confirm that the above summary is accurate. - walk rustin
Walker, I think you are right. But ejbActivate() and ejbPassivate() mean different things for SFSB and Entity beans. ejbActivate()/ejbPassivate() for SFSB involves serialization/deserialiation of the bean's state to a flat file to conserve resources, while Entity bean's ejbActivate()/ejbPassivate() involves the bean coming out the bean instance pool and going back to the pool ... ...IMO, comparing them conceptually could be confusing sometimes.
Remember for entity beans you cannot really remove a bean. the question actually states "when invoking ejbRemove()". This means that if the row is already not loaded into an bean instance then the container has to first load the data into a bean from the pool and this wud require calling ejbActivate and ejbLoad. Also the question says "might". If it wud have said "must" then none of the answer choices wud have sufficed. Please see this post for a further discussion on this topic https://coderanch.com/t/158574/java-EJB-SCBCD/certification/Additional-methods-which-might-called