Why do we need Application Server in Java

15,794

Solution 1

Application Servers are mostly used if you want to use advanced features like transaction management, hot code swapping and advanced persistence.

There are application servers that are open source. E.g. GlassFish and JBoss.

I don't think you need an application server for building a popular web site, you'll also be fine with a servlet container like Tomcat or Jetty.

Solution 2

Apart from answers given above, App Servers are required for EJBs.

Solution 3

In short Application Servers provide you with few services like

  • Transaction Management
  • Load Balancing
  • Security
  • Threading

etc.

You have to take care of these things yourself in a Web Server.

There are few Open Source Application servers which are free of cost.

I have used Glassfish.

Solution 4

It is possible to handle the httpheaders yourself. We have done socket servers in java for 20 years. You do not need a container for java swing. Persistence can be done through databases or server side files unless you need real high speed stuff. I have yet to find a real requirement for an ejb except that some systems simply require them

Solution 5

You need Application Server as follow:

  1. It provides you useful services like automatic transaction,Authentication,Authorization,Lifecycle management.
  2. To remember large user data across pages using ejb's pertaining to a client.
  3. Load balance the user request and buisness logic.
  4. To interact with different Client UI like Java Swing,Browsers.
Share:
15,794
Admin
Author by

Admin

Updated on June 17, 2022

Comments

  • Admin
    Admin about 2 years

    Why do we need Application Server in Java like JBoss or WebSphere. Is it possible that we develop large scale website only with Java (Apache Tomcat). Where thousand of user connect on site at a moment. An example is a website like b2b.

    What is the cost of a Application Server? I will be thankful if you compare price among different application server and if there is any free version kindly highlight it.

  • Manoj Ramanan
    Manoj Ramanan almost 7 years
    we can third part libraries like spring for transaction management and persistence why do we need JBoss ?