Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFEJB final mock exam Question

 
Gemini Moses
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

Please help ...
 
amol deshpande
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...

Gemini
 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
amol deshpande
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Gemini,
Please dash in your doubts im here to answer.
Amol.
 
Gemini Moses
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Amol,

I did it! See

http://www.coderanch.com/t/139556/sr/certification/Passed-SCBCD
 
bahaw kaning lamig
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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.

Cheers,
bahaw
 
Kris Reid
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.



Cool! Thanks for the reply.

All the best,
bahaw
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic