Skip to main content

End of Java EE 6 show

Since last 2 days I have had lot of issues integrating JPA2 with my SLSB. Some of these are attributed to my new learning curve in Java EE 6. However with my quick exploration in last few days I can safely say that there are still serious holes in Java EE 6 world. It is slim trim and good for rapid development (unless you are on some unstable open source server) but lacks full power to drive a highly customizable and external configuration driven flexible application. These are some of my observations:

  1. Open source servers – Geronimo 3 and JBOSS 6 not yet ready. JBOSS 6 is still better. Guys for better adoption of open source we need documentation. Open source product and closed documentation will not promote this good products.
  2. Directly injecting persistence unit / entity manager results in severe cross cutting concerns. I take back my earlier word, although speed of development is important, good design goes a long way in maintenance. After writing some code in my session bean with JPA I was sad myself.
  3. Java EE 6 will not suffice if you need to build and app with good number of external configuration properties.
  4. Security – although I did not try much, but looks like is not as strong in terms of features that Spring security provides – especially easy integration with directory servers or SSO systems.
  5. If I want to clean up my session beans by moving data access code to a DAO, then I would have to build a factory to inject it. Ah Spring does a better job here. Does Java EE 6 promote code smell? I guess YES.
  6. I was feeling the need for those template classes when writing direct JPA code with entity manager.
  7. I had problems using the POSTGRES data source configured using JBOSS 6 console. The persistence unit could never connect. Finally I had to resort to old days of copy+paste the xml in the deploy directory.

Final conclusion

I am rolling back to stick to Spring 3 on Tomcat 6/7 with Primefaces and Hibernate or my home grown data mapper. I will also use JQUERY UI and JQUERY Mobile if my requirements are that way. I may consider JBOSS 5 / 6 if  there is need for JMS / MQ and there is multiple resource managers calling for JTA. But all core will be Spring. I think lot of dust has to settle over Java EE 6, even then it will still take lot of time to match the pluggability, flexibility and wide coverage of Spring with other good frameworks.

Next focus will on my own simple data mapper. I will put it on source forge.

Comments

  1. You probably have to use GlassFish v3, instead of rolling back to the trouble. :-)

    ReplyDelete
  2. Yes it is good. It does away with the technical glitches or platform implementation bugs, but still not usable for a configurable, pluggbale product.

    ReplyDelete

Post a Comment

Popular posts from this blog

CKEDITOR 3.x - Simplest Ajax Submit Plugin

  I have assumed that you have downloaded and got started with CKEDITOR. Step 1 – The html file is shown below: <html> <head> <title>Writer</title> <meta content="text/html; charset=utf-8" http-equiv="content-type" /> <script type="text/javascript" src="ckeditor/ckeditor.js"></script> <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> <style> .cke_contents { height: 400px !important; } </style> </head> <body> <form action="sample_posteddata.php" method="post"> <textarea id="editor" > </textarea> <script type="text/javascript"> //<![CDATA[ CKEDITOR.replace( 'editor', { fullPage : true, uiColor : '#9AB8F3', toolbar : 'MyToolbar' }); //]]> </script> </form> </body> </html> Note that the jquery js

Part 3 - Integrating Tiles, Thymeleaf and Spring MVC 3

In this post I will demonstrate how to integrate Apache Tiles with Thymeleaf. This is very simple. The first step is to include the tiles and thymeleaf-tiles extension dependencies. I will include them in the pom.xml. Note we wil lbe using Tiles 2.2.2 Listing 1 - parent/pom.xml --- thymeleaf-tiles and tiles dependencies <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <!-- Tiles --> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <dependency> <groupId>org.apache.tiles</groupId> <artifactId>tiles-core</artifactId> <version>${tiles.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.apache.tiles</groupId> <artifactId>tiles-template</artifactId> <version>${tiles.version}</version> <scope>compile</s

How to Stand up a Spring Cloud Config Server?

Setup and Configure Spring Cloud Config Server Project Spring Cloud Config Server is just another Spring Boot application. It provides several infrastructure micro services to centralize access to configuration information backed by a version controlled (well at least in the case of default GIT storage) repository. Step 1 - Create a Spring Boot project in STS with the dependencies shown in Figure 2. Figure 1 - Creating Spring Boot project to setup Spring Cloud Config Server Figure 2 - Spring Cloud Config Server dependencies Click on 'Finish' to complete the creation of the Spring Boot project in STS. The build.gradle file is shown in listing below. There is only one dependency to the Spring Cloud Config Server. Also Spring Cloud release train 'Dalston.SR1'. Step 2 - Annotate the class containing main method The next step is to annotate the ConfigServerInfraApplication class with  @EnableConfigServer That's all is needed on the Java si