Oracle is promoting conversions from the popular Spring Framework for Java development to Java EE (Enterprise Edition). But the founder of Spring counters that these technologies can work together and cites a financial incentive for Oracle’s campaign.
Oracle has been promoting these migrations in a series of Web presentations going on for many months. A Java Spotlight posting this week pertaining to migrations to Java EE 6 links to an interview with Paul Bakker and Bert Ertman from Luminus Technologies in the Netherlands. They argue Spring no longer has advantages over enterprise Java that it might have had previously.
Some users have been holding onto beliefs about enterprise Java inadequacies from several years ago based on books from Spring Framework inventor Rod Johnson, said Bakker, senior software engineer at Luminis. "But nowadays, when we have Java EE 5 and Java EE 6, we [have] completely revised programming models, which are very lightweight and POJO-based (plain old Java objects)," Bakker said. "It’s about time to re-educate people that Java EE no longer stands for Java Evil Edition, but it’s actually quite ready to build some very good enterprise applications with."
Dependency injection, popularized in Spring and used for linking related objects, is now enabled in Java EE 5, the Luminis technologists stressed. Lightweight, aspect-oriented programming is now implemented in Java as well, they argued. But Johnson, in an emailed response to questions, dismissed the notion of a conflict between Java EE and Spring, calling it "fictitious." Spring and Java EE 6, Johnson said, "can work very nicely together."
"The ‘Java EE 6 does away with the need for Spring’ argument is essentially commercially motivated," Johnson said "Spring has reduced the need for traditional application servers like Oracle WebLogic and has enabled users to choose lighter-weight infrastructure. While Java EE 6 is an improvement on previous versions of Java EE, Spring offers significant additional value."
Spring works in a broader set of scenarios than Java EE 6, thus giving Spring users greater choice, said Johnson. "They may not wish to use a Java EE application server; even [if] they are on Java EE, they may not be running Java EE 6; they may be in a cloud environment where Java EE is not available; they may not be using any app server; or they may wish to be able to deploy in different scenarios. Spring’s portability is highly valuable."
Spring’s ecosystem solves a wider range of problems than Java EE, such as integration, batch, and nonrelational data, Johnson said. Fine-grained security is supported as well, he said. "Using the Spring component model can offer many other benefits."
Elsewhere in the Java EE realm, Oracle is looking to the planned Java EE 7 release to extend transactional capabilities of Enterprise JavaBeans and its transactional semantics, according to Oracle’s Arun Gupta. "What we’re doing in Java EE 7 is we are abstracting the semantics so they can be more widely applicable," for example, to Managed Beans or CDI Beans, Gupta said in Java Spotlight. With CDI Managed Beans, a managed bean is implemented by a Java class, called a bean class.
A top-level Java class is a managed bean if it is defined as so by any other Java EE technology specification or meets conditions such as not being a nonstatic inner class, according to a Java EE 6 tutorial. Java EE 7 is expected to be released this summer and featured in the GlassFish Server 4 application server.