I found one question on reflection API in HFEJB final mock exam. Question is When programming an entity bean class which technique(s) should be AVOIDED to ensure bean portability across all EJB 2.0 containers? (choose all that apply) A. changing a thread's priority B. Using the reflection API C. Using wrapper classes D. Using static nested classes Ans is (A) & (B). A is OK. I am confused with option B. yes, that's right that some of methods of reflection API we have to avoid. But at the same time book is saying that getEJBMetaData() method in lcoal home interface (EJBLocalHome) is not required as we can use reflection API(Page 149). So, what's right we have to avoid reflection API or not?
The local home object/interface implementations are gonna run in the same JVM as the beans are. Hence there is no need to go for EJBMetaData() method on Local Home Object. I had read through specs that also talks about, if you are interfacing through local interfaces, you could do reflection mechanisms. But Strict NO! NO! for remote interface access!
Plz advise, if I am wrong here!
Bala<br />SCJP 1.4 98%<br />SCBCD 1.3 -- 88%
Watchya got in that poodle gun? Anything for me? Or this tiny ad?