4. Which method(s) can be run by a CMP bean in a pooled state?
A. ejbLoad() B. ejbFind() C. ejbStore() D. ejbCreate() F. ejbHome()
I answered only F. The answer given is B & F. As I understand in CMP Entitybean , we do not specify ejbFind method in Bean class but only in DD. I am confused why is B correct answer?
Is it because the question does not specify "Entity" Bean specifically?
HI Gemini, As the question is talking specifically about entity beans, there is no confusion about it. Sure we dont specify ejbFind methods in bean , but someone has to put those in isnt it? Entity bean class given by us (Bean provider) is abstract. Container provided the implementation of all abstract one's and finder methods. So...ejbFind is not related with any specific bean as such, the container doesnt put an entity bean to running state from pooled one and runs the methods there itself...so HF is correct. Amol.
Gemini Moses
Ranch Hand
Joined: Jan 04, 2001
Posts: 244
posted
0
Thanks Amol!! Now I am very clear about the answer...
Thanks a lot. I hope you can visit this site once again tomorrow too. I think I am going to have few more last minutes questions with which you can help...
Check out the all the bean's life-cycle diagrams. You should understand all of them. And if you did take a look at the entity bean's, you'll see the answer for this question immediately.
How many times have you taken the HF final mock exam? Was thinking of taking it now but I might be able to memorize the questions/answers. Can you share your experience on this.
Looking at the life cycle the methods able to be called from the pooled state are: ejbHome, ejbFind, ejbSelect & ejbCreate/ejbPostCreate
Chengwei Lee
Ranch Hand
Joined: Apr 02, 2004
Posts: 884
posted
0
How many times have you taken the HF final mock exam? Was thinking of taking it now but I might be able to memorize the questions/answers. Can you share your experience on this.
Frankly speaking, just do the final mock exam once. But make sure you're ready before you do it.
Ask yourself if you don't have the luxury of the final mock exam, will you still take the actual exam? If yes, then you should take the mock, see if you can pass, check out your mistakes, read the specifications/DTD/HFEJB for areas that need reinforcing, and go for the actual test.
Don't keep doing the mock exam, as you had said it, you might end up memorising the answers hoping that some would come up in the actual. That entirely defeats the purpose of a certification.
Chengwei Lee
Ranch Hand
Joined: Apr 02, 2004
Posts: 884
posted
0
Shouldn't the answer include D ejbCreate?
Looking at the life cycle the methods able to be called from the pooled state are: ejbHome, ejbFind, ejbSelect & ejbCreate/ejbPostCreate
Yes, a client can repeatedly create new instances of the entity beans. But the ejbCreate & ejbPostCreate methods take the bean out of the pooled state. Remember, the question asked for what methods can be invoked by the bean in pooled state.
bahaw kaning lamig
Greenhorn
Joined: Mar 09, 2003
Posts: 8
posted
0
Originally posted by Chengwei Lee:
Frankly speaking, just do the final mock exam once. But make sure you're ready before you do it.
Ask yourself if you don't have the luxury of the final mock exam, will you still take the actual exam? If yes, then you should take the mock, see if you can pass, check out your mistakes, read the specifications/DTD/HFEJB for areas that need reinforcing, and go for the actual test.
Don't keep doing the mock exam, as you had said it, you might end up memorising the answers hoping that some would come up in the actual. That entirely defeats the purpose of a certification.