On Mar 10, 2014, at 4:16 PM, Leo Donahue <donahu...@gmail.com> wrote:

> On Mon, Mar 10, 2014 at 12:58 PM, Mark H. Wood <mw...@iupui.edu> wrote:
> 
>> It's probably worth asking what "full-fledged enterprise applications"
>> means.  I'm not aware of any specification with that title.
>> 
>> 
> That was a "Spring" term from the page I was reading, and the reason I
> asked the question.
> 
> Tomcat itself is not a J(2)EE application server.  I have been under the
> impression that one could successfully could implement *some* of the J(2)EE
> stack carefully on Tomcat through other means.

True.  You can use some parts of Java EE by simply including JAR files in your 
app.  Just to name a few JPA, JMS and / or Bean Validation can be included this 
way.  You don’t need Spring or even a container to do this though.

> Spring is one of those means?

Spring doesn't provide implementations of the Java EE specs, rather it aims to 
make using Java EE technologies easier.  This is true whether you deploy to a 
full stack Java EE container or Tomcat.

> From what I've been reading about Spring in the last three days is it is
> essentially a bunch of design patterns turned into objects.  Dependency
> Injection through patterns - I get that.  The AOP part of Spring is
> basically a mechanism for applying object behavior to other objects without
> composition.  I know i have that wording wrong, but essentially, AOP though
> the use of point-cuts lets me applying object behavior of logging to other
> objects without those objects being composed of my logging objects.  I
> don't know how I would do that with a pattern, unless it is some kind of
> front controller pattern - but I don't know.

By default, Spring does this with dynamic proxies.  Because you configure your 
beans and Spring creates them for you, it can easily wrap them in a proxy and 
through the proxy apply additional behaviors.  This works good in a lot of 
cases, but does have limitations.  Because of this Spring also support aspectj, 
which works through byte code manipulation.

> So, Spring allows Tomcat to host "full-fledged enterprise applications"
> that would normally require a J(2)EE application server like Glassfish?
> That is what I was asking, without saying it specifically.

Spring is a framework that aims to make your life as a developer easier when 
writing complicated or large applications (although it works nice for any size 
application).  I’m not sure I would call it a replacement for a JEE server like 
Glassfish though.  If you have an application that targets a JEE container like 
Glassfish or WebSphere, Spring is not magically going to make that application 
run in Tomcat.  Having said that, if you write the same application and use 
Spring instead of targeting a JEE container, many of the things that would have 
tied you to a full stack JEE container can be accomplished in smaller and 
lighter weight container like Tomcat.

Dan



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to