• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Doubts In IBM 287 Questions

 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Everyone,

I am preparing for IBM 287 exam. I am going to take the exam on 1st of March.
I have gone through previous threads to find out the pre assessment questions. But After going through those threads, I am not able to understand some of the answers.
I wanted to post some questions and discuss the correct answers for those quesions.I feel that it would be good Idea,if every one preparing for this exam come forward, so that everyone can benifit.

Thanks in Advance.

Here are the Questions:

5. Given the design goal of having an application be as robust as possible, which techniques should the developer AVOID in the design?
A. Use persistent HttpSessions to manage application state data.
B. Use stateful session EJBs to manage application state data.
C. Make references to node-specific resources.
D. Make all resource references via java:comp/env JNDI references.
ANS:- B,C
Why is answer B wrong?
First of all I don't understand what does PersistanceHttpSessions mean?
Does it mean that HttpSessions saves data in to a Database
and what does Option C mean? Make references to node-specific resources.

11. A typical use of ejbHome and ejbSelect method would be?
A. use ejbSelect methods within ejbHome methods to return entities
B. use ejbSelect methods to access fields of a bean instance
C. use ejbHome methods to perform operation not specific to a entity instance
D. Use ejbHome methods to initialize entity bean instance variables
ANS :- B,C

I feel that answers A,C are correct.. Can Any one explain why A is not correct?
Select 2 answers.


20. Upon startup, a web application reads global information from a database into an object of type com.ibm.ApplicationInfo and adds this object to the servlet context. Which of the following tags allows for accessing this information from a JSP page?
A. <jsp:useBean id="appinfo" class="com.ibm.ApplicationInfo" />
B. <jsp:useBean id="appinfo" class="com.ibm.ApplicationInfo" scope="config"/>
C. <jsp:useBean id="appinfo" class="com.ibm.ApplicationInfo" scope="context"/>
D. <jsp:useBean id="appinfo" scope="application" class="com.ibm.ApplicationInfo"/>
ANS :-d
I have a doubt here. Is not the order in which this expression comes is not important
ie <jsp:useBean id class type scope /> . This order is not important?

23. Deployment descriptorSession
bean White: security-identity use-caller-id
entitySession bean Black: security-identity run-as roleC
Entity bean Blue: nothing specified
Entity bean Yellow: nothing specified
Entity bean Green: nothing specified
Assembly-descriptor
security-role roleA
security-role roleB
security-role roleC
method-permission
roleA White <method-name>*</method-name>
Blue <method-name>*</method-name>
Yellow <method-name>*</method-name>
roleB White <method-name>*</method-name>
Black <method-name>*</method-name>
Yellow <method-name>*</method-name>
roleC Blue <method-name>*</method-name>
Green <method-name>*</method-name>
Which of the following statements are TRUE regarding this deployment descriptor?
A. A client under the identity of roleA can invoke Blue and Yellow through White.
B. A client under the identity of roleA can invoke Blue and Yellow through Black.
C. A client under the identity of roleB can invoke Yellow and Green through White.
D. A client under the identity of roleB can invoke Blue and Green through Black.
E. A client under the identity of roleB can invoke Yellow and Green through Black.
ANS :-b,d

Select 2 answers.

I feel that answers A and D are correct. Can any one explain why B is Correct


25. A JSP is displaying data from a JavaBean accessed through a <jsp:useBean> tag. It is an error condition if the JavaBean is not found in the request scope at runtime. What should the JSP developer do to ensure correct behavior?
A. Specify the real JavaBean's Java type as the value for only the class attribute of the jsp:useBean tag.
B. Specify the JavaBean's Java type as the value for only the type attribute of the jsp:useBean tag.
C. Add an isErrorPage specification in a JSP page directive.
D. Add an errorPage specification in a JSP page directive.
ANS :-a,d

Select 2 answers.
I feel that answers C, D are correct. If the java bean is not found in the request scope then it is better to add isErrorPage and errorpage attributes in the page directives of the jsp page.
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vishnu,
It is definitely a good idea to discuss the questions. Everyone who is preparing for the exam will benifit. I am also not sure about some of the questions. But for Question 25, the answers are correct.

25. A JSP is displaying data from a JavaBean accessed through a <jsp:useBean> tag. It is an error condition if the JavaBean is not found in the request scope at runtime. What should the JSP developer do to ensure correct behavior?
A. Specify the real JavaBean's Java type as the value for only the class attribute of the jsp:useBean tag.
B. Specify the JavaBean's Java type as the value for only the type attribute of the jsp:useBean tag.
C. Add an isErrorPage specification in a JSP page directive.
D. Add an errorPage specification in a JSP page directive.
ANS :-a,d

Select 2 answers.

C cannot be right because it is not an error page. If you are getting an error in the current page then you declare errorpage specification to the JSP page directive. Which takes you to the specified error page.
So this rules of option c, and among the options which seem to be correct are A,D.
 
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vishnu,

I will try to answer your questions.

5�) B is not correct as HttpSession is more efficient than stateful Session Bean.

11�) It's true that A is correct as you can use ejbSelect methods in the ejbHome to return entities. but the real difference and advantage of ejbSelect methods comes from their ability to return CMP and CMR also. So answer B is better than answer A. cf spec 10.5.7 for more details.

20�) order of attributes in XML doesn't have any importance. the question is about application scope that refers to object of type ServletContext.

23�) I agree with you. A and D should be correct. Who said B was correct and why??? Role A isn't allowed to access Black methods anything after it...

25�) munna explained why D was not correct. Also B is not correct because unlike class attribute, when only specifying a type attribute, in case of nothing in the scope is found, no new bean is created and you may raise a NullpointerException afterwards.
To be sure a bean will always be created in the scope, it's better to use class attribute.

Regards,
Cyril.
 
Vishnu Munnangi
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Cyril and Munna for nice explanations.

Thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic