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 ?
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
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
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
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
Originally posted by Howard Kushner:
[ December 03, 2003: Message edited by: Howard Kushner ][/QB]
Regards<br /> <br />--------------<br />Luigui Paredes<br />IBM Certified Specialist - IBM WebSphere Application Server V3<br />IBM Certified Specialist - IBM WebSphere Application Server V4(158)<br />Enterprise Application Development with IBM WebSphere Studio, V5.0(287)<br />Enterprise Connectivity with J2EE V1.3(484)<br />Application Development with IBM WebSphere Studio, V5.0(286)
Catch Ernie! Catch the egg! And catch this tiny ad too:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|