-
-
What is deployment descriptor
Answered by Jey on 2005-05-08 12:59:41: Deployment Descriptor is a XML document with .xml extenion. It basically descripes the deployment settings of an application or module or the component. At runtime J2EE server reads the deployment descriptor and understands it and then acts upon the component or module based the information mentioned in descriptor. For example EJB module has a deployment...
-
What is the difference between Stateful session bean and Stateless session bean
Answer posted by Mohan on 2005-05-20 08:45:36: Stateful session beans have the passivated and Active state which the Stateless bean does not have.
-
-
-
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
-
-
-
-
-
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 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()
-
-
-
-
-
-
-
EJB Interview Questions
Ans