Skip to main content

Exploring Java EE 6

I have been using, learning and writing about Spring framework for last 5+ years now. It has done loads of good work to simplify life back in J2EE days. But off late I am seeing and participating in discussions where I see a transition back to the platform again. The reason being the Java EE 6 has adopted good ideas from frameworks like Spring, Hibernate etc and have come out with a lean and thin platform. This has not gone unnoticed in developer world.

Also in last couple of years Spring’s evolution has a framework has stalled to an extent. The core framework and extensions viz Spring MVC, Security etc being stable the guys at Spring Source have focused more on servers, OSGi, cloud and adding more products to Spring Source portfolio via acquisition route. The company itself was acquired by VMWare. So lots of things happening but nothing new or exciting enough in the core area to keep the developers attracted. This is really one bad thing that runs deep inside the Java developers’ veins. They are always in the lookout for something exciting new and better. This makes them restless to search for alternatives. The moribund around the core Spring and extensions stack and gradual evolution of Java EE 6 in the same time has acted as the new catalyst for excitement in the Java EE world.

I thought that this senior and experienced developers are showing interest for definite reason. I have been reviewing and reading about Java EE 6 for last few days and found it interesting, making things easier and I have a feeling that if you have half decent team Java EE 6 can cut down on development time significantly. So I thought of starting to explore this in greater detail. I have also got hold of the patterns book by Adam Bien and reading it. All in all things are looking good for the platform. I had a hard and reluctance to move to Spring from J2EE(I was a big fan of EJB in those days). But now I want to explore and make a quick transition back to Java EE 6.

I have decided to build some useful application to try and test all the different new features of Java EE 6. The application that I am trying to build is similar to OSCOMMERCE (, possibly a clone of this great application. I will try to build as many features as I can when I have time. Initially I thought of using Geronimo 3 for this, but I had to stumble upon some JSF issues possibly not compliant with JSF 2 and decided to switch to JBOSS 6M5 instead. Both these servers are very new in supporting the Java EE 6 specifications and catching up with documentation. Glassfish 3 seems to be there for sometime ready with Java EE 6. But since lot has already been written about Glassfish (including books from Apress), I thought its worthwhile exploring JBOSS (and later possibly Geronimo). Also I am a bit sceptical about the future of Glassfish. JONAS is still on Java EE 5. Before I end, here is the link to the JSF 2 and Geronimo 3 issue which I posted:

In my next post I will set up the development environment for Java EE 6 with Eclipse Helios 3.6.1 and JBOSS. Stay tuned!. The road will be pure Java EE 6 and then possibly some other frameworks if needed.


Popular posts from this blog

Why do you need Spring Cloud Config server?

Last month I wrote a primer on concepts around 12 factor app. Before getting into the details of the Spring Cloud Config Server, I must refresh on the principle #3 from the list presented in that post.

3 – ConfigurationStore config in the environments
Configuration information must be separate from the source code. This may seem so obvious, but often we are guilty of leaving critical configuration parameters in the scattered in the code. Instead, applications should have environment specific configuration files. The sensitive information like database password or API key should be stored in these environment configuration files in encrypted format.
 The key takeaways from this postulate for a cloud-native microservices application are:
Do not store configuration as part of the deployable unit (in the case of lead microservice - inside the jar or war if you are still deploying war like the good old days). Instead, store it in an external location and make it easily accessible during run-…

Upgrading Lead Microservice - Use MariaDB and Flyway with Spring Boot

So far I have been using an in-memory H2 database or Mockito for testing the lead microservice. To make the transition towards using the Spring Cloud Config server, I need to upgrade the micro-application to use MariaDB. I will be adding the configuration in the application.yml  the file which in the subsequent post will move over to the config server store. I will also be using Flyway to make it easy to maintain the database schema changes in future. I will use this post to introduce Flyway in the mix. Spring Boot also provides first class integration with Flyway. I am using Flyway as its really quick and easy to get started, minimal learning curve (no DSL) and I am comfortable with it having used it in the past.


MariaDB 10 is installedBasic familiarity with FlywayHeidi SQL client is installed.
Step 1 - Update build.gradle to include the MariaDB JDBC and Flyway dependencies.
Do not forget to do a Gradle refresh on your IDE (I am using STS 3.8.4 on Java 8)

Step 2 - Rename the…

How to implement Cache Aside Pattern with Spring?

ProblemYou want to boost application performance by loading data from a cache and prevent the network trip to the persistent store (and also the query execution). This can be achieved by loading data from a cache. However, you want to load data on demand or lazily. Also, you want the application to control the cache data management – loading, eviction, and retrieval. Forces Improve performance by loading data from cache lazily.Application code controls cache data management.The underlying caching system does not provide read-through, write-through/write-behind strategies (strange really ??).
Solution Use cache aside design pattern to solve the problems outlined above. This is also one of many caching patterns/strategies. I believe it is named in this because aside from managing the data store, application code is responsible for managing the cache also.
Let's now try to understand how this caching technique works and then explore how it solves the problems.
ReadCache MissThe applic…