Subscribe: Javalobby - The heart of the Java developer community
Added By: Feedage Forager Feedage Grade A rated
Language: English
announced spring  application  applications  boot  cloud  java  microservices  new  nice  release  spring boot  spring cloud  spring  web 
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


Handling ‘State’ in Java WebSocket Applications

Sat, 29 Apr 2017 05:01:00 GMT

By and large, there are two kinds of states in a WebSocket application

  • User/client specific: related to a connected user/Session e.g. user ID, list of subscriptions, last message received, etc.
  • Global: state which is relevant across your application and something which all connected users/Sessions might be able to use.

User Specific State

This can be handled using getUserProperties method on the Session object – this exposes a Map, which you can use to store anything (Object type) using a String type key:

An Introduction to Functors

Fri, 28 Apr 2017 20:01:00 GMT

In a previous article, we talked about Semigroups and Monoids, which are abstractions that let us combine values of the same type together. In this post, we’ll take a look at Functors, which allow us to operate on values inside containers without having to know any of the implementation details of the containers themselves.

Note: This article is based on an Axosoft Dev Talk titled Practical Category Theory: Functors. Watch that video or keep reading!

allowfullscreen="" frameborder="0" height="400" src="" width="600">

Infinispan’s Java 8 Streams Capabilities

Fri, 28 Apr 2017 16:01:00 GMT

Let’s be honest: It’s pretty exciting that Infinispan now supports Java 8 for many reasons, but perhaps one of the most anticipated reasons is because of the new stream classes. The main reason for this is the fact that it completely transforms the way we process data. Instead of having to iterate upon the data yourself, the underlying stream does this for you, and all you have to do is provide the operations to perform on it. This is perfect for distributed processing because the implementation handles the iteration entirely.

However, another important reason why these kinds of advancements are so important is they make development accessible to younger generations. By creating easier methods, we are actually opening up opportunities for young people to get involved in the tech sector, and creating career paths for people who have earned an information technology degree that feel as though this work may be too hard for them.

What Devs Should Keep in Mind About Java

Fri, 28 Apr 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 do developers need to keep in mind when working with Java?" Here's what they told us:

Advanced Git Log

Fri, 28 Apr 2017 07:01:00 GMT

The purpose of any version control system is to record changes to your code. This gives you the power to go back into your project history to see who contributed what, figure out where bugs were introduced, and revert problematic changes. But, having all of this history available is useless if you don’t know how to navigate it. That’s where the git log command comes in.

By now, you should already know the basic git log command for displaying commits. But, you can alter this output by passing many different parameters to git log.

Method Length and Extract 'Til You Drop

Fri, 28 Apr 2017 04:01:00 GMT

As a typical nerd (and a DZone Zone Leader), I tend to read a lot of blog posts and comments about programming. One thing that keeps amazing me is how long people’s functions tend to be and how many people are convinced this is the right way to code. In reality, a readable function should rarely exceed five lines of code.

Take a short look at this function:

Using the Timer Class to Schedule Tasks

Thu, 27 Apr 2017 20:01:00 GMT

Scheduling tasks to run is a need that sometimes arises in a Java program. Maybe you want to run a periodic cleanup of some resource, or check on the status of some job, or maybe fetch a URL which might not be available the first time.

The Timer class provides a very simple implementation of such a scheduler. Let us learn how to use it.

Inject Kubernetes ConfigMap Values With Java EE and WildFly

Thu, 27 Apr 2017 16:01:00 GMT

The Kubernetes ConfigMap concept is used to configure applications from an orchestration environment. The configured values can be made accessible within the Java EE container.

Kubernetes can inject configured values to the running POD, e.g. as properties files. By defining custom modules in WildFly, these files — which are not shipped with the deployment artifact — can be made accessible from the classpath.

Programmatic Registration of Java Configuration Beans

Thu, 27 Apr 2017 10:01:00 GMT

I have been working on refactoring the Spring Security Calendar application from an XML configuration to a Java configuration.

In the migration, the is a file that is using UserDetailsManager, which extends UserDetailsService:

First Look at HTTP/2 Server Push in Java Servlet 4.0 Specification

Thu, 27 Apr 2017 07:01:00 GMT

Servlet is one of the most important specifications in the Java EE ecosystem. It is used on millions of applications and hundreds of web frameworks. Because the Java Servlet specification is highly tied to the HTTP protocol, it is updated following HTTP protocol changes.

HTTP 2 comes after the widely used HTTP 1.1 protocol, and its new features bring much better performance to the web. For example, the HTTP/2 Server Push feature gives a way to push web resources from server to client. In that way, server applications are able to send content(s) at the beginning of the initial requests, instead of waiting for clients' requests. It brings an efficient way to transfer resources in HTTP 2-enabled web applications.

Toss Out the Inheritance Forest

Thu, 27 Apr 2017 04:01:00 GMT

While doing code review, I have seen many times that there is a potential danger of creating a lot of inherited classes, and a simple change in business requirements would make it unmanageable. So, surely, this is a serious code smell, and we have to take action.

Business Case

If two criteria are interlinked, the outcome product can be any combination of those two criteria. To put it simply, say the requirement is, "We have to create a ball, and the ball can be made of any material and be of any color."

Thoughts on Vaadin: The Value of Data Binding

Wed, 26 Apr 2017 20:01:00 GMT

I had the pleasure of talking with Roland Krüger, a software engineer who works at a consulting company (Orientation in Objects) in Mannheim, Germany. His job includes working in Java-related customer projects, consulting (sometimes Vaadin-related), and trainings in different technical areas. 

Hello, Roland! Thanks for accepting the invitation. So, how long have you been using Vaadin?

This Week in Spring: Metrics, Caching, and MVC

Wed, 26 Apr 2017 16:01:00 GMT

Welcome to another installment of This Week in Spring! This week I’m in beautiful Bangalore, India, at the 10th edition of the great, Great Indian Developer Summit! Then, I’m off to Perth, Australia, for YOW! West. If you’re around, say hi! We’ve got a lot to cover, so let’s get to it! Spring REST Docs lead Andy Wilkinson just announced Spring REST Docs 1.2.0! This new release includes smarter Asciidoctor integration, support for request-and-response snippets, and better support for large and complex payloads. At the same time, Andy also released Spring REST Docs 1.1.3, a maintenance release. Catch a replay of Spring WebFlux ninja Sebastien Deleuze’s epic Reactive Spring talk on ZTLive. Spring Boot ninja Stéphane Nicoll just announced Spring Boot 1.5.3, a maintenance release, packed with lots of fixes and improvements. He also announced Spring Boot 1.4.6. Spring Cloud Data Flow lead and co-founder Dr. Mark Pollack just announced Spring Cloud Data Flow 1.2.RC1. This release is jam-packed with new features including support for composed tasks, real-time metrics and monitoring, OAuth improvements, a new (deliciously named) release of Spring Cloud Stream app starters Bacon.RELEASE, and a new release of Spring Cloud Task App Starters Belmont.RC1. Get the bits while you can! Kick the tires and feedback! Spring Cloud Pipelines lead and continuous delivery guru Marcin Grzejszczak just announced Spring Cloud Pipelines 1.0.0.M4. Spring Cloud Pipelines is a ready-made continuous delivery pipeline that you can use in Jenkins or Pivotal’s Concourse. Not one to rest on his laurels, Stéphane Nicoll also announced Spring Framework 4.3.8. The Baeldung blog has a nice post on using the Spring AMAQP project’s service invoker support. Spring Cloud Zipkin lead and OpenZipkin project contributor Adrian Cole put together a very nice talk on observability with logging, metrics, and tracing. This connector makes it easy to connect RabbitMQ to Apache Kafka — looks interesting! Spring Cloud Contract lead Marcin Grzejszczak (remember him? He’s the lead of Spring Cloud Pipelines, too!) did a nice interview on InfoQ. Bozho did a nice blog looking at use-cases for Spring MVC in a Spring Boot application. The Microsoft Azure service broker for Cloud Foundry is very interesting for a number of reasons: It lets you use Microsoft Azure backing services from Cloud Foundry (right on!) and it’s written in Spring Boot, so it serves as a very nice template. Want to learn what’s happening in the Cloud Foundry ecosystem? I love this roundup from January to March 2017. The Auth0 blog has a nice post on using JWTs with Spring Boot. Pierre Besson put together a very convenient JHipster generator that generates a custom Spring Boot banner.txt Gerrit Meier put together a very cool look at using Spring WebFlux with the Thymleaf templating technology. Subham Aggarwal put togeter a nice post on caching with Spring. [...]

Java 8: Methods in Interfaces

Wed, 26 Apr 2017 13:01:00 GMT

My previous post on streams demonstrates how useful this feature is to Java 8. However, it created a problem for the API designers. The problem was how to we extend the existing Collection’s API without breaking existing Collections implementations (Guava, Apache, etc.).

The solution was to allow methods in interfaces, meaning that any implementations already carry an implementation of the extension.

Creating a CD Pipeline With Jenkins and Java

Wed, 26 Apr 2017 10:01:00 GMT

Lately, I’ve been working a lot with Jenkins for continuous deployment of one of my applications. In case you haven’t seen it, the keynote demonstration given at Couchbase Connect 2016 used Jenkins to build and redeploy the Java backend and Angular frontend every time a change was detected on GitHub. This is the application I helped build.

So how did I leverage Jenkins to make this possible? We’re going to see how to create a continuous deployment pipeline for a Java application which includes building and deploying to a server.

Java-Based Microservices Architecture and Abixen

Wed, 26 Apr 2017 07:01:00 GMT

Microservices are getting constantly more and more popular. Every month, there are more libraries and solutions supporting a development process, testing, and further support. Many Java developers have heard about the microservices approach, but a significant number of companies have not taken the challenge of implementing a microservices-based architecture. Does this sound familiar?

"I know, microservices are awesome, microservices bring easier maintenance and further development, but we have no resources to build a good microservices-based architecture."

Web MVC With Spring and Business Objects

Wed, 26 Apr 2017 04:01:00 GMT

In my previous posts, we explored the MVC Pattern Language by Trygve Reenskaug and made an attempt to implement MVC in the console, while focusing on MVC’s overarching idea – supporting users’ mental models. In this post, we’ll take a quick look on how to move the (poor) console example to the web.

A Short Reminder

For those of you who haven’t read the previous post or don’t (want to) remember, we were creating a simple “Pet Clinic” application. We visited an old vet lady who does not own a computer to gather requirements and get a basic idea of what her work is about. For the most part, she’s using two interesting items at work: a visit calendar and pet files. These are perfect candidates to become business objects in our system. Since the lady is so used to them in the physical world, we assume she’ll have no problems using their computerized versions. So far, we created a console representation of the visit calendar. Now, we want to move it to the web so that it’s usable for non-nerd human beings.

Guide to Separate JRE Versions From NetBeans Platform Installer

Tue, 25 Apr 2017 20:01:00 GMT

In an enterprise set up where updating Java on a client machine is not allowed due to software restriction policy, it becomes challenging to develop and ship applications which require the latest version of Java to be installed on client machines. One way to circumvent this policy-based restriction is to bundle the JREs for 32-bit and 64-bit Windows OS in a separate NetBeans platform installer. This ensures that the JRE remains isolated from the system and conflict with any older version of Java is avoided. This method is detailed in an excellent article written by  Ernest Lotter.

However, the bundling of JRE with the application forces you to maintain separate copies of the installer for 32-bit and 64-bit versions of Java. It also ties the application with the version of Java which was available at that point in time. In a scenario where development and improvement is a continuous process, one would love to have the flexibility of using the latest Java features in the application being developed and at the same time be able to deliver the latest version of Java to client machines.

Java 9 (Part 3): Super Interfaces, First Look!

Tue, 25 Apr 2017 14:09:55 GMT

In Scala, traits can have an implementation, so why not have implementations in Java? Well, that was introduced in Java 8, so the next natural step in Java 9 is to have private logic in interfaces. In Part 2 of this series, we introduced the Java 9 REPL. In this part, we are going to examine the new functionality introduced to interfaces.

Java 9 is introducing a lot of new concepts, such as REPL, factory methods for common data structures, and more. Let’s see what Java 9 has to say about private methods in interfaces.

Arbitrary Precision Numbers

Tue, 25 Apr 2017 14:08:42 GMT

I am working on a system that involves money handling, written in Java. And as you can imagine, one of the challenges is to make sure that money is not appearing or disappearing because of the floating point arithmetic. I asked a few developers how to handle money and one common answer was to use BigDecimal for that. Therefore, I performed a few experiments on the side and discovered few things that you probably won't see after the first look into this class. In this article, I am going to show these discoveries together with the final solution I decided to go with.

Rounding Errors

Before going into the detailed explanation, let's create an example that shows what happens with floating point numbers. Imagine you want to split $200 between four people. First, two of them will get 1/3 and the other two will get 1/6. Then let's see what happens when you put these parts back together. The following code demonstrates the situation (using Lenovo Yoga, Win 8.1, Java 1.8).