2

I'm starting to learn spring and I came across one definition which says "Spring enables developers to do enterprise development without an application server".

What does this exactly mean and what's the harm in using an application server for enterprise development.

But don't developers use tomcat while developing enterprise development and isn't Tomcat an application server.

I'm confused here.

Can someone clarify the two points mentioned above.

Dark Matter
  • 2,231
  • 3
  • 17
  • 31
  • 1
    possible duplicate of [JBoss vs Tomcat again](http://stackoverflow.com/questions/4668042/jboss-vs-tomcat-again). Short version: no, Tomcat is a container, not an application server. – Matt Ball Sep 15 '13 at 06:31
  • @Matt Ball : "Tomcat is a container, not an application server" :- What's the difference? – Dark Matter Sep 15 '13 at 06:34
  • Did you read the linked question? More reading: http://stackoverflow.com/q/11262617/139010 | http://stackoverflow.com/q/6719004/139010 | http://serverfault.com/q/106154/18944 – Matt Ball Sep 15 '13 at 06:36
  • a servlet container: no EJB. Have a look at the JEE spec, servlet container like Tomcat implement the JEE web profile. Have a look at TomcatEE for a full JEE app server http://tomee.apache.org/ – Frederic Close Sep 15 '13 at 06:38

2 Answers2

1

I think what's meant by "Spring enables developers to do enterprise development without an application server", is that you don't need a full Java EE application server like JBoss, WebLocic, WebSphere ... but can do everything with a 'simple' servlet container like Tomcat.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Frederic Close
  • 9,389
  • 6
  • 56
  • 67
  • What's the disadvantage/harm in using a full JEE application server? – Dark Matter Sep 15 '13 at 06:31
  • Main disadvantage were (are?) that most of them are quite heavy / slow to start / sometimes complex to configure. – Frederic Close Sep 15 '13 at 06:34
  • >`Main disadvantage were (are?) that most of them are quite heavy / slow to start / sometimes complex to configure.` - "were", a long time ago ;) JBoss starts up in 1.5 seconds on my system, TomEE in 2, GlassFish 2.5 or so. There's also nothing to configure. It's download, unzip, copy war to server and start. There's no difference with Tomcat there. – Arjan Tijms Sep 15 '13 at 13:42
1

Springframework provides services like dependency injection, declarative transaction management and others which are provided by Java Application Server for Java EE applications. The difference is that Spring based app can work standalone while Java EE app can't. It may be the reason to favor Springframework over a Java AS.

Tomcat is a servlet container which implements only Servlet and JavaServer Pages specifications, Java Application Server is supposed to support all of Java EE specifications like EJB, JMS, JPA, JTA and many others

Evgeniy Dorofeev
  • 133,369
  • 30
  • 199
  • 275
  • What do you mean by "Spring based app can work standalone while Java EE app can't". Can you please elaborate. – david.colais Sep 15 '13 at 08:15
  • Spring app can have a main class with main method and we can run it as a regular java app. Java EE app is a war or ejb-jar or ear and it can work only with Java AS – Evgeniy Dorofeev Sep 15 '13 at 08:21
  • Thanks for replying. And by your quote "Spring framework provides services like dependency injection, declarative transaction management and others which are provided by Java Application Server for Java EE applications" does it provide all those services without using a Java AS where as other Java frameworks are required to use a Java AS. – david.colais Sep 15 '13 at 08:55