I have few confusions about the HFEJB final mock exam. Thought I will post them here. So if someone else also faced these, it will be known.
Q19 OptionB -- Using the Reflection API in some cases should be avoided. This has been posted by ranchers many a times. Yet the Confirmed Errata does not contain this. Im really confused what I should do in the real exam about this in the event the cases are not mentioned.
Q46 Option A -- Primary Key fields must be cmp-fields The reason for this sentence being wrong is given as 'you can use a compound key'.
A primary key - wheather a compound or simple - is made up of fields and those should be cmp-fields. Should this be phrased properly? Did you miss this or got it right?
Q67 If a bean catches a checked exception, from which it can't recover, what should it do? C. Regardless of the client throw a javax.ejb.EJBException D. Regardless of the client, propagate the same exception to the container Here C is given right. Is it because of the phrase 'from which it can't recover'(like SQLException)? Otherwise would D be correct?
Few of these are confusions due to extra care I guess It is so disturbing when you end up making a wrong decision even when you know the concept well.
Q6. Option D -- Every environment entry lookup in a bean's code must have a matching <env-entry> element in the bean's deployment descriptior. [Read it so many times that 'remember you do not specify java:comp/env in the deployment descriptor', that I did not mark this right. Thinking why didn't they call it 'corresponding' entry ]
Q9 Which statments about stateless session beans are true? A. They can use bean managed transaction demarcation. B. They must have one no-argument create method. C. A single instance can support concurrent calls. D. They must extend javax.ejb.SessionBean Option B -- I thought long and hard. And as the other options 'seem' to referring the bean 'class' I marked option B wrong cause of the 'create' [and not 'ejbCreate' word]