password
username
Sponsored by CakeMail, an email marketing software
Newsletter preview

Javalobby logo image
Tuesday, January 29, 2008 

Learn Java Performance Testing Best Practices

When bad code slips into production, it costs your business money, time and customers. Discover how using Java application performance testing during pre-production ensures better code for better software.



Read the white paper "Best Practices in Java Environment Performance Testing" today.

 Perspective


New from Manning!
Flexible Rails

Click to Save 25%
Enter code JLFR25



Be sure and
check out a
No Fluff Just Stuff
Java conference
coming your way!

2/08-2/10 San Jose 2/29-3/02 Milwaukee
3/07-3/09 St. Louis
3/14-3/16 Minneapolis
3/28-3/30 Omaha
4/04-4/06 Boston
4/11-4/13 San Diego
4/11-4/13 Portland
4/18-4/20 Jersey City

 
 A Developer's Perspective
 Next section
My name is Antonio Goncalves. I am a senior software architect living in Paris. I work as a freelance consultant in helping customers to set up their software architecture. My specialities are Java / Java EE and Open Source frameworks.

Why are we not using Java EE 5?
By Antonio Goncalves

Editor's note: I saw Antonio's posting and thought that he was echoing many of the things that we have heard at Javalobby over the past 2 years. His perspective is well-informed too, he's the author of a book on Java EE 5, available from Amazon.fr. He was also too modest to mention that he is the leader of the Paris JUG. - Matt

Believe it or not, in a few months the Java EE 5 specification will be two years old (Final Release on the 11 May, 2006). And nobody is using it.

We have all read about how easier the development model is in Java EE 5 compared to J2EE 1.4. Complexity reduced, less XML file descriptors, less code, injection and so on. Despite all these good things, Java EE 5 projects are not taking off. Here are some reasons why :

Java EE 5 is a rupture more than a continuity. J2EE 1.4 and Java EE 5 are really different. That means development teams have to be trained to something new and develop new projects leaving behind years of EJB CMP or JAX-RPC. Some teams have invested a lot in J2EE 1.4 and are willing to wait a little bit more and see. And what if Java EE 6 is another big rupture again ?

Java EE 5 is based on Java SE 5 (heavy use of annotations). But JDK 1.4 is still widely use in projects, making it impossible to migrate to Java EE 5

Even if Java EE 5 is much simpler than its predecessors, it is still too complicated and has many specifications. With profiling in Java EE 6 the number of specs will be reduced, but until now, to be Java EE 5 compliant, application servers have to implement 23 specifications.

Today the application server race is completely different from few years ago. Websphere is the number one for big projects and, as usual, is late and is still not Java EE 5 compatible. On the other hand, just when companies had started to use open source with JBoss, JBoss has left the race and version 5 is still in beta. Weblogic, the very innovative company (you should look at Weblogic Virtual Edition) has been bought by Oracle. God knows what will happen. GlassFish is by far the best open source Java EE 5 app server. But people still don't know it well. And if some do, they immediately remember the previous reference implementations made by Sun (the ones used to play with the Java Petstore) that were not usable for real life project. GlassFish is.

Many simpler frameworks arrived before Java EE 5 and took over. Of course there is Struts. JSF came after with a different development model but it is so different from Struts that projects don't want to invest on it. Axis and XFire brought a nice way to develop web services while J2EE was still struggling with JAX-RPC and JAXR. JAX-WS with JAXB 2 are great but arrived too late. Hibernate while we were mesmerised by EJB 2.1 CMP complexity. And of course, Spring which has become a serious Java EE competitor. It is lightweight, lets you do plenty of what Java EE does, so why make the move?

To make it more blurred in developers' minds, most of these open source framework are now implementing some Java EE 5 specifications. For example, Hibernate implements JPA now (even if it does more). And because Hibernate was here before JPA, a developer using annotation and an EntityManager will still say that he/she develops with Hibernate, not JPA. Same thing for Axis implementing JAX-WS now. How frustrating is that ?

Some words have become evil. “EJB“ for example. No matter how much easier EJB 3 is, it‘s still called an “EJB“ and that reminds us of bad memories because we remember Home/Remote interfaces, Bean classes with empty methods, XML files and JNDI lookups with narrowing, difficulties with testing… Another word issue is the “Entity Bean“ one. We all remember the Entity Bean 2.1 nightmare (heavyweight and over complicated). Unfortunately, JPA kept the name “Entity“ when talking about a persistent object. The word “Entity“ is too close to “Entity Beans” and that scares developers.

Talking about how words can have an impact on you, the naming used by Sun didn't help either. Nobody knows what they are talking about and they get confused with J2EE 1.4, Java EE 5, JDK 1.5, Java 5, Java SE 5. So when you arrive at a job interview and say “I‘m a Java EE 5 expert”, one will turn to you saying that you are not up to date because they use Java 6 and not Java 5.

The definition of Java EE has been completely twisted. Tomcat is seen as Java EE. Look at the job ads and you will see : "looking for a Java EE expert who knows Tomcat, Spring, Hibernate"... hum, no Java EE in there. Again, EE 6 profiling will make these things clearer, but until then, Tomcat is not a Java EE 5 app server.

Testing a Java EE 5 application is definitely not as easy as a Spring application. We live in a world where everybody talks about test, but nobody really does it. Java EE 5 doesn‘t help in this aspect.

Conclusion : some aspects of Java EE 5 are still not at their best (testing, injection could be better, JPA still has to get richer, JSF model is a bit complex..), but the overall is that Java EE 5 is definitely much easier than its predecessor, J2EE 1.4. Projects that are using Spring might not see the benefit of Java EE 5. Except that these big projects are all using Spring within an app server (for clustering and performance issues). Upgrade your app server and start developing some EJB 3.0. You‘ll see how easy it is (and you can even combine Spring and EJB). For projects in J2EE 1.4, well, if you use Websphere, you are stuck, for the others, upgrade your app server (Weblogic 10, GlassFish 2…) and develop your new projects with Java EE 5. It is backward compatible and you can call an EJB 3 from an EJB 2.1. Do not migrate yet, just let both versions co-exist.

And you, why don't you use Java EE 5 yet ?

Until next time,
Antonio Gconcalves
http://jroller.com/agoncal/

 
 DZ Top Links
 
 DZone Top Links
 Next section
 Back to top
most clicked this week from dzone.com

dzone

Most-clicked links this week

 
 Popular at JL
 
 Popular at Javalobby
 Next section
 Back to top
A recap of some of the most popular and active Javalobby.org discussions this week.

Java 7 Predictions

So, we're a few weeks into the new year and it's time for my predictions about what will make it into Java 7. My best guess is that a Java 7 SE JSR will be created in the next couple months to have it ready before JavaOne.

What server-side Java web framework will be the next for 2008?

Arguably, Struts 1.x is end of life. There are plenty of other Java server-side web frameworks: JSF (the standard), Wicket, Tapestry, Struts 2, Echo, Spring MVC, etc. Do you have any market data on what developers are adopting after Struts 1.x? If not, what is your gut feel? What will developers use in 2008 for new projects? I asked my linkedin network this question and was surprised at how detailed the answers were. I share them now.

Holy Double-espresso, Batman! Where's my Javalobby?

Do not worry, Boy Wonder, the Javalobby and EclipseZone sites you have known and loved haven't gone away! They have simply become more fully a part of the DZone Network. Javalobby and EclipseZone have both been merged into a broader system of developer communities operated by our parent company, DZone.

The JEE wars are over - and Spring has won

I pose the question of whether the JSR manner of process has really been a good thing for the Java platform. I truly wonder on account I think some of the best Java software came into use and wide acceptance without the blessing (and presumed benefits) of a JSR process and any eventual official ratification.

MySQL creator releases Maria, the new engine that will replace InnoDB

A blog posting from MySQL founder and original developer, Michael "Monty" Widenius, announces the release of a major new database engine called Maria. Over two years in the making, the Maria engine appears to be the open source database leader's answer to the problem posed by Oracle's acquisition of InnoDB. Here's a list of major features of Maria:

What Java IDE VM arguments do YOU use?

Java based IDEs are really impressive these days, but developers may quickly find themselves running up against a wall (or worse, constant crashes!) with memory settings they are shipped with.I would like to find out what VM Arguments YOU use for your IDE, be it Eclipse, IntelliJ, NetBeans, or JDeveloper, or whatever the Java-based IDE is that you use, and the reasons/rationale for your choice.

From Java to Groovy in a few easy steps

Groovy and Java are really close cousins, and their syntaxes are very similar, hence why Groovy is so easy to learn for Java developers. The similarities are such that most of your Java programs are even valid Groovy programs! However, as you learn Groovy, you'll get used to its neat shortcut notations, its sensible defaults, its GStrings, and more.

 White Papers & Announcements
 
 Product Announcements
 Next section
 Back to top
Product and service announcements for Java developers.

Javalobby is undergoing a major transition this week. Visit http://java.dzone.com for more information. We hope to have the announcements back next week and we apologize for the inconconvience.

 Your Account
 
 Your Account
 Next section
 Back to top
Manage your account info for this and other Javalobby publications.
Manage your Javalobby membership details

Click on the following links to:


 Contact Info
 Next section
 Back to top
Here's how to reach us, we love to hear from you.
Email us
Send news items to editor@javalobby.org
Send questions, complaints, or suggestions to feedback@javalobby.org
Send advertising inquiries to advertise@javalobby.org
 
Call us
Our number is (919) 678-0300. We'd love to hear from you!

 Legal
 Back to top
The fine print we'd rather avoid completely.
Feel free to redistribute this newsletter in part or in full to your friends.

Javalobby News is a service mark of DZone, Inc.
Copyright ©2001-2008 DZone, Inc.

Thank you for your continued support of Javalobby. If you prefer not to receive the Javalobby weekly newsletter, send an e-mail to ***-jlnews@javalobby.org and please ensure the actual email address to be removed is present.
Javalobby.org, 113 Legault Drive, Cary NC 27513 USA