This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What does Application Server do exactly?  RSS feed

 
Arun Singh Raaj
Ranch Hand
Posts: 31
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I have studied, Application Server provides support to perform Dependency Injection, Security etc to an Enterprise Application.

I developed a demo project and did not install any application server but i installed Tomcat server. I used Spring framework and added Spring Jars for support in my project and performed dependency injection as well. So how come dependencies have been injected without even installing any application server?
Did Tomcat do this? or Jars are the application container?
thanks in advance
 
Tim Moores
Saloon Keeper
Posts: 3953
94
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are some unclearly defined concepts in this area. For example, Tomcat can act as an application server, it's just not a JEE application server (which needs to implement all of the JEE spec). See https://coderanch.com/wiki/659767/Web-Application-Server for a more thorough discussion on this.

As to dependency injection in particular, it doesn't need a JEE application server, nor in fact any application server - it works just fine in Java SE applications.
 
Stephan van Hulst
Saloon Keeper
Posts: 7927
143
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Spring provides its own dependency injection framework. It's not the same as CDI, which is the dependency injection framework used by JEE application servers. You can also use CDI in web application containers that don't fully support JEE, such as Tomcat, by adding a CDI implementation such as Weld.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!