• 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:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

IBM 287 questions to Howard

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Howard I cleared the IBM 287 sample test via Prime tool with 88 % and lagerly thanks to your book and your postings on this forum .
But a major worry to me is I could only socre 10/13 questions from EJB section , can we discuss following questions , because I am not 100% sure about my answers :
1) While testing the create method of a CMP entity bean using the Universal Test Client of IBM WebSphere Studio Application Developer, the following exception is thrown: ... Exception: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] ... SQL0803N
One or more values in the INSERT statement, UPDATE statement, or foreign key update caused by a DELETE statement are not valid because the primary key, unique constraint or unique index identified by "1" constrains table "LIBRARY.PATRON" from having duplicate rows for those columns. SQLSTATE=23505
Which of the following is the BEST place to set the breakpoint?
A. The ejbCreate method
B. The create method
C. The ejbPostCreate method
D. The ejbStore method
ANS :- I have answered as A , not sure if its right ?

2) In a scenario where the customer uses databases from several vendors and wishes to improve performance, scalability and maintainability with IBM WebSphere Application Server V5, which design approach fits BEST?
A. Use session beans as a facade to CMP beans providing local interfaces
B. Use stateless session beans and BMP with performance-optimized SQL
C. Develop stored procedures for performance-critical queries
D. Call CMP entity bean methods directly via their remote interface to reduce network traffic
ANS: I have answered A .

3) An "account" CMP bean has a container-managed relationship to a "customer" CMP bean. The account table reflects the relationship with a foreign key relating to the customer table. The foreign key is declared with a "NOT NULL" constraint. When creating a new account for a customer the developer MUST:
A. set the customer in the ejbCreate method of the account bean
B. set the customer in the ejbPostCreate method of the account bean
C. set the account in the ejbPostCreate method of the customer bean
D. provide a local interface for the customer CMP entity bean
ANS:- I have answered C and D

4) A developer is going to use an existing class named DataContainer. This class has a lot of fine-grained attributes and the data represented will be only used as a whole. When designing an entity bean that declares a persistent field of type DataContainer with IBM WebSphere Studio V5 the developer:
A. makes use of dependent value class concept
B. can use an EJB composer to map the attributes to database columns
C. should declare the DataContainer class as serializable and abstract
D. is able to query the attributes of DataContainer class with EJB QL
ANS:- not sure other that B and D
5) An application uses BMP to manage the persistence of Customer and Address entity beans. Customers must have exactly one Address. Given this composition relationship and assuming that Customer holds the primary key for Address in a persistent field, which methods might be part of the implementation for Customer?
A. The ejbRemove() method of Customer invokes the remove() method of Address.
B. The ejbLoad() method of Customer invokes the findByPrimaryKey() method of AddressHome.
C. The ejbLoad() method of Customer invokes the ejbLoad() method of Address.
D. The ejbStore() method of Customer invokes the ejbStore() method of Address.
E. The ejbPassivate() method of Customer invokes the ejbPassivate() method of Address.
ANS : A,B
 
author
Posts: 361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Nikhil,
Nice to see you again.

Originally posted by Nikhil Pendharkar:
1) While testing the create method of a CMP entity bean using the Universal Test Client of IBM WebSphere Studio Application Developer, the following exception is thrown: ... Exception: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] ... SQL0803N
One or more values in the INSERT statement, UPDATE statement, or foreign key update caused by a DELETE statement are not valid because the primary key, unique constraint or unique index identified by "1" constrains table "LIBRARY.PATRON" from having duplicate rows for those columns. SQLSTATE=23505
Which of the following is the BEST place to set the breakpoint?
A. The ejbCreate method
B. The create method
C. The ejbPostCreate method
D. The ejbStore method
ANS :- I have answered as A , not sure if its right ?


I agree with A.


2) In a scenario where the customer uses databases from several vendors and wishes to improve performance, scalability and maintainability with IBM WebSphere Application Server V5, which design approach fits BEST?
A. Use session beans as a facade to CMP beans providing local interfaces
B. Use stateless session beans and BMP with performance-optimized SQL
C. Develop stored procedures for performance-critical queries
D. Call CMP entity bean methods directly via their remote interface to reduce network traffic
ANS: I have answered A .


I agree with A.


3) An "account" CMP bean has a container-managed relationship to a "customer" CMP bean. The account table reflects the relationship with a foreign key relating to the customer table. The foreign key is declared with a "NOT NULL" constraint. When creating a new account for a customer the developer MUST:
A. set the customer in the ejbCreate method of the account bean
B. set the customer in the ejbPostCreate method of the account bean
C. set the account in the ejbPostCreate method of the customer bean
D. provide a local interface for the customer CMP entity bean
ANS:- I have answered C and D


I do NOT agree with C but I do agree with D.


4) A developer is going to use an existing class named DataContainer. This class has a lot of fine-grained attributes and the data represented will be only used as a whole. When designing an entity bean that declares a persistent field of type DataContainer with IBM WebSphere Studio V5 the developer:
A. makes use of dependent value class concept
B. can use an EJB composer to map the attributes to database columns
C. should declare the DataContainer class as serializable and abstract
D. is able to query the attributes of DataContainer class with EJB QL
ANS:- not sure other that B and D
I agree with B and D. I do NOT agree with C.
5) An application uses BMP to manage the persistence of Customer and Address entity beans. Customers must have exactly one Address. Given this composition relationship and assuming that Customer holds the primary key for Address in a persistent field, which methods might be part of the implementation for Customer?
A. The ejbRemove() method of Customer invokes the remove() method of Address.
B. The ejbLoad() method of Customer invokes the findByPrimaryKey() method of AddressHome.
C. The ejbLoad() method of Customer invokes the ejbLoad() method of Address.
D. The ejbStore() method of Customer invokes the ejbStore() method of Address.
E. The ejbPassivate() method of Customer invokes the ejbPassivate() method of Address.
ANS : A,B


I agree with A and B.
Best of luck to you! Hope this helps.
Regards,
[ December 03, 2003: Message edited by: Howard Kushner ]
 
Nikhil Pendharkar
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Howard for your prompt reply .
I really appreciate the effort you take to answer each and every question asked to you by so many people .
Howard now that I have got the voucher for 287, I am planning to give it ASAP . Any last minute preparation suggestions from you ?
 
Howard Kushner
author
Posts: 361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Nikhil,
Thanks for the kind words. My advice for you is the things you probably already know:
  • Take your time to read each question thoroughly. As you have seen, the questions are NOT usually simple to answer, and will require careful analysis of the situation, in order to arrive at the best answer.
  • Use the process of elimination to rule out the obviously wrong answers.
  • After answering all the questions, go back and re-read the ones that you were not sure about the first time. Use all of the time given you.


  • Now I have a favor to ask of you. If after taking the test, and passing it we hope, please go to Amazon.com, and post an honest review of my book. Contrary to popular belief, I do not make much money from the book, but it does look good on my resume. I very much apreciate those people who have taken the time to post reviews. It also helps the next person decide if the book will be helpful to them.
    Be sure to let us know how you did when you take the test.
    Regards,
     
    Greenhorn
    Posts: 6
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Originally posted by Howard Kushner:
    [ December 03, 2003: Message edited by: Howard Kushner ][/QB]


    Question 1:
    It is a CMP Entity bean therefore the ejbPostCreate() is before "Insert data in database", then the answer could be C
    Question 2:
    I agree with A
    Question 3:
    Of all ways it must set customer in acount, since he is not null in acount
    Then the answers are B and D
    Question 4:
    Dependent value classes are custom serializable objects that can be used as persistence field.
    Then the answers could be A and B
     
    Onion rings are vegetable donuts. Taste this tiny ad:
    Smokeless wood heat with a rocket mass heater
    https://woodheat.net
    reply
      Bookmark Topic Watch Topic
    • New Topic