Spring and Enterprise JavaBeans(Chapter 11 of Spring In Action)
2010-07-25 11:36
627 查看
Although Spring’s POJO-based development model offers a compelling alternative to Enterprise JavaBeans, there may be factors (either technical, political, or historical) that force a project to choose EJBs. In those cases, there’s no need to dismiss Spring entirely, as Spring supports both EJB development and consumption. Using EJB proxies, we declared references to EJBs in a Spring application context. Once configured in Spring, the EJB could then be wired into other Spring beans that will consume the EJB’s services. We also looked at how EJB proxy declaration is made simpler using Spring 2.0’s <jee:local-slsb> and <jee:remote-slsb> configuration elements.
We then turned our attention to developing EJBs. Even though Spring doesn’t provide a mechanism for directly hosting 2.x EJBs in the Spring container, Spring
does provide a set of Spring-aware base classes from which EJBs can be developed.
These base classes expose the Spring application context to the EJB so that the EJB can delegate its work to Spring-managed POJOs. Finally, we peeked at Pitchfork, an intriguing Spring add-on that enables the use of EJB 3 annotations for dependency injection and AOP within a Spring container.
We then turned our attention to developing EJBs. Even though Spring doesn’t provide a mechanism for directly hosting 2.x EJBs in the Spring container, Spring
does provide a set of Spring-aware base classes from which EJBs can be developed.
These base classes expose the Spring application context to the EJB so that the EJB can delegate its work to Spring-managed POJOs. Finally, we peeked at Pitchfork, an intriguing Spring add-on that enables the use of EJB 3 annotations for dependency injection and AOP within a Spring container.
相关文章推荐
- Hitting the database(Chapter 5 of Spring In Action)
- Advising beans(Chapter 4 of Spring In Action)
- Building contract-first web services in Spring(Chapter 9 of Spring In Action)
- Advanced bean wiring(Chapter 3 of Spring In Action)
- Managing transactions(Chapter 6 of Spring In Action)
- Basic bean wiring(Chapter 2 of Spring In Action)
- Springing into action(Chapter 1 of Spring In Action)
- Securing Spring(Chapter 7 of Spring In Action)
- Spring and POJO-based remote services(Chapter 8 of Spring In Action)
- Spring messaging(Chapter 10 of Spring In Action)
- 【Spring in action】SpringMVC基于xml及java配置的简单运用
- 【Spring in action】基于Java配置SpringMVC中使用Spring及SpringMVC各种请求详解
- Spring之Enterprise JavaBeans (EJB) integration(EJB集成)
- IDEA - MySql / Spring mvc : Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryErro
- spring quartz:Instantiation of bean failed; nested exception is java.lang.IncompatibleClassChangeErr 分类: Java spring 2015-01-07 19:00 438人阅读 评论(0) 收藏
- 【Notes】《Thinking in Java》【Chapter 11】
- Java消息服务初步学习(基于Spring In Action的整理)
- Spring 框架参考文档(六)-Integration之Enterprise JavaBeans (EJB) integration
- 【Notes】《Thinking in Java》【Chapter 11】Part II
- SPRING IN ACTION 第4版笔记-第二章-003-以Java形式注入Bean、@Bean的用法