-
-
-
-
-
What are the call back methods in Entity bean
Answered by Jey Ramasamy on 2005-05-08 19:51:04: 1. setEntityContext() 2. ejbCreate() 3. ejbPostCreate() 4. ejbActivate() 5. ejbPassivate() 6. ejbRemove() 7. unsetEntityContext()
-
-
How can i retrieve from inside my Bean(Stateless session and Entity CMP) the user name which i am serving (the user name of user just logged in my web application)
Inside an EJB you may retrieve the "Caller" name, that is the login id by invoking: sessionContext.getCallerIdentity().getName() where sessionContext is the instance of "SessionContext" (setSessionContext) passed to the Session Bean, or the instance of "EntityContext" (setEntityContext) passed to the Entity Bean.
-
-
-
-
-
-
-
What is the difference between optimistic locking and pessimistic locking
Answer posted by Mohan on 2005-05-21 17:20:02: Optimistic locking assumes that no one would read or change the data while changes are being by a bean Pessimistic locking would rather lock down the data so that no one can access it
-
-
Deployment descriptor
Why do we require to write a deployment descriptor (ejb-jar.xml) in an xml format ? why don't we write it in a java file ?
-
EJB local and home interfaces
Is there any special reason to write two interfaces in ejb(local , home interfaces ). why don't we write only one interface .
-
-
-
EJB Interview Questions
Ans