Migrating Spring to Java EE 6 Article Series


Java EE 6 with its light-weight, easy-to-use, and simplified yet powerful functionality is very compelling. This is the only standards-based enterprise Java platform supported by multiple vendors including, but not limited to, Oracle, IBM, Apache, Caucho, and others.

To highlight some advantages of the Java EE 6 platform (and brush up some ;-) ...

How do you write an EJB ?

@Stateless
public class MyEJB {
    public doTransaction() {
        . . .
    }
}

And package it in a WAR, no deployment descriptor or special packaging. Don't keep blowing the J2EE 1.3/1.4 horn guys!

How do you inject a bean or multiple implementations of service in another class ?
@Inject [@SomeQualifier] MyEJB
Yes, Contexts and Dependency Injection provide lot more rich functionality in the platform.

How do you schedule a timed task ? - Just add
@Schedule
on a public method of an EJB>

How do you expose a POJO as a RESTful entity ?

@Path
public class MyResource {
    @GET
@Produces("application/xml")
    public String myGet() {
        . . .
    }
}
JSF 2 now uses Facelets-based templating language, allow composite components to be written very easily, truly enforce MVC-based pattern, and lot more benefits.

What does a Servlet look like ?

@WebServlet
public class MyServlet extends HttpServlet {
    public void doGet(HttpServletRequest request, HttpServletResponse response) {
        . . .
    }
}

And no "web.xml" here as well.

With a wide variety of development (NetBeans, Eclipse, IntelliJ) and deployment options (GlassFish, JBoss, Caucho, TomEE, ...) and no vendor lock-in, Java EE 6 is the only platform you need to build your enterprise applications. Read more benefits of the platform by the actual users here.

With all these benefits of Java EE 6, here is a very timely multi-part article by David Heffelfinger showing how to migrate your applications from Spring -> Java EE 6. Don't wait, you can deploy Java EE 6 applications on GlassFish (along with commercial support from Oracle) today!

Part 1 is now available.

Let us know what you think!
Comments:

Why is the article title "Migrating Spring to Java EE6"? The example doesnt even show the migration way. As a developer using spring and very interested in using spring, i am disapointed that all the jee article always covers the same things...
Please cover some simple things that are simply solved in spring :
* How do I set properties or configuration from a property file ?
* How do I manage multiple configurations for test , prod..
* How do I write good unit test
* Can I mock a dependency in a unit test and perform the test ?
* Can I use an embeddded database for my unit test..
*...

Posted by stephane on November 02, 2011 at 11:57 AM PDT #

there isn't nothing more rapid for create a web application than Java
Salu2

Posted by Javier Zamora on November 04, 2011 at 04:03 AM PDT #

Thanks stephane,

I've passed the feedback to author of the article.

Posted by guest on November 09, 2011 at 03:38 AM PST #

Post a Comment:
Comments are closed for this entry.
About

profile image
Arun Gupta is a technology enthusiast, a passionate runner, author, and a community guy who works for Oracle Corp.


Java EE 7 Samples

Stay Connected

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today