Hi Howard, I saw a sample exam question asking the following: What are true (Choose 2)? A. Web modules can be depended on other Web modules. B. Web modules can be depended on other EJB modules. C. EJB modules can be depended on other EJB modules. D. EJB modules can be depended on other Web modules. I guess it should be B and C. Is that true? B correct becos JSPs can call EJBs, and then get the results for displaying. C correct becos in EJB 2.0, local home is used for one EJB module to be called by others. But why A incorrect? I remember Web modules should be able to locate another Web modules by looking up the container's ServletContext, isnt it? However, I just make this guess, can anyone explain to me? Thanks. Nick.
Dependency will make them to run always in one JVM, what if you want to run both web modules in deifferent distributed environment?
SCJP, SCJD, SCWCD1.4, IBM486, IBM484, IBM 483, IBM 287, IBM141, IBM Certified Enterprise Developer - WebSphere Studio, V5.0
Author of IBM 287 Simulator Exam
posted 16 years ago
Hi Vijay, Oh, yes. I get it. I missed the cases that the modules can be run on different JVMs in the distributed environments. This Q is really tricky, I think. It does not mention the background. Anyway, thanks for clearing up my doubts. Nick.
Oh, yes. I get it. I missed the cases that the modules can be run on different JVMs in the distributed environments.
I'm not really satisfied with this explanation. My thinking goes like this: There is such a thing as an ejb-reference, which you can stick inside a web application or ejb specification. So EJBs can go "inside" of a web application, or another EJB. That makes B and C correct. But there is no such thing as a web-app-reference. So you can't stick anything into a WAR file to make it depend on another WAR. Nor can you stick anything inside a EJB specification to say that this EJB contains a web app as a component. Therefore, A and D are incorrect.
Gentlemen, I get B and C as the correct answers. Being the pragmatist that I am, I test my theory in WebSphere Studio Application Developer. Regards,
Howard Kushner<br />IBM Certified Enterprise Developer - WebSphere Studio Application Developer V5.0<br />IBM Certified Advanced System Administrator - WebSphere Application Server V5.0<br />IBM Certified Solution Developer - Web Services with WebSphere Studio V5.1<br /><a href="http://www.amazon.com/exec/obidos/tg/detail/-/1931182108/" target="_blank" rel="nofollow">Developing J2EE Applications with WebSphere Studio</a> my Certification Study Guide for IBM Test 287
posted 16 years ago
Hi Howard, Yes. I also get B and C, and I have just tried this with WSAD 5 mins ago. Many Thanks. Nick.