Subscribe: Javalobby - The heart of the Java developer community
Added By: Feedage Forager Feedage Grade B rated
Language: English
build  clojure  cloud  code coverage  code  docker  events  features  java  language  new  part  spring cloud  spring data  spring 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Javalobby - The heart of the Java developer community

DZone Java Zone

Recent posts in Java on


Java 9 (Part 4): Trying Try-with-Resources: First Look

Sat, 27 May 2017 16:43:52 GMT

This is part 4 of the java 9 series. While in part 3 we covered interfaces and the private methods that were added to them, in part 4 we see that try-with-resoures was enhanced, or we might say even fixed. Try-with-resources, which was introduced back in java 7, is a concept which helps developer close resources which are not using anymore, such as database connectionfile streams, etc. Let’s see how try-with-resources behaved in java 7 and now in java 9.

Step 1: Pre-Java 7 Try-with-Resources

Try-with-Resources, prior to Java 9, meant that instead of just calling a piece of code which opens up a resource like:

JPA Auditing: Automatically Persisting Audit Logs Using EntityListeners

Sat, 27 May 2017 09:01:02 GMT

In my previous article, Spring Data JPA Auditing: Saving CreatedBy, CreatedDate, LastModifiedBy, LastModifiedDate automatically, I discussed why auditing is important for any business application and how we can use Spring Data JPA automate it.

I also discussed how Spring Data uses JPA's EntityListeners and callback methods to automatically update the CreatedBy, CreatedDate, LastModifiedBy, and LastModifiedDate properties.

This Week in Java Careers: Which Companies Are Hiring?

Sat, 27 May 2017 04:01:00 GMT

DZone Jobs launched earlier this month, and there are already some excellent opportunities for Java developers who are looking for their next career move. New jobs are being added daily, so we've started a weekly roundup to highlight these new positions. We encourage you to check these jobs out, as you may just find the perfect next career step. 

Site Reliability Engineer - Founding Team Member
Splice Machine
Location: San Francisco, CA
Experience: Demonstrated ability to write programs using a high-level programming language like: Java, Python, Ruby, Go or C++

Vaadin With Scala

Fri, 26 May 2017 21:08:26 GMT

This post shows a fully working 'Hello World' application in Vaadin 8 with Scala 2.12 running on Jetty.

Following my frustrated attempt to Dockerize an Ionic application as the Web UI of my petty Akka project, I started evaluating the latest version of Vaadin.

Multi-Stage Docker Image Build for Java Apps

Fri, 26 May 2017 20:01:00 GMT

A few days back, I discovered a new Docker feature — multi-stage builds. The multi-stage build feature helps you create thin Docker images by making it possible to divide the image building process into multiple stages. Artifacts produced in one stage can be reused by another stage. This is very beneficial for languages like Java as multiple steps are required to build the Docker image. The main advantage of the multi-stage build feature is that it can help you create smaller size images. This feature is not yet available in stable versions of Docker. It will become available in Docker 17.05. To use this feature, you have to use the edge version of Docker CE.

To build a Docker image for a Java application, you first need to build the Java project. Java build process needs a JDK and a build tool like Maven, Gradle, or Ant. Once a Java binary artifact is produced, you can package the binary in a Docker image. For running a Java binary, you only need JRE, so you don’t have to pay the cost of bundling the whole JDK.

What's New in CUBA Platform 6.5?

Fri, 26 May 2017 16:01:01 GMT

As you already might have noticed we have published the new release of the CUBA platform and Studio. The new version mostly introduces enhancements of the existing functionality, however, there are a few useful features have been included in 6.5.

This article covers the major enhancements of Platform and Studio. The full list of changes is available in the corresponding release notes:

The Future Of Java

Fri, 26 May 2017 10:01:00 GMT

To gather insights on the state of the Java ecosystem today, we spoke to nine executives who are familiar with the ecosystem.

We asked these experienced Java professionals, "What’s the future of Java from your perspective?" Here's what they told us:

Java Profilers: 3 Different Types and Why You Need All of Them

Fri, 26 May 2017 07:01:00 GMT

Debugging performance issues in production can be a pain and in some cases impossible without the right tools. Java profilers have been around forever, but the profilers most developers think about are only one type.

Let’s dive into the three different kinds of Java profilers:

10 Nice Examples of Writing SQL in Kotlin With jOOQ

Fri, 26 May 2017 04:01:01 GMT

Kotlin is the next big thing. With Google announcing official support for Kotlin on Android, we’ll see a lot more traction for this lovely language.

We’ve already blogged about the Kotlin language recently: 10 Features I Wish Java Would Steal From the Kotlin Language.

Java SE 9: What's New?

Thu, 25 May 2017 20:01:00 GMT

Below, I have provided some of the most important core language enhancements for JDK 9.0.The objective of this article is to introduce you to the new features of Java SE 9. This includes mostly conceptual introduction of the features. These are the almost finalized features, that have been accepted and officially announced by Oracle. Java 9 is scheduled for release by about the end of July 2017.


Atlassian Clover Is Now Open Source

Thu, 25 May 2017 16:01:00 GMT

Our company mission – to unleash the potential in every team – shapes the products we create today. A big part of this is delivering new features and improvements through continual updates and releases.

For many years, Atlassian Clover has provided Java and Groovy developers a reliable source for code coverage analysis. This dependability has allowed us to focus our development efforts on delivering new features and improvements to our core offerings, including JIRA Software, Bitbucket, and others.

An Overview of CDI Events

Thu, 25 May 2017 10:01:00 GMT

Java Enterprise Edition has many features that really stand out. One of the best is the event mechanism, which is part of the Contexts & Dependency Injection for Java specification. Events have been present in Java EE for a long time. The design of the events mechanism is extremely clean, and learning how to use events is therefore very simple. This overview is aimed at developers who are not familiar with the event mechanism and want to get to know the basics. Advanced features of CDI 2.0, like Asynchronous events, are not covered. You will learn to:

  • Fire specific events.
  • Use event qualifier.
  • Observe events fired during transactions.
  • Configure even observer bean instantiation.

At the end of this article, you will find instructions for a quick-to-run sample application available on GitHub, demonstrating capabilities of CDI events.

This Week in Spring: Manifest Editing, Boot 2.0M1, and Kotlin

Thu, 25 May 2017 10:01:00 GMT

Welcome to another installment of This Week in Spring! This week I’m in Amsterdam, NL and Essen, DE, talking to customers about cloud-native transformation. We’ve got a lot to cover so let’s get to it. Spring Tool Suite lead Martin Lippert just announced a preview of Concourse Pipeline and Cloud Foundry manifest editing support releases as a language server. These language servers can be used by any IDE or text editor that supports them, including in this case Microsoft’s Visual Studio Code and later STS itself. Spring Cloud Stream ninja Soby Chako just announced Spring Cloud Stream.SR2 Simon Baslé just announced the Reactor Bismuth release train M1 Stéphane Nicoll just announced Spring Boot 2.0M1! It’s finally here! Get the bits of the first major release towards a reactive Spring Boot 2.0. There’s so much good stuff, including an updated Gradle plugin, relaxed binding improvements, major dependency upgrades and so much more! I think this article by Paweł Chudzik on poor man’s batch solutions — iterating over large datasets — was very interesting. The conclusion is obvious: if you want to scroll through a large number of records then use a java.util.Stream finder query in your Spring Data repository. That’s one obvious conclusion. May I also humbly recommend that you look at Spring Batch and have a rich man’s batch at poor man’s prices? Want easier handling form encoded JSON in Spring MVC? Vote for this issue! I liked this walkthrough on how to implement a forgotten password flow with Spring Boot on the Code by Amir blog by Amir Boroumand. Amir Boroumand also has a nice walkthrough on creating a REST API with Spring Boot Our friends at JDriven are doing what appears to be an awesome (though I think Dutch-language) on MQTT and Spring Cloud Stream and Spring Cloud Data Flow. I liked this fairly approachable look at how to deploy Hashicorp Vault to Cloud Foundry by our very own Toshiaki Maki. Want a bit of insight into what the future of Serverless looks for Spring? Check out the slides to the good Dr. Dave Syer’s presentation on Spring Cloud Function at Spring IO. WeaveWorks’ Scope is now available and supports Cloud Foundry. I liked this rant from Steve Yegge on why Kotlin is a nice language. Interesting reading! [...]

Notes on Debugging Clojure Code

Thu, 25 May 2017 07:01:00 GMT

Clojure is a great programming language, but a recurring complaint I keep hearing from developers hacking on Clojure code is that debugging can be unpleasant. First of all, I agree! Debugging Clojure code can be more daunting on average than, say, debugging Python code. This is mainly due to two reasons:

  1. Clojure's Java legacy. Clojure is compiled to Java bytecode, which has some terminology and idiosyncracies Clojure programmers aren't always familiar with. These terms tend to pop up in stack traces and cause confusion (e.g. IFN).
  2. Clojure — being a Lisp — has a certain code structure which is different from, say, a more common imperative coding style. Rather than being a sequence of statements, Clojure programs tend to involve long call chains of nested expressions. Where only part of an expression fails, it's often non-trivial to figure out why.

In this post, I want to share some notes from my own experience debugging Clojure programs.

The Strange Relationship Between Duplication and Coupling

Thu, 25 May 2017 04:01:00 GMT

This short post hopefully contains no new knowledge for you. Its mere intention is to make you contemplate an interesting relationship between coupling and duplication for a while.

Duplication Is Bad!

As professional programmers, true software craftsmen, the clean coders, [insert your title here], we’re often taught that duplication is bad and should be avoided at all cost. We even have (at least) two widely known principles related to this problem, namely, "Don’t Repeat Yourself" and "Once And Only Once."

Spring Data JPA Auditing: Automatically Saving the Good Stuff

Wed, 24 May 2017 20:01:00 GMT

In any business application, auditing simply means tracking and logging every change we do in our persisted records, which simply means tracking every insert, update, and delete operation and storing it.

Auditing helps us in maintaining history records, which can later help us in tracking user activities. If implemented properly, auditing can also provide us similar functionality to version control systems.

An Introduction to Code Coverage

Wed, 24 May 2017 07:01:00 GMT

Code coverage is a metric that can help you understand how much of your source is tested. It's a very useful metric that can help you assess the quality of your test suite, and we will see here how you can get started with your projects. 

How Is Code Coverage Calculated?

Code coverage tools will use one or more criteria to determine how your code was exercised or not during the execution of your test suite. The common metrics that you might see mentioned in your coverage reports include:

Creating a Groovy DSL for Structurizr

Wed, 24 May 2017 04:01:00 GMT

In the previous post, we took a quick look into generating documentation with Structurizr. I really enjoyed playing with the tool, but I wasn’t aesthetically pleased with the code necessary to create a simple diagram. Well, seems like a perfect chance to introduce you to creating Groovy DSLs and produce something useful at the same time.

What Are We Going to Do?

We’re going to start from the very end so that you know what we’re aiming for and better understand the things that I’m going to explain. One of the code samples in the previous post looked like this:

Guice Stories ( Part 2)

Tue, 23 May 2017 16:01:28 GMT

For those of you who missed out, Part 1 of our Guice Stories series focused on Bootique and Guice's importance to it, especially for dependency injection. Let's continue on the journey with more Google Guice stories.

Story 3: Filling Maps and Collections

Previously, we saw the examples of adding objects to MapBinder. Let's dwell on this for a moment. Here, I will use Multibinder for a change (remember, it produces an injectable Set), but the discussion applies to MapBinder just as well. What can we put in these DI-managed collections? If the objects in the Set are trivial to create and do not rely on any dependencies, we can add them as instances:

Java Creator James Gosling Joins AWS

Tue, 23 May 2017 14:08:18 GMT

Around mid-day on Monday, May 22, James Gosling made a public announcement over Facebook that he has joined the team at Amazon Web Services (AWS):

"It's time for a change. I'm leaving Boeing Defense (nee Liquid Robotics), with many fond memories. Today I start a new Adventure at Amazon Web Services."

James Gosling, most known as the creator of the Java programming language, leaves his position as Chief Software Architect at Liquid Robotics, where he had worked since late 2011. Liquid Robotics was acquired by the Boeing company in late 2016.