The Java world is evolving at a rapid pace and it can be challenging to keep track of it. Fortunately lots of great resources are created every week, explaining new features or looking at existing stuff from a different angle.
I am using the Java Weekly series to collect the most interesting links I found during the last week and present them to you all in one place. I hope you find it useful and that it makes it easier for you to keep up-to-date. If you like to suggest a resource or something I can improve on, please leave me a comment.
Java
Benjamin Winterberg posted the first part of his Java 8 Concurrency tutorial. In this post, he provides a very detailed explanation of Threads and Executors with lots of code samples.
Upgrading your existing applications to Java 8 is tempting, if you have a look at all the new features and the end of public updates for Java 7. But upgrading large system is not an easy task. The HubSpot did it anyways and it took them nearly 5 month. Jonathan Haber wrote an interesting post about the problems they had to face: Upgrading to Java 8 at Scale.
Java EE
Do you use @Dependent scope for your JBatch artifacts? Mark Struberg explains in his post The right Scope for JBatch Artifacts why you should do that to avoid working with wrong batch properties.
Using native SQL queries or stored procedures with JPA is a great way to use the full power of your database. But working with the List<Object> that you get as a result can be tedious. SQL result set mappings provide an easy solution and map the List into entities and value objects. This first post of an upcoming series shows how to create basic mappings: Result Set Mapping: The Basics.
Microservices
Do you think about using microservice based architecture for your project and wonder how to combine all these services into one application? Don't worry, Arun Gupta got you covered and wrote a great post about microservice design patterns. Read his post to learn more about patterns like aggregator, proxy, branch or asynchronous messaging.
This and that
RebelLabs donates 0.50$ for each completed Java performance survey to a charity that provides support dogs for children with disabilities. You don't have to provide any personal information (you can skip those questions) and only need to answer a few questions about how your team analyzes application performance. So, if you haven't already done that, take a few minutes and fill out the survey. I already did it and it was done quickly.
Jose Cruz started an interesting series about Java ME 8. In this first post, he shows how to use Java ME 8 on a Raspbery Pi to work with sensors for distance measurement, flame and movement detection: Java ME 8 + Raspberry Pi + Sensors = IoT World (Part 1).
I am looking forward to the next part of this series.
Writing good tests is not easy. One of the problems is to describe the method under test and its state in a clear way without creating method names that are way too long. Petri Kainulainen shows in his recent post Writing Clean Tests – Small Is Beautiful how this could be solved with nested classes and the NestRunner for junit.
See you next Monday
for the next issue of Java Weekly. You don't want to wait until then? Follow me on twitter to get updates during the week.
If you like to suggest a link for next weeks issue or something I can improve on, please write me a comment.