Home » Java

Java

Composition in Java will be Simplified with New JEP Draft

Favor Composition over Inheritance The mantra “Favor Composition over Inheritance” has, with good reasons, been repeated many times in the literature. However, there is little or no language support in Java to simplify the composition of objects. However, with a new JEP draft named “Concise Method Bodies”, the situation might improve slightly. Brian Goetz is responsible for the JEP draft which likely ...

Read More »

JDK Bug System Time Wasters

Several possibilities of the message’s possible contents crossed my mind when I saw the title of Jesper Wilhelmsson‘s message “Introducing time wasters” on the OpenJDK jdk-dev mailing list. In the second or so between reading that link and having the message appear after clicking on the link, I wondered if the message would be about one of the following topics: ...

Read More »

Micronaut for Java EE/Jakarta EE Developers

java-interview-questions-answers

There is a new microservices framework in town called Micronaut.  In this post, I’ll discuss how I’ve ventured into working with the Micronaut framework from a Java EE/Jakarta EE perspective.  I am a Java EE developer, so developing microservices using solutions such as Eclipse MicroProfile are closer to my line of expertise, but Micronaut caught my attention since it offers ...

Read More »

Ultra-Low Latency Querying with Java Streams and In-JVM-Memory

Fundamental rules of nature, such as the speed of light and general information theory, set significant limits on the maximum performance we can obtain from traditional system architectures. Learn how you, as a Java developer, can improve performance by orders of magnitude using in-JVM-technology and Java Streams. If, for example, the application server and the database server are located 100 ...

Read More »

Java Subtlety with Arrays of Primitives and Variable Arguments

An interesting question was posed in a comment on the DZone-syndicated version of my recent blog post “Arrays.hashCode() Vs. Objects.hash()“. The comment’s author set up examples similar to those used in my blog post and showed different results than I saw. I appreciate the comment author taking the time to post this as it brings up a subtle nuance in ...

Read More »

Java: Streaming a JDBC ResultSet as JSON

This post shows how you can convert a java.sql.ResultSet to JSON and stream it back to the caller. This is useful if you want to send a large dataset from a JDBC DataSource to a web application in JSON format. Streaming allows you to transfer the data, little by little, without having to load it all into the server’s memory. ...

Read More »

ActiveMQ Performance Testing

java-interview-questions-answers

We use ActiveMQ as our messaging layer – sending large volumes of messages with a need for low-latency. Generally it works fine, however in some situations we’ve seen performance problems. After spending too much time testing our infrastructure I think I’ve learned something interesting about ActiveMQ: it can be really quite slow. Although in general messages travel over ActiveMQ without ...

Read More »

JDK 12 News (13 September 2018)

With General Availability of JDK 11 planned for later this month (25 September 2018), it’s a good time to start looking more closely at JDK 12. In a message titled “Proposed schedule for JDK 12” on the OpenJDK jdk-dev mailing list, Mark Reinhold announced, “With JDK 11 nearly out the door, here’s a proposed schedule for JDK 12.” The schedule ...

Read More »