JavaBeat Feeds
|
|
|
|
|
|
|
|
|
|
SCBCD Mock Questions - 10
1)Which of the following methods can the container execute and will not move the entity bean's instance from the pooled state to the ready state? [Select all correct answers]
1)Execute the entity bean's finder methods.
2)Execute the entity bean's home methods.
3)Execute the entity bean's create methods.
4)Execute the entity bean's activate/passivate methods.
5)Execute any business methods.
2)Which of the following methods from the EntityContext interface are allowed to be used within your CMP entity bean's ejbPassivate() method? [Select all correct answers]
1)getEJBObject()
2)getPrimaryKey()
3)getEJBHome()
4)getUserTransaction()
5)getRollbackOnly()
3)Which of the following methods must the entity bean provider implement in the abstract entity bean class? [Select all correct answers]
1)The entity bean provider must provide a public constructor without arguments.
2)The entity bean provider must provide at least one implementation for the ejbCreate() method.
3)The entity bean provider must provide the implementation of the ejbFind() method(s).
4)The entity bean provider must provide the implementation of the ejbHome() method(s).
5)The entity bean provider must provide at least one ejbSelect() method.
4)Which of the following methods from the EntityContext interface are allowed to be used within your CMP entity bean's ejbCreate() method? [Select all correct answers]
1)getEJBLocalHome()
2)getEJBHome()
3)getEJBObject()
4)getCallerPrincipal()
5)getUserTransaction()
5)Which of the following statements are correct about the responsibilities of the EJB container? [Select all correct answers]
1)When the container invokes the ejbRemove() method the container removes immediately the entity from the database.
2)The container synchronizes the instance's state before it invokes the ejbRemove() method and uses the ejbLoad() method.
3)The container is responsible for providing the implementation of the ejbFind() methods
4)After the ejbHome() method completes, the instance remains in the ready state.
5)he container is responsible for calling the ejbCreate() method.
6)Identify all correct requirements for a CMP entity bean class? [Select all correct answers]
1)The class must be defined as public.
2)The class must define a public constructor that takes no arguments.
3)The class must not be defined as abstract.
4)The class must define the finalize() method.
5)The class must implement, directly or indirectly, the javax.ejb.EntityBean interface.
7)Which of the following are valid operations in the setEntityContext method, after the CMP entity bean has been instantiated? [Select all correct answers]
1)Get a reference to your home interface.
2)Get a reference to your EJBObject
3)Get a reference to your JNDI environment.
4)Get a reference to the resource manager.
5)Get security related information about the calling client application.
8)Which of the following methods can be called to change the state of the CMP entity bean from pooled to the ready state? [Select all correct answers]
1)ejbStore()
2)ejbCreate()
3)ejbActivate()
4)ejbFind()
5)setEntityContext()
9)Which of the following are valid ejbCreate() declarations in a CMP entity bean? [Select all correct answers]
1)public String ejbCreate(String s) throws CreateException
2)public static String ejbCreate(String s) throws CreateException
3)public final String ejbCreate(String s) throws CreateException
4)public Integer ejbCreateAllCompanies() throws CreateException
5)public void ejbCreateAllCompanies() throws CreateException
10)The ______ is called by the EJB container when the entity bean is about to return to the pool of entity bean's, after a transaction has completed. [Fill in the missing method name without brackets]
|