JavaBeat
Search JavaBeat

SCBCD TOPICS

scbcd Home

objectives

mock exams

scbcd mock - 1

scbcd mock - 2

scbcd mock - 3

scbcd mock - 4

scbcd mock - 5

scbcd mock - 6

scbcd mock - 7

scbcd mock - 8

scbcd mock - 9

scbcd mock - 10

scbcd mock - 11

scbcd mock - 12

scbcd mock - 13

scbcd mock - 14

JAVABEAT
home
articles
tips
code junction
forums
OUR NETWORK
javabeat

SCBCD Mock Questions - 13

1)Which one of the following statements are requirements for the session bean's remote home interface?

1)The interface must extend javax.ejb.EJBObject.
2)The return type for a create<Method>(...) method must be void.
3)A stateless session bean must define one or more create<METHOD>(...) method.
4)The throws clause of a create<Method>(...) method must include javax.ejb.CreateException.
5)The return type for a create<Method>(...) method must match the return type of the corresponding ejbCreate<METHOD> method that is defined in the session bean class.

2)Which one of the following responsibilities related to session beans belong to the bean provider?

1)Ensuring that only one thread can execute a bean instance at anyone time
2)Managing the session bean instances at runtime.
3)Supplying resource connections used by an enterprise bean.
4)Deciding whether a session bean should use either container-managed or bean-managed transaction demarcation.
5)Handling of a system exception thrown by a session bean's business method.

3)Which one of the following methods provides notification that the current transaction has completed?

1)javax.ejb.SessionBean.ejbPassivate()
2)javax.ejb.SessionBean.ejbRemove()
3)javax.ejb.SessionSynchronization.afterCompletion(boolean)
4)javax.ejb.SessionSynchronization.beforeCompletion(boolean)
5)javax.ejb.SessionSynchronization.transactionCompleted(boolean)

4)Which of the following responsibilities related to session bean's belong to the EJB container provider? [Select all correct answers]

1)Affecting transaction management of a session bean with container-managed transaction demarcation.
2)Handling of a system exception thrown by a session bean's business method.
3)Defining the session bean class.
4)Deciding whether a session bean should use either container-managed or bean-managed transaction demarcation.
5)Supplying resource connections used by an enterprise bean.

5)Which of the following responsibilities relating to a stateful session bean's ejbPassivate method belong to the container? [Select all correct answers]

1)Providing notification that a bean instance is about to be passivated.
2)Ensuring that the bean's instance fields meet the requirements for passivation.
3)Closing any open socket connections.
4)Saving a SessionContext interface object reference that is stored in the bean instance's state
5)Saving an UserTransaction interface object reference that is stored in the bean instance's state.

6)Which of the following statements regarding the create methods of a session bean are correct. [Select all correct answers]

1)Each session bean class must have at least one ejbCreate<METHOD>.
2)The return type of the ejbCreate method is the session bean's remote interface.
3)The container always calls ejbCreate() on the bean instance when a client invokes a create operation on the home interface of a stateless session object.
4)ejbCreate() is invoked by the container with an unspecified transaction context.
5)Invoking EJBContext.getRollbackOnly() is not permitted in ejbCreate() of a session bean instance with container-managed transaction demarcation.

7)Which of the following statements only apply to stateful session beans? [Select all correct answers]

1)Maintained by the container in a pool of available instances.
2)Ability to receive notification by the container of transaction boundaries.
3)Maintains conversational state across several business method calls.
4)A transaction started in a business method must be committed before the method completes.
5)Receives notification from the container when the bean instance is activated.

8)Which one of the following statements regarding a session bean's conversational state is true?

1)Stateless and stateful session beans both maintain conversational state.
2)An object reference to the java:comp/env JNDI context that is stored in session bean's conversational state is not perserved when the session bean is passivated.
3)The conversational state of a session bean with container-managed transaction demarcation is automatically rolled back to its initial state if a system exception is thrown by a business method.
4)A session bean's conversational state can hold an open socket connection.
5)Non-transient fields of a session bean's conversational state are lost when a session bean is passivated.

9)Which of the following statements are requirements for the session bean class? [Select all correct answers]

1)The session bean class must implement, directly or indirectly the javax.ejb.SessionBean interface.
2)Each method defined in the session bean class must have a matching method in the session bean's remote interface.
3)The class must be defined as public.
4)The class can be declared final.
5)A stateful session bean class does not have to define a no-argument public constructor.

10)Which of the following statements regarding the session bean interface are correct? [Select all correct answers]

1)All session beans must implement the SessionBean interface.
2)The container calls unsetSessionContext() to unset the associated session context.
3)The container notifies a stateless session bean by calling ejbPassivate() on the bean instance entering the "passive" state.
4)The container invokes ejbRemove() on a stateless bean instance when it no longer needs the instance and wishes to reduce the number of bean instances in the method-ready pool.
5)The ejbActivate method is a suitable place to open a database cursor that was previously closed in the ejbPassivate method of a stateful session bean.

SCBCD Mock Questions 13 - Answers


Sponsors
Webmaster Hosting Forum
Java Jobs
MyVideoLib
India News
Internet Advances
Latest QnA
SCJD Tips
When we start a thread by applying start() method on it ,how does it knows that to execute run()method?
About Wrapper class in Java
How to configure weblogic 7.0 in MyEclipse?
Static Block and Static Initializer in Java

JavaBeat Media (2004-2008), India
javabeat | planetoss | links directory | advertise
Copyright (2004 - 2008), JavaBeat