what i got from docs is
EJB interacts with its container through the following mechanisms
1) EJBContext
2) JNDI
3) Call-back Methods
Regarding Call-back Methods -->
Every EJB implements an interface (extends EnterpriseBean) which define several methods which alert the bean to various events in its lifecycle. A container is responsible for invoking these methods. These methods notify the bean when it is about to be activated, to be persisted to the database, to end a transaction, to remove the bean from the memory, etc. For example the entity bean has the following call-back methods:
public interface javax.ejb.EntityBean {
public void setEntityContext(javax.ejb.EntityContext c);
public void unsetEntityContext();
public void ejbLoad();
public void ejbStore();
public void ejbActivate();
public void ejbPassivate();
public void ejbRemove();
}
Thanks again for giving me the lead!!!