Chapter 11: Spring and EJB


Overview

This book has so far focused on Spring as a lightweight container, running in a J2EE application server or outside. We have not yet discussed where EJBs come into the picture. Whether by choice, or for legacy reasons, it may make sense to use Spring in concert with EJBs. This chapter will focus on providing you with the information needed for you to do this in the most effective fashion.

We'll cover:

  • Singleton style access to shared application contexts and bean factories, via Spring's SingletonBeanFactoryLocator and ContextSingletonBeanFactoryLocator. While EJBs have the most use for a mechanism like this, you may come upon other glue code in your application that also has no other way to get to a common Spring container, and needs to use this approach. Even if you do not read the rest of this chapter, it’s worth reading this section.

  • Deciding on the actual need for EJBs.

  • Spring's JndiObjectFactoryBean for encapsulating Home object lookup.

  • Spring's local and remote Stateless Session Bean proxies for encapsulating lookup and access of EJB homes and EJB instances, eliminating the need to write EJB API-specific Java code when invoking EJBs.

  • Spring's abstract convenience base classes for implementing EJBs.

  • Some high-level strategies for testing EJBs.



Professional Java Development with the Spring Framework
Professional Java Development with the Spring Framework
ISBN: 0764574833
EAN: 2147483647
Year: 2003
Pages: 188

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net