0

Bit confused with Spring framework and what capabilities application server provides.

I was reading this answer on same site

There he says,

Additionally App Server have components and features to support Application level services such as Connection Pooling, Object Pooling, Transaction Support, Messaging services etc.

That means we can optionally use apis of application server to manage transaction in our web application (inject web application :()and I think spring also provides transaction apis. So whats the difference?

Please, help me to make it clear. Thanks you.

Community
  • 1
  • 1
silly questions
  • 357
  • 6
  • 14

1 Answers1

1

When you use app server resources (transactions, connection pools etc.) directly in your application code, you can only run it when it is deployed on an application server or even worse only on that syme type of application server.

Spring allows you to use those resources and configure your application for different environments. The application can be run on any application server or on a simple Tomcat, or on different servers in the cloud.

Spring also allows you to run your code in tests (unit tests) without the need to start up an application server. This is absolutely needed to write automated tests.

Everything that can be done with an application server, can be done with spring as well.

There is a whole world of spring libraries and framework that provide features that are not available directly on application servers.

I can really recomand to give spring a try.....