23

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.

Jonas
  • 121,568
  • 97
  • 310
  • 388
Abdullah
  • 239
  • 1
  • 2
  • 3
  • Apache Tomcat is a Servlet Container which is only one part of JEE and a Java Application Server. If you only need the servlet part of an Application Server, Apache Tomcat might be sufficient. – ZeissS Nov 11 '10 at 09:56
  • @ZeissS: I think he asked why he need a full JEE server and if I could go with just an Servlet Container when building a web site with much traffic. – Jonas Nov 11 '10 at 10:00
  • 2
    **... if there is any free version kindly highlight it.** You've mentioned one already, **JBoss**. GlassFish is another. – Buhake Sindi Nov 11 '10 at 10:26
  • 1
    @Abdullah please spend some time on search engines, just don't put a question for the sake of putting a question :) – Puspendu Banerjee Nov 13 '10 at 04:01
  • 4
    @Puspendu At this point a lot of the Google results actually point to this question. – AngryHacker Dec 18 '10 at 06:46
  • @AngryHacker then try this: Why do we need Application Server in Java -stackoverflow – Puspendu Banerjee Dec 18 '10 at 07:35

6 Answers6

7

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.

Aamir Jamal
  • 855
  • 9
  • 15
Jonas
  • 121,568
  • 97
  • 310
  • 388
5

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.

rgksugan
  • 3,521
  • 12
  • 45
  • 53
5

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

Sid
  • 4,893
  • 14
  • 55
  • 110
3

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.
Dead Programmer
  • 12,427
  • 23
  • 80
  • 112
2

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

1

This may be because jboss can provide better after-sales service, and jboss, etc. can provide operation and maintenance support, etc. This may be the reason why many large companies choose commercial versions of servers. But you must know that tomcat and netty are not bad. For example, many large B2B or C2C or B2C companies still use tomcat, such as Internet companies such as Alibaba. Choose a server

  • Operation and maintenance costs
  • Scalable costs
  • Server cost
lonecloud
  • 413
  • 3
  • 12