This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Mock Questions  RSS feed

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Following are taken from Muhammad Ashikuzzaman's SCBCDExam Notes. Wish he would include the answers too.

Can someone please provide the answers to the following. Mine are at bottom

SQ1. Which are true about session beans?
A. A client can pass a remote home object reference to another application.
B. The javax.ejb.EJBMetaData interface is intended to allow application assembly
tools to discover information about the session bean, and to allow loose
client/server binding and client-side scripting.
C. The javax.ejb.EJBLocalHome interface defines the method create() which returns
javax.ejb.EJBLocalObject.
D. The javax.ejb.EJBLocalHome interface defines the method remove(Object primaryKey)
which returns null.

Answers:
a, b , c

SQ3. Which are true about session beans? (Choose all that apply)
A. An attempt to remove a session object while the object is in a transaction will
cause the container to throw the IllegalStateException to the client.
B. A session bean class must not implement the session bean's component interface.
C. A session bean class must not implement the ejbCreate() method.
D. The business methods of a session bean must not be declared as final or static.
E. The remote interface methods must not expose the managed collection classes
that are used for CMP entity beans as arguments or results.

Answers:
a, d

SQ4. Given a CMP entity bean, which of the following statements are correct?
(Choose all that apply)
A. All the exceptions defined in the throws clause of the method of the remote interface
must be defined in the throws clause of the matching method of the enterprise Bean class.
B. The ejbSelect<METHOD>(...) must not be declared as static or abstract.
C. The ejbHome<METHOD>(...) can be declared as final.
D. The return value type of a business method of an entity bean class could be of MyClass defined
as follows:
public class MyClass {
public int result;
public int getResult() { return result; }
public void setResult(int result) { this.result = result; }
}
E. The throws clause of an ejbPostCreate<METHOD>(...) may define
arbitrary application specific exceptions including javax.ejb.CreateException.
F. The bean provider must always define a query for each finder method in the deployment descriptor.

Answers:
d,e,f
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Arthur,

In my understanding, these are the answers:

SQ1 - A,B
C is incorrect because EJBLocalHome interface do not define any create method.
D is incorrect because the remove(Object primaryKey) is not about session beans.

SQ3 - A, D

SQ4 - C
D is incorrect because the return type of a business method must be RMI compatible, in other words MyClass must implement Serializable interface.
F is incorrect because the bean provider do not have define a query for findByPrimaryKey method.

Does someone have others answers?
Thanks.

Vagner
 
Ranch Hand
Posts: 351
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my opinion-
SQ1 - a,b,c
SQ3 - a,b,d
SQ4 - d,e,f

Regards,
Leena
 
F is for finger. Can you stick your finger in your nose? Doesn't that feel nice? Now try this tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!