Hi! All,
Plz post answers to these questions with explanations.
1)If the Access Intent on a method is �Read�, what restrictions does it place on the
EJB?
The ejbStore() method is not called.
The ejbLoad() method is not called.
The ejbActivate() method is not called.
The ejbPassivate() method is not called.
2)How
servlets serve multiple clients?
Multiple instances of servlet are made and all the clients are served concurrently.
A pool of instances is made and each all gets instance from the pool
Multiple instances of servlet are made and all the clients are served one by one
Multiple instances of servlet are made and all the clients run in a separate
thread.
3)How would u make a call to the method thread safe?
By making the code synchronized.
By making the method call synchronized in the method call block.
By making the servlet run in SingleThreadModel.
4)An enterprise application running on Websphere is very slow. Quite a lot of users are accessing. The server capoacity is high. Possible causes are
The transactions are running serially.
The memory is low.
5)The following sequence of method calls occurred on a CMP entity bean instance when its business methods method1 and method2 were invoked from the same method of a Session bean, which has initiated a transaction.
entityBean.ejbActivate()
entityBean.ejbLoad()
entityBean.method1()
entityBean.ejbStore()
entityBean.ejbPassivate()
entityBean.ejbActivate()
entityBean.ejbLoad()
entityBean.method2()
entityBean.ejbStore()
entityBean.ejbPassivate()
Which of the following MUST be true about the bean?
-The business methods are configured with a transaction attribute of 'Required New'
-method1 and method2 are in the same transaction scope
-method1 and method2 are in different transaction scope
-The business methods are NOT configured with a transaction attribute of 'Requires New'
6) You are calling a number of Entity Beans from a Session Bean. Regardless of the result of the transaction, the Logout Entity Bean has to be called to write the status. How it should be implemented?
A call should be made to the other methods and then a Logout Entity Bean.
Each Entity Bean should write the data to the Logout bean
7) We have a Customer and Address Table. Each Customer should have one Address exactly. The primaryKey of the Customer is there as a serializable field. How should this be implemented?
Call the ejbLoad method from Customer ejb from the Address ejb.
Call the ejbRemove method from the Customer ejb from the Address ejb.
Call the ejbStore method from the Customer ejb from the Address ejb.
8) What is the reason of making it mandatory for Stateful Session Bean to implement java.io.Serializable?
To help the bean passivate.
9)A user added a method to the Remote interface of the EJB application and restarted the server. He noticed that the changes haven�t been affected. What is the possible cause?
He did not re-deploy the application
He did not restart the server properly.
The method was not saved.
The jar file was not made again.
10) The reference to the EJBObject gets invalid. Possible causes are:
There is a network error.
The connection the sever has timed out.
The EJBObject is no longer in the scope.
The object is NULL.