The week in Java

Java Weekly 42/15: MVC, Swarm and Docker, Code reviews

Thorben Janssen
News image via Shutterstock

Thorben Janssen once again brings us the latest Java news including building and deploying microservices with Java EE, some conference preparation tips and Trisha Gee’s latest article in her Code Review series. Check out the week’s hottest Java links.

This post originally appeared on Thorben Janssen’s Java EE blog, where Java news is published weekly:

OptimisticLockExceptions can be difficult to handle in a Java EE environment, because they might be thrown during the commit phase, after your business code was executed. As Adam Bien shows in his recent blog post, the JAX-RS specification provides a handy way to map these exception to a useful response: Mapping JPA OptimisticLockException into HTTP status code.

JPA offers a lot of great features to implement CRUD operations in a very efficient and easy way. But if the queries get really complex or you prefer a more SQL-like approach, JPQL and the Criteria API are not a good choice. You could either use native queries or external libraries like jOOQ. A recent post on the jOOQ blog shows how easily you can use jOOQ within an application server and combine it with Java EE specifications like CDI and EJB: A Beginner’s Guide to Using Java EE with jOOQ.

Java EE 8

Michael Scharhag published the second post of his series about the new MVC specification in Java EE 8. This time, he has detailed look at the MVC Controller: Java EE 8 MVC: A detailed look at Controllers.

If you’re monitoring the progress of Java EE 8, you should have a look at the new EDR1 release of the Java EE 8 platform specification: Java EE Platform Specification.


Do you wonder if and how you can build and deploy microservices with Java EE?

Then you should have a look at Markus Eisele’s recent blog post in which he shows how to create a Wildfly Swarm fat jar out of your Java EE application that is then dockerised and run locally.

While this is a good start to get some experience with the setup, the most important thing is missing. How do we get our application to production? Markus covered this in the follow-up post in which he deploys the microservice on OpenShift.

This and that

Christian Grobmeier wrote an interesting post about preparing a conference talk. While my approach so far was a little bit different, I found quite some useful tips in it. You should have a look at it if you’re prepare for an upcoming talk or if you think you’re not able to talk at a conference at all: Everybody can talk.

Trisha Gee posted a new article in her code review series. This time she gives a lot of tricks to identify security issues during code review: What to look for in a Code Review: Security.

And if you like this post, make sure to have a look at the other posts of her series: What to look for in a Code Review. They are definitely worth your time.

Upcoming Events

Richard Warburton and Raoul-Gabriel Urma will give their Generics: Past, Present and Future talk at the vJUG on Friday, October 16th at 4pm UTC.

Thorben Janssen
Thorben is a senior developer and regular Java blogger with more than 10 years of experience in Java EE development and architecture. During these years he has acted as developer, architect, project and technical lead to create high available, clustered mobile billing solutions and laboratory information management systems.

Leave a Reply

Be the First to Comment!

Notify of