Java

Article Thumbnail
Article

Persistent Custom MDC Logging in Apache Camel

Mary Cochran

Logging is an ubiquitous need in any production quality application, and one common scenario is to log the active (logged in) username, or to log the user and order IDs for customer order event details. This is typically done to create an audit trail so that issues can be more easily traced should something go wrong, but there are any number of reasons why you might decide to create a custom log. Mapped Diagnostic Contexts (MDCs) in Apache Camel are...

Article Thumbnail
Article

"Don't cross the streams": Thread safety and memory accesses at the speed of light

William Cohen

The classic 1984 movie Ghostbusters offered an important safety tip for all of us: " Don't cross the streams. " - "Why not?" - "I t would be bad. " - " I’m fuzzy on the whole good/bad thing. What do you mean, 'bad'? " - "Try to imagine all life as you know it stopping instantaneously and every molecule in your body exploding at the speed of light." - "Right. That’s bad. Okay. All right. Important safety tip. Thanks..."...

Should I learn OSGi? What's the point?
Article

Should I learn OSGi? What's the point?

Mary Cochran

Recently, I have been hearing a lot of debate around whether it is worth someone's time to learn OSGi. Doing a simple Google search on "OSGi usability" returns results filled with phrases such as "not easy to use", "unproductive", "developer burden", and "going away". However, you will also find that it solves a lot of common issues in the JVM, particularly issues around class loading. So is learning OSGi worth your time? What is OSGi? OSGi is meant to solve...

Article Thumbnail
Article

Origins of .NET on Linux: An explanation for Java Developers

Lincoln Baxter III

The .NET framework is a relatively young technology when compared to the rest of computer science history, but as it turns fourteen this year, we can look back and see a long-standing record of innovation, developer productivity, and more recently a refreshing open-source mentality from Microsoft that has resulted in the first ever release of (the official) .NET framework in a Linux distribution. .NET is a development platform that includes several programming languages, notably C# and Visual Basic, and the...

RedHat Shadowman Logo
Article

Red Hat sessions at DevNexus 2016 (Atlanta)

Mike Guerette

Here are Red Hat's Session and speakers at DevNexus 2016 in Atlanta this week. Join us at these sessions plus stop by our booth for some good swag! MONDAY, FEBRUARY 15 Docker for Java EE Developers (ALL DAY WORKSHOP) Abstract: Containers are enabling developers to package their applications in new ways that are portable and work consistently everywhere: on your machine, in production, in your data center, and in the cloud. And Docker has become the de facto standard for...

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...

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...

DevNation logo
Article

DevNation 2014 - Stan Lewis - hawtio: The Extensible Console for Managing Your Java Stuff

Mike Guerette

Learn about hawtio via this video-recorded DevNation session. Abstract: hawtio is a fantastic console to manage Apache Camel, Apache ActiveMQ, and various other Java technologies running in the JVM. It's packaged as a simple war file that can be easily deployed in many different application servers. But are there ways it can be customized? How can someone add functionality without necessarily building it in the project? In this session, you'll get an overview of the available plug-ins that come ready...

DevNation logo
Article

DevNation 2014 - Jason Greene - JVM Finalize Pitfalls: How to Avoid the Danger

Mike Guerette

Abstract: Properly freeing external resources such as files and connections in a garbage collected environment requires care. The JVM's finalize() and PhantomReference features provide APIs and JVM targetted languages a way to handle the common case of a forgotten close. Unfortunately these capabilities are deeply flawed, and require specialized techniques to use correctly. This session will dive deeply into the problem, showing how the JVM can get it wrong. It will offer useful tips on how developers can safely manage...

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...

JavaOne logo
Article

Find Red Hatters at JavaOne 2014

Mike Guerette

Here's the list of Red Hatters speaking at JavaOne 2014 next week. Please attend and tell them I said it was ok to ask them tough questions. ;) Arun Gupta ( Bio ) Devoxx4Kids for Parents Java EE 7 Soup to Nuts Lessons Learned from Real-World Deployments of Java EE 7 Technology Evangelists Gathering Charles Nutter ( Bio ) Going Native: Bringing FFI to the JVM The Emerging Languages Bowl: The Big League Challenge George Gastaldi ( Bio ) Tools...

DevNation logo
Article

DevNation 2014 - Louis Zuckerman - GlusterFS & Java

Mike Guerette

ABSTRACT: Recent developments in Java and Gluster have given us a new way to connect these two technologies: Java 7 paved the way for file system provider plug-ins, while GlusterFS 3.4 provides a new client software interface. This session introduces glusterfs-java-filesystem, a new open source project that connects applications running on the Java platform to GlusterFS storage. Join Louis Zuckerman, founder of the glusterfs-java-filesystem project, for a deep dive into: What it means to access GlusterFS directly from Java, and...

Memory leaks flow chart
Article

How to find and fix memory leaks in your Java application

Leo Ufimtsev

Do you have a Java application that runs fine at first but slows down after a while, or it runs fine for a small number of files but performance degrades for large number of files? Maybe you have a memory leak. About When fixing memory leaks; If someone were to ask me: "If you knew back then what you know now, what would you tell yourself?". Well, I would say..... Target Audience While in general the approach described in this...

Article Thumbnail
Article

Find Red Hatters at OSCON and Open Cloud Day

Mike Guerette

For all of the tech people heading to Portland the week of July 21, there may be a weight shift in the cybersphere. :) Red Hat is a sponsor of OSCON again this year, plus for the new Open Cloud Day. If you plan to attend, be sure to attend these Red Hat sessions. Open Cloud Day - sponsored by Red Hat, Chef, Citrix & OpenStack Monday, July 21, 2014 from 9:00am - 5:00pm "The Open Cloud Day at OSCON...

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...

Article Thumbnail
Article

Red Hat and Hortonworks Alliance - lots for developers

Mike Guerette

Announcement: "Hortonworks and Red Hat Deepen Strategic Alliance" Here are some highlights from Monday's announcement: "Immediate initiatives that are included in the expanded Hortonworks and Red Hat strategic alliance include "Data architects will be able to combine data in a single, scalable open source repository. Available in beta software version, the Hortonworks Data Platform (HDP) combined with Red Hat Storage provides a secure and resilient general-purpose storage pool with multiple interfaces, including Hadoop, POSIX and OpenStack Object Storage (Swift). This...

Article Thumbnail
Article

Probing Java Methods with SystemTap

Lukas Berk

Today we'll be looking at systemtap's latest native java probing capabilities. These go beyond systemtap's existing hotspot-based probe points to actual entry, exit, and line number specific to the relevant java method. This allows for pinpoint probing of a java application, without the need to place probes on the underlying JVM itself. How to install (if running RHEL 7 Beta) # yum install systemtap systemtap-runtime-java Basic Usage How do I use systemtap to probe a java method? Below we have...

Article Thumbnail
Article

Top Red Hat Developer News of 2013

Mike Guerette

Red Hat brought a LOT of new and excellent application development products and capabilities during 2013, so I thought I would assemble this list for you here in case you missed any. Note that this is not a complete list (and comment if I missed something that you feel should be mentioned), and by the way, it is listed in random order. Red Hat Software Collections general availability . Yes, I will list this first as it's my personal favorite...

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...

Article Thumbnail
Article

How Long Does It Take to ...

William Cohen

One common idiom in performance monitoring is how long did it take for a program to do something. For example you may want to know the time taken for database queries in PostgreSQL or just-in-time translations in a Java Virtual Machine. SystemTap and user-space markers in Linux packages make it much easier to determine the duration of those operations. The user-space markers compiled into Linux packages mark key points in the code where particular actions occur. The user-space markers also...