views:

417

answers:

7

Typically we use WebLogic or JBoss to deploy our apps. I understand that when using open source solutions like Spring you can develop your app and run it on a simple servlet container like Jetty. So the question would be why even bother with an app server?

+3  A: 
  • Advanced features - like transactions, security integration, pooling, hi-perf queuing, clusters.
  • Performance (weblogic has a hot JVM)
  • operational and administrative interfaces.

beyond that... I don't know?

In most cases, YAGNI.

Cheeso
I agree with the last point. Unless you're Twitter, you probably won't need it.
musicfreak
JTA for transactions, Spring Security for security, Apache DBCP for connection pooling, ActiveMQ for queuing. All possible on Tomcat/Jetty. Tomcat has an adequate admin console, but I'm not an admin. But I still love WebLogic. If somebody else is footing the bill for the license, I think it's the best app server on the market - hands down.
duffymo
ok, I'll bite: why? Why is WebLogic better than Tomcat/Jetty? You say it's the best app server. What makes it the best?
Cheeso
My experience with it. Personal opinion. Purely subjective. Rock solid and a pleasure to develop with. I think BEA lost a lot of their talent after a while, and now that Oracle has them their future is an open question, but when they were good they were the best by far. WebSphere rots, as do all IBM products; JBOSS has 10,000 configuration files that you have to edit by hand and the barest bones JMX console imaginable for admin; Glassfish will never be significant.
duffymo
+2  A: 

If you've gotta ask, you can't afford it.

Seriously, full-blown application servers have more features, and you will have to decide if they are worth it to you over, say, Tomcat or Jetty. I don't think this is an appropriate place to try to give all the reasons, but here's one: application servers can make it easier to wrap functionality and services in transactions. More reasons are given here.

Glenn
A: 

Some people like to have EJB support (J2EE specification) "just in case"

victor hugo
YAGNI YAGNI YAGNI
Cheeso
@Cheeso I agree with you
victor hugo
I agree as long as you keep that "just in case" in there. You don't need EJB support at all until you find an app that uses them. If you're doing all your own development, there's almost *never* a good reason to use them.
Ian McLaird
+1  A: 

The clustering, failover, and session synchronization features of WebLogic and JBoss still make them worthwhile in large data centers.

JBoss uses Tomcat as their web front end, of course, so it's not either/or.

I've seen people add OpenEJB and ActiveMQ to Tomcat and get all the features of a Java EE app server. The line is rather blurred.

Spring DM server is built on Tomcat. It'll be interesting to see whether it can start taking mind and market share away from the Java EE app server folks.

I love Spring - it's my preferred framework - but I can tell you that it comforts some folks to know that Java EE is a standard that's implemented by multiple app server vendors. If you don't use vendor-specific extensions, in theory your code can be moved from WebSphere to WebLogic to JBoss without changes. Some large IT shops like that. They shy away from Spring because it's not a standard. It's the brainchild of Rod Johnson and his team. If you decide you don't like their stuff you have nowhere else to go.

There's a new Java IoC/DI standard in the works. Rod Johnson and Bob Lee are working on it. Maybe that will start to calm some of the fear that's out there.

duffymo
+3  A: 

No one got fired for using WebLogic or WebSphere in an enterprise environment. For big businesses and managers not only the technological aspects are important. These application servers offer fully featured administration consoles that are easy to be used even from inexperienced administrators. Also, support services are easier to be found. A company that uses open source components needs to invest on experienced developers to set everything up and do the maintenance. Application servers are widely used within companies (banks for example) that their businesses have nothing to do with software. For them it makes greater sense to buy everything (software license, installation/configuration, support services) from a single vendor.

kgiannakakis
+1 for mentioning administrative features, but that's really orthogonal to the software support side of things. You might want to separate them...
wds
A: 

Several reasons, most of which may or may not apply to a particular need.

1) Support. Many enterprises like to have a support contract with the vendor who developed the server. With an open source solution you are pretty much "on your own."

2) Full J2EE / EJB support. While I don't find this particularly useful myself, these features are widely used by commercial applications. If you need them, there's really no alternative. If you don't need them, they're a waste.

3) Good administration consoles. Tomcat has an admin console that will allow you to add and remove applications. As far as I am aware, that's about as far as it goes. WebSphere has that (though not very streamlined), but you can also alter connection pool sizes, data sources, thread pool sizes, change the logging configuration (very high granularity), and activate memory and JVM profiling. Mostly without restarting the App Server. Supposedly, clustering is relatively easy to set up as well. The ability to install a .EAR file is notably missing from tomcat as well, and if you have multiple inter-related applications to install, it becomes a real pain to manage them all.

You can do (at least) most of (3) in tomcat as well, but not through the admin GUI. Some people like to have a nice GUI.

Ian McLaird
A: 

An application server is an architectural solution. You have to use it if you are going to think different reusable modules of your application. If you don't mind that your services should be implemented over the HTTP stack so EJB must be your default option. With an AS you have an already packed solution for solve good practices in architectural way. You can use queues, topics, jms, etc out of the box, and those are all JEE standards. But I think that you have to think all your application in this architectural buzz-way to be able to judge the AS decision.

diega