users@glassfish.java.net

Re: Deploying Spring Application in GlassFish

From: <glassfish_at_javadesktop.org>
Date: Wed, 19 Mar 2008 05:07:49 PST

Java EE 5 was obviously significantly "inspired" by Spring in its efforts to become easier to develop and deploy. Because Java EE 5 did "borrow" so many Spring concepts, the gap in usability between Spring and using Java EE without Spring did narrow somewhat. That being said, there are still nice advantages of using Spring with a Java EE application server.

One nice thing about Spring with a Java EE application server is that Spring often isolates application server-specific functionality in its configuration away from the code itself, allowing the code to remain viable in a Java SE environment, in a Java EE web container (such as Tomcat), or in a full-fledged Java EE application server. For example, Spring's JPA support allows JPA environment-specific characteristics (transaction handling and entity manager access) to appear the same in the code because the differences are handled by Spring via configuration.

As stated earlier, Spring allows simplifies many otherwise verbose APIs. An example here is Spring's JMX support. Spring makes it extremely easy to expose a normal Java class (Spring bean) as a fully JMX-compatible Model MBean without needing to know many specifics of JMX or of Model MBeans in particular. Spring provides similar support for APIs such as JDBC and JMS.
[Message sent by forum member 'ddmarx' (ddmarx)]

http://forums.java.net/jive/thread.jspa?messageID=264768