Browse Today's favorites or All time favorites.
Please Sign In or Register to share and submit your questions.
Java Queries
Complete java interview questions library
How does an EJB interact with its container and what are the call-back methods in entity beans?
EJB interacts with its container through the following mechanisms
Call-back Methods: Every EJB implements an interface (extends EnterpriseBean) which defines 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.
EJBContext: provides methods for interacting with the container so that the bean can request information
about its environment like the identity of the caller, security, status of a transaction, obtains remote reference
to itself etc. e.g. isUserInRole(), getUserPrincipal(), isRollbackOnly(), etc.
JNDI (Java Naming and Directory Interface): allows EJB to access resources like JDBC connections, JMS
topics and queues, other EJBs etc.
Questions to Ask in an Interview
Remember to ask questions that are relevant to the company and position for which you are interviewing.
- What are some of the common characteristics of employees that excel in this environment?
- Would you please comment on your style of management and the reporting structure?
- What is yo
Write a comment