Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
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.
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
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.