Best Practices

J2EE has many best practices applied to designing applications and components. The main keys in them are the design patterns covered in the previous section. Most best practices focus on minimizing remote calls, which reduce network traffic and enhance the performance of your applications. Both the Service Locator pattern and the Session Façade pattern address remote calls by creating an object local to the service you're trying to access. Caching is another technique used to reduce network traffic in distributed applications.

Not all solutions are synchronous; some elegant solutions use an asynchronous messaging paradigm. Using message-driven beans to delivering solutions in which clients do not have to wait for an immediate response ...

Get Sams Teach Yourself EJB in 21 Days 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.