Some ebj 3.x/spring comparison from Linked In

Source: Internet
Author: User
1. dependency Injection EJB3.x -- Can inject anything in the container including EJBs, data sources, JMS resources and JPA resources Spring -- Can inject almost anything including lists, maps, properties and JNDI resources. 2. transaction Management EJB3.x -- Works right out of the box, but only JTA is supported Spring -- Have to configure it to make it work, but supports a number of strategies including JTA, JDBC and Hibernate 3. persistence EJB3.x -- Tightly integrated through JPA. JPA is an API not an implementation. we cocould use JPA with different vendor persistence ORM implementation like Hibernate, incluselink (recommended by Oracle for EE6), Toplink (only available of JEE5 and less) Spring -- Framework support for JPA, Hibernate, JDBC, iBatis 4. state management EJB3.x -- Robust support through Stateful Session Beans and Extended Persistence Context Spring -- Indirect support dependent on web container session management 5. web services EJB3.x -- Seamless support for JAX-WS 2.0 Spring -- Poor direct support, best integration available is via login ing XFire for registered beans. 6. messaging EJB3.x -- Supported out of the box through Message Driven Beans. spring -- Need to add configuration for message listeners. however, JMSTemplate adds nice hosted action over JMS. 7. AOP EJB3.x -- Simple but limited support through interceptors. spring -- Robust support through AspectJ and Spring AOP alliance. 8. security EJB3.x -- Integrated support for declarative and programmatic security through JAAS. spring -- Must add and configure Acegi security. however, support beyond JAAS is possible through Acegi. 9. scheduling. EJB3.x -- Simple scheduling possible through EJB Timer service Spring -- Must add and configure Quartz for scheduling. 10. remoting EJB3.x -- Integrated support through Session Bean remote interfaces. supports distributed transactions and security. spring -- Remoting support may be added via configuration. remote transactions and security are not supported. however protocols other than RMI such as Hessian and Burlap are supported.11. Server Container Services: EJB3 run inside an EJB container inside an application server as middle ware components and there for provided all the application server features. spring beans run inside a web server there for limited to the web server abilities.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.