0

I'm a new Spring. So i've one thing that need to you explain. i read benefits of Spring framework here and i got this:

Spring enables developers to develop enterprise-class applications using POJOs. The benefit of using only POJOs is that you do not need an EJB container product such as an application server but you have the option of using only a robust servlet container such as Tomcat or some commercial product.

i can't understand why if we use POJO, we do not need an EJB container and just only use a servlet container instead. Someone can make clearly that benefit for me! Thank so much! Sorry about my English, it's not good!

Lê Thành
  • 23
  • 6
  • you can use Spring also without servlet container, in standalone apps. In addition, you can use it in servlet container, or in EJB container. It works in all those use cases. – eis Dec 01 '14 at 05:40

1 Answers1

1

POJO – Stands for Plain Old Java Objects. In short plain Objects that meets the java beans requirements. See What is a JavaBean exactly?.

So to use POJOs you just need java (JRE/JDK). If you want Servlet API you add Tomcat etc.

Spring will provide almost all EJB functionality in one way or other but in a more simplified way (and better from my point of view).

For example JPA abstraction using Hibernate or other ORM solution.

As the tutorial say

Spring does not reinvent the wheel instead, it truly makes use of some of the existing technologies like several ORM frameworks, logging frameworks, Java EE, Quartz and JDK timers, other view technologies.

Community
  • 1
  • 1
Haim Raman
  • 11,508
  • 6
  • 44
  • 70