Chapter 23. EJB Best Practices

Best Practices for Session Beans

The following sections describe some of the best practices to keep in mind while coding stateless and stateful session beans.

Optimizing JNDI Lookups

Because the Java Naming and Directory Interface (JNDI) lookup can be an expensive operation, caching all the onetime initialization procedures in the session bean’s setSessionContext() method is the recommended practice. The EJB container calls the session bean’s setSessionContext() to associate a session bean instance with its context maintained ...

Get BEA® WebLogic Platform 7 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.