What are the compelling reasons to use a J2EE Application server over a Web Server(with a Servlet engine) for a project.
I guess you need to elaborate on the scope of project for giving the explaination for this question.
any how what I can tell u the basic diff in appserver and web server is
1. appserver is for more business driven applications, with more control logic and business rules to accomodate, this all is possible with the ready to use container object which provides environment for transaction control, message queus, security, load balancing, failover mechanism and many standard features which will help in achieving high performance, more reliability, more capacity and effective use of resources.
On the other hand webserver is more targeted towards, containt management and more of View part of MVC architecture.
if you want more details on app server then go for j2ee specs on sun site, you will find lot of advantages of app server over web server.
but yep one thing is for user, it all depends on scope and focus of your project and depending on these parameters you have to decide what to use.
Thanks for yur reply. Lets say the project is a web application. The points you have metioned can still be achieved with a Web Server (running JSP, Servlet technologies), third-party tool and right kind of hardware for load balancing, fail-over and scalability.
What I am really after is apart from the points given what would other general points to be considered for choosing an App server.
I dont think web server is such a strong component for the points what I have mentioned. ofcourse you can achieve all that with your own customized code and other means, but the point still reamins is why reinvent the wheel ?
that was one of the problem every vendor was facing and thatz why J2ee specs came in existance.
if what you are developing is a web application (containt management and general user registration and browsing facility) then you can go ahead with web server, but in case your requirement is suppose to support some business process which involved lot of business rules and persitance layer interaction then i guess app server is a candidate for your project.
you can check some basic ejb patterns for understanding the kind of freedom and ease you will get by using app servers.
The driving point for choosing an appserver over web server is Transaction Support, connection pooling, security.
Sridhar Rao Ramshetti
One point I will like to clarify here is connection pooling (DB connections) is not a mandetory feature from J2EE specs point of view, itz up to the app server provider to give this feature as a USP or not. Many a time we forget this point and start considering pooling as a defacto standard from J2EE spcs.
Just wanted to remind you so that it will not be missed.
Extract from EJB specs
24.2.5 JDBC 2.0 extension requirements
The EJB Container must include the JDBC 2.0 extension and provide its functionality to the enterprise
bean instances, with the exception of the low-level XA and connection pooling interfaces. These
low-level interfaces are intended for integration of a JDBC driver with an application server, not for
direct use by enterprise beans.
Thanks Buddy.. u cleared my misunderstanding