1. What is the life cycle of an EJB? Explain briefly.
2. Is it possible to share HttpSession bet. JSP and EJB? What happens when I change a value in the HttpSession from inside an EJB?
3. How do you decide on Local and Remote interfaces?
4. What made you to select EJB? Explain briefly about Merits & Demerits of EJB.
5. How do you rollback a container managed transaction?
6. What are the different container managed transaction attributes? What is the diff. bet. Required and RequiresNew? What are isolation levels?
7. How do you update multiple databases within a transaction?
8. What happens when more than one concurrent user access an entity bean?
9. Explain briefly about EJB dependency injection. (EJB 3.0)
10. Explain briefly about EJB interceptors. (EJB 3.0)
11. Any idea about EJB annotations? (EJB 3.0)
12. Explain briefly about querying of entities in EJB 3.0.
13. What is the replacement of Entity Beans in EJB 3.0? What are the advantages of JPA?
14. What is meant by Cache management system with entity beans in EJB 2.0?
15. Any idea about javax.annotation.security.RolesAllowed and javax.annotation.security.PermitAll?
16. What is meant by a coarse-grained and a fine-grained interface? (Hint: Amount of data transferred per method call)
17. What is the difference between “Required”, “Supports”, “RequiresNew” “NotSupported”, “Mandatory”, “Never”? (Hint: Needs transaction, existing OK but doesn’t need, must start new one, suspends transaction, must already be started, error if transaction)
18. What EJB patterns, best practices are you aware of? Describe at least two? (Hint: Façade, delegate, value list, DAO, value object).
19. What do you understand by the term “offline optimistic locking” or long-lived business transaction? How might you implement this using EJB? (Hint: version number, date, field comparisons.)
20. Explain performance difference between getting a list of summary information (e.g. customer list) via finder using a BMP entity vs. Session using DAO? (Hint: BMP: n+1 database reads, n RMI calls.)
21. Explain the steps to configure Topics and Queues in any of the Application Servers
22. What does the @PostConstruct method do?
23. How do you ensure that a Stateful Session bean is removed from the memory after the user is done with it? @Remove
24. How do you obtain an EntityManager in an EJB? @PersistenceContext
25. How to obtain a reference to a Session Bean in a servlet or JSF Managed Bean? @EJB / Service Locator details.
26. How can asynchronous events be managed in J2EE? (Hint: JMS)
27. How do transactions affect the onMessage() handling of a MDB? (Hint: Taking off queue. )
28. If you send a JMS message from an EJB, and transaction rollback, will message be sent? (Hint: yes)
29. How do you indicate what topic or queue MDB should react to? (Hint: deployment descriptor )
30. What is the difference between a topic and a queue? (Hint: broadcast, single)
31. What is the difference between Stateless and Stateful session beans (used?) (Hint: Stateful holds per client state )
32. What is the difference between Session bean and Entity bean (when used?) (Hint: Entity used for persistence )
33. With Stateless Session bean pooling, when would a container typically take a instance from the pool and when would it return it? (Hint: for each business method )
34. What is meant by a coarse-grained and a fine-grained interface? (Hint: Amount of data transferred per method call)
35. What are typical uses for the JNDI API within an enterprise application? (Hint: Resource management, LDAP access)
36. Explain the difference between a lookup of these “java:comp/env/ejb/MyBean” and “ejb/MyBean”? (Hint: logical mapping performed for java:comp/env )
37. What is the difference between new InitialContext() from servlet or from an EJB? (Hint: Different JNDI environments initialized EJB controller by ejb-jar.xml, servlet by web.xml.)
38. What is an LDAP server used for in an enterprise environment? (Hint: authentication, authorization)
39. What is authentication, and authorization? (Hint: Confirming identity, confirming access rights )
2. Is it possible to share HttpSession bet. JSP and EJB? What happens when I change a value in the HttpSession from inside an EJB?
3. How do you decide on Local and Remote interfaces?
4. What made you to select EJB? Explain briefly about Merits & Demerits of EJB.
5. How do you rollback a container managed transaction?
6. What are the different container managed transaction attributes? What is the diff. bet. Required and RequiresNew? What are isolation levels?
7. How do you update multiple databases within a transaction?
8. What happens when more than one concurrent user access an entity bean?
9. Explain briefly about EJB dependency injection. (EJB 3.0)
10. Explain briefly about EJB interceptors. (EJB 3.0)
11. Any idea about EJB annotations? (EJB 3.0)
12. Explain briefly about querying of entities in EJB 3.0.
13. What is the replacement of Entity Beans in EJB 3.0? What are the advantages of JPA?
14. What is meant by Cache management system with entity beans in EJB 2.0?
15. Any idea about javax.annotation.security.RolesAllowed and javax.annotation.security.PermitAll?
16. What is meant by a coarse-grained and a fine-grained interface? (Hint: Amount of data transferred per method call)
17. What is the difference between “Required”, “Supports”, “RequiresNew” “NotSupported”, “Mandatory”, “Never”? (Hint: Needs transaction, existing OK but doesn’t need, must start new one, suspends transaction, must already be started, error if transaction)
18. What EJB patterns, best practices are you aware of? Describe at least two? (Hint: Façade, delegate, value list, DAO, value object).
19. What do you understand by the term “offline optimistic locking” or long-lived business transaction? How might you implement this using EJB? (Hint: version number, date, field comparisons.)
20. Explain performance difference between getting a list of summary information (e.g. customer list) via finder using a BMP entity vs. Session using DAO? (Hint: BMP: n+1 database reads, n RMI calls.)
21. Explain the steps to configure Topics and Queues in any of the Application Servers
22. What does the @PostConstruct method do?
23. How do you ensure that a Stateful Session bean is removed from the memory after the user is done with it? @Remove
24. How do you obtain an EntityManager in an EJB? @PersistenceContext
25. How to obtain a reference to a Session Bean in a servlet or JSF Managed Bean? @EJB / Service Locator details.
26. How can asynchronous events be managed in J2EE? (Hint: JMS)
27. How do transactions affect the onMessage() handling of a MDB? (Hint: Taking off queue. )
28. If you send a JMS message from an EJB, and transaction rollback, will message be sent? (Hint: yes)
29. How do you indicate what topic or queue MDB should react to? (Hint: deployment descriptor )
30. What is the difference between a topic and a queue? (Hint: broadcast, single)
31. What is the difference between Stateless and Stateful session beans (used?) (Hint: Stateful holds per client state )
32. What is the difference between Session bean and Entity bean (when used?) (Hint: Entity used for persistence )
33. With Stateless Session bean pooling, when would a container typically take a instance from the pool and when would it return it? (Hint: for each business method )
34. What is meant by a coarse-grained and a fine-grained interface? (Hint: Amount of data transferred per method call)
35. What are typical uses for the JNDI API within an enterprise application? (Hint: Resource management, LDAP access)
36. Explain the difference between a lookup of these “java:comp/env/ejb/MyBean” and “ejb/MyBean”? (Hint: logical mapping performed for java:comp/env )
37. What is the difference between new InitialContext() from servlet or from an EJB? (Hint: Different JNDI environments initialized EJB controller by ejb-jar.xml, servlet by web.xml.)
38. What is an LDAP server used for in an enterprise environment? (Hint: authentication, authorization)
39. What is authentication, and authorization? (Hint: Confirming identity, confirming access rights )