Java

Modern Java EE Design Patterns
Article

New Java EE Book - Modern Java EE Design Patterns

Markus Eisele (@myfear)

Today is a very special day for me. I am pleased to announce that my thoughts around Enterprise Java development made it into a report and has been published by O'Reilly. The "Modern Java EE Design Patterns" mini-book is available for download as of today here. I am covering a lot of ground in this, beginning from the overall Enterprise challenges and changes over the last couple of years all the way down to microservices pattern. With plenty of further...

Article Thumbnail
Article

What Lies Beneath: A tour of the dark gritty underbelly of OpenJDK

Andrew Dinn

OpenJDK is the premier open source Java implementation. The OpenJDK project provides the code used to build Red Hat's Java releases for Fedora and RHEL and the Java releases used on most other Linux distributions. It also forms the basis of Oracle's proprietary Java binary releases. The Red Hat OpenJDK team has been working for some time now, along with organizations like the London Java Community (LJC) and some of our academic partners (e.g. Glasgow & Manchester) to encourage researchers...

Article Thumbnail
Article

Type safe SalesForce Queries (SOQL) in Scala

Adam Kovari

This blog shows how to implement a relatively simple type safe DSL for the SalesForce Object Query Language (SOQL). SalesForce doesn’t provide much tooling specifically for the Scala world, which got me to writing some support myself. One of the most common ways to interact with the SalesForce API is using the Enterprise or the Partner WSDL. For the purpose of this article, I will be using the Enterprise WSDL. The main difference is that the Enterprise one is type-safe...

Article Thumbnail
Article

DevNation Talk: Shenandoah: An ultra-low pause time garbage collector for OpenJDK

Christine Flood

Join us at DevNation and learn about Shenandoah. You've tuned your Java application so that you can promise response times of 10ms and then a GC pause happens. You want to scale up your enterprise application but suddenly your GC pauses go from 50ms to 2 minutes. You need a garbage collector that works while your program is running so that you don't hit the GC wall. Current GC technology works really well for managing pause times right up until...

Article Thumbnail
Article

JCache and Infinispan - standardize your application's cache

Romain Pelisse

With the adoption growth of Infinispan, its community has been resurrecting works on the quite old, but stalled, JSR-107, aka JCache. The first step was obviously the released of the JSR 1.0 version, a few month back, and most recently in December with Infinispan 7.0.2.Final is a certified JSR-107 1.0 implementation. It's actually quite useful news, as it allows you to build webapps or even JEE apps using a standard API to access Infinispan. Using JCache API is pretty straightforward...

Java logo
Article

Because Red Hatters are Java Developers, too

Mike Guerette

Because we’re Java Developers, too Red Hat and the JBoss Community have developed many popular, innovative technologies and projects that have shaped Java as we know it. This activity is most notably around Red Hat® JBoss® Middleware, but is also taking place in many related open source projects. In addition, we also make use of Java in a wide range of our other products. This means that, as a Java developer, you'll find plenty to keep you happy with our...

Article Thumbnail
Article

Red Hat Developer Newsletter - September 2014

Mike Guerette

It's that time of the year when (most) everyone is back to school, learning, sharing (including colds—yuck), and tests. And the temperatures are cooler.

Article Thumbnail
Article

Dude, where’s my PaaS memory? Tuning Java’s footprint in OpenShift (Part 2)

Andrew Dinn

Continued from part 1. The test web service The test web service implements a simple file cache storing up to 10 copies of any given named file. Uploading copies beyond the 10th one causes the oldest version to be discarded. The server supports a variety of requests allowing a new version of a file to be uploaded an existing file version to be downloaded listing of the name and version counts of all files in the cache deletion of all...

Article Thumbnail
Article

Dude, where's my PaaS memory? Tuning Java's footprint in OpenShift (Part 1)

Andrew Dinn

Is Java really greedy for memory? Java is often blamed for being an over-hungry consumer of physical memory. Indeed, until recently our OpenShift team were tempted to draw this same conclusion. OpenShift is Red Hat's open source Platform as a Service (PaaS) product. You can access it via public Cloud infrastructure managed by Red Hat (OpenShift Online) or even deploy it to your own data centre/private cloud (OpenShift Enterprise). OpenShift Online provides simple and manageable scalability to anyone developing and...

Article Thumbnail
Article

An ultra-lightweight high-precision logger for OpenJDK

Andrew Haley

I had an interesting question from one of our developers here at Red Hat: "When I was investigating a performance issue in our project after switched to oracle's jdk7u40, I found a performance regression in class sun.net.www.protocl.http.HttpURLConnection.getOutputStream(). This method takes more cpu time than with jdk7u25." And it does, much more time. In fact, when fixedLengthStreamingMode is enabled HttpURLConnection.getOutputStream() takes ten times as long: about 1.2 milliseconds versus 47 microseconds. So, I traced through getOutputStream() deep into the class library...

Article Thumbnail
Article

DevNation Speaker: Interview with Mark Little

Mike Guerette

I had a chance to catch-up with Mark Little, VP of Engineering at Red Hat, to discuss his DevNation involvement and I could feel his enthusiasm through the phone line. Here's what Mark shared about DevNation (and even a bit about Red Hat Summit). What sessions are you giving at DevNation? The first session is the Developer Keynote on Monday (4:00-5:00 in Hall A) with Craig Muzilla, SVP of Red Hat. Previously called the Middleware Keynote, this typically kicks off...

Article Thumbnail
Article

OpenJDK on AArch64: We have a release

Andrew Haley

We at the AArch64 Port Project are pleased to announce the first release of OpenJDK on the Linux/AArch64 platform. It is the first implementation of the Java platform to be made available for this processor architecture. For those who haven't heard: AArch64 is the latest architecture from ARM. It is an entirely new instruction set, not compatible with the earlier generation of 32-bit ARM processors, so we need a new OpenJDK port for it. This is a complete port, with...

Article Thumbnail
Article

Repost: JBoss User Group (JBUG) Chicago – August 6

Mike Guerette

Here's a great opportunity for those of you in the Chicago area: JBoss User Group (JBUG) Chicago – Workshops with JBoss Evangelists. Visit Andrew, Eric and Kenny: The following Evangelists will be in attendance to help you along with the workshops and any questions you might have around JBoss technologies: Andrew Rubinger is Red Hat’s JBoss Developer Advocate and Program Manager. Advocate for and speaker on open, testable enterprise Java development, author of O’Reilly Media’s “Enterprise Java Beans 3.1” and...

Article Thumbnail
Article

Using RHQ (JON) to monitor Java apps

Romain Pelisse

While there is not yet a RHQ plugin for Glassfish, it is already possible to monitor an instance of Glassfish (GF), using the existing JMX Server resource template. Let's see how this unfolds... Set up Foreword: While not difficult, setting this up on a laptop requires running a LOT of Java processes, on top of a database. As the latter needs to be a somewhat older version of PostgreSQL (8.4), you might even end up running it on VM using...

Article Thumbnail
Article

Our Top 12 Blog Articles of 2013

Mike Guerette

One thing I love about this blog site is the variety of developer-related topics - all created by the experts themselves! So, in case you missed any, here are the top 12 blog posting for 2013: 1. Setting up Django and Python 2.7 on Red Hat Enterprise 6 the easy way - This was the most popular article, by our developer evangelist, Langdon White. Great job, dude! 2. Released! Red Hat Software Collections now GA! - And here's the beta...

Article Thumbnail
Article

XML editing with Bash script

Romain Pelisse

Photo by seeweb Countless products uses XML files, whether it is for data persistence, serialization or mere configuration. This is even more true when it comes to the Red Hat middleware portfolio, the JBoss projects having always been keen on using this format for configuration files - on top of the ones specified by JEE such as the famous (or infamous ?) web.xml. While the XML format has some definitive qualities, it is not the easiest format to parse, and...

Article Thumbnail
Article

Performance Regression Analysis with Performance Co-Pilot [video]

Nathan Scott

In an earlier post we looked into using the Performance Co-Pilot toolkit to explore performance characteristics of complex systems. While surprisingly rewarding, and often unexpectedly insightful, this kind of analysis can be rightly criticized for being "hit and miss". When a system has many thousands of metric values it is not feasible to manually explore the entire metric search space in a short amount of time. Or the problem may be less obvious than the example shown - perhaps we...

Article Thumbnail
Article

Exploratory Performance Analysis with Performance Co-Pilot [video]

Nathan Scott

Investigating performance in a complex system is a fascinating undertaking. When that system spans multiple, closely-cooperating machines and has open-ended input sources (shared storage, or faces the Internet, etc) then the degree of difficulty of such investigations ratchets up quickly. There are often many confounding factors, with many things going on all at the same time. The observable behaviour of the system as a whole can be frequently changing even while at a micro level things may appear the same...

Article Thumbnail
Article

OpenJDK, AArch64, and Fedora

Andrew Haley

For the really impatient reader: OpenJDK for AArch64 on Fedora is now available. Skip to the end of this blog for information about how you can get it. For everyone else: This is the first of my AArch64 OpenJDK blogs. I’m the project lead of the AArch64 OpenJDK port, and I’ll be blogging here from time to time. There may not be many people reading this blog who don’t know what AArch64 is, but it’s the new 64-bit version of...

Article Thumbnail
Article

Changing objects in flight, without a Debugger

Rick Wagner

How to change data in-flight, without a Debugger Do you ever wish you could change the behavior of some object in the middle of a bunch of method calls? I sometimes do. Maybe you want to set some properties on an object to replicate a fault. Maybe you’d like to force a specific return value from a method for some reason. These are both very possible, without altering the source code for your application. I like to do this through...

Article Thumbnail
Article

From upstream OpenJDK to RPMs on your machine

Deepak Bhole

Over the past few years, I have been asked on and off as to what the process is for the RPMs that get into Red Hat Enterprise Linux and Fedora repositories. Over those years, the answer has evolved as we attempt to better the process. As it stands right now, there is a difference between how OpenJDK6, OpenJDK7 and OpenJDK8 (preview in Fedora 19) end up into RPMs. This post will shed some light into what those processes are. OpenJDK6...