OnlyJava is your source for Blog Aggregation in the Java industry

Lessons Learned While Writing Our New Logback Appender

 Mark As Read    

Here at Logz.io, we take logs seriously. (If not us, who will?)We run mainly on Dockerized Java microservices, and until recently, we had another Docker container that collected logs from our microservices.

Java 8 Top Tips

 Mark As Read    

I’ve been working a lot with Java 8 code over the last couple of years, for both new applications and migrating existing ones, and it feels like the right time to write down some of the “best practices” I’ve found useful. I personally dislike the term “best practices” as it implies a “one size fits all” solution, and of course coding doesn’t work t...

The Most Significant Changes To The Java Ecosystem

 Mark As Read    

To gather insights on the state of the Java ecosystem today for DZone's Java Ecosystem research guide to be published in September, we spoke with 15 executives who are familiar with the Java ecosystem.Here’s who we talked to:

Normalizing a Date String in the Scala Way

 Mark As Read    

I have a problem that is a bit challenge to solve it efficiently in a functional way. Scala is nice because it allows you to use an imperative style if you want. Some people may not agree with this, and that’s totally okay. I just love to have an alternative option when I need it. However, my code often end up having 100% immutable most of the time...

Hadoop: The Definitive Guide

 Mark As Read    

Ready to unlock the power of your data? With this comprehensive guide, you'll learn how to build and maintain reliable, scalable, distributed systems with Apache Hadoop. You'll also find illuminating case studies that demonstrate how Hadoop is used to solve specific problems. This book is ideal for programmers looking to analyze datasets of any siz...

Java 10 hours, 12 min ago

Java Code Challenge: Play the Stockmarket Solution

 Mark As Read    

For the original challenge, please check out the article at this link.As always with these programming challenges I've been bowled over by the sheer variation in the solutions. For what sounds like a fairly simple challenge (finding the min/max pairing in a list of numbers) has produced a series of very interesting solutions.

Grails Diary - weeks 28-29 in 2016

 Mark As Read    

Here a day before GR8Conf US starts, it is tiome for another edition of the Grails Diary. Next edition will likely feature some of the buzz from the conference, even though I'm not attending. ...

GroovyBlogs.org 15 hours, 29 min ago

How to Debug Java with IntelliJ: Breakpoints, Evaluate Expression, Watches, and Variable View

 Mark As Read    

I have deliberately created a failing test. Obviously deliberately since I would never ever create such simple issues in code. I’m far too experienced for that. :)Even though these issues were created deliberately I still need to know how to debug code. In this blog post I’ll describe how I debug Java using IntelliJ.

Custom Audit Log With Spring and Hibernate

 Mark As Read    

If you need to have automatic auditing of all database operations and you are using Hibernate…you should use Envers. But if for some reasons you can’t use Envers, you can achieve something similar with Hibernate event listeners and spring transaction synchronization.First, start with the event listener. You should capture all insert, update, and de...

Keys To The Java Ecosystem

 Mark As Read    

To gather insights on the state of the Java ecosystem today for DZone's Java Ecosystem research guide to be published in September, we spoke with 15 executives who are familiar with the Java ecosystem.Here’s who we talked to:

Scala: Pattern Matching

 Mark As Read    

There are a lot of cases when you need to make a decision in a program based on some condition or value. The first thought which comes to mind is an IF ELSE operator or something like SWITCH in Java. But Scala offers a more powerful and elegant approach for the handling of such situations. Let’s consider how pattern matching can help you.Here is a ...

Groovy Calamari - Issue 42 - 24th Jul 2016

 Mark As Read    

Comment With GR8Conf US around the corner I expect many great talks to popup in the coming weeks and fuel this newsletter. I bet Grails 3.2 stable release may come out just rea...

GroovyBlogs.org 1 day ago

New in Ratpack 1.4: Promise.fork()

 Mark As Read    

As promised in my previous post on ParallelBatch, here’s a brief introduction to another bit of sugary goodness in Ratpack 1.4: Promise.fork() To understand why fork() is useful, you need to un...

GroovyBlogs.org 2 days ago

The Technical Skills You Need to Have as a Software Developer

 Mark As Read    

I’m a big supporter of helping software developers develop “soft skills” in addition to their technical skills — in fact, I wrote a complete book about it — but there is no denying: technical skills are important.I mean, if you can’t actually write code and develop software, all the soft skills you learn won’t really do you much good. Perhaps you’d...

Using Hibernate Events with PersistenceEventListener

 Mark As Read    

In my last blog, we discussed how to hook into GORM API to add some common custom functionality. We will refer the same problem that we discussed in my last blog. Here is the problem statement: In my ...

GroovyBlogs.org 2 days ago

Humble Lisp Programmers

 Mark As Read    

Maybe from the headline you were expecting a blank post? No, that’s not where I’m going.Yesterday I was on Amazon.com and noticed that nearly all the books they recommended for me were either about Lisp or mountain climbing. I thought this was odd, and mentioned it on Twitter. Carl Vogel had a witty reply: “I guess they weren’t sure whether you wan...

New in Ratpack 1.4: ParallelBatch

 Mark As Read    

Ratpack 1.4.0-rc-1 was recently released. The new ParallelBatch type makes it easy to take a collection of promises and yield there values in parallel. Its different methods offer different strategi...

GroovyBlogs.org 3 days ago

Working with LayoutBox

 Mark As Read    

How to extract text from a PDF using BFOs PDF Library API. We will show you with code examples how it can be done.

Evil Annotations

 Mark As Read    

When Java 1.5 introduced Annotations, Enterprise Developers had high hopes that it would make their life developing EJBs and other Enterprise Artifacts much easier. See for example this contemporary article: Simplify enterprise Java development with EJB 3.0.Since then however, using Annotations the way Java Enterprise started to use them had some u...

Fix To: The Out Parameter Must Be Assigned to Before Control Leaves the Current Method

 Mark As Read    

IntroductionThe out keyword causes arguments to be passed by reference.To use an out parameter, both the method definition and the calling method must explicitly use the out keyword.Although variables passed as out arguments do not have to be initialized before being passed, the called method is required to assign a value before the method returns....

Grails 3.2 M2 and GORM 6.0 M2 Released

 Mark As Read    

Today we are pleased to announce the release of Grails 3.2 Milestone 2, which includes GORM 6 Milestone 2 - the biggest GORM release ever!

GroovyBlogs.org 4 days ago

This Week in Spring: Kafka, Spring Boot Tutorials

 Mark As Read    

Welcome to another installment of This Week in Spring! This week I am in Cincinnati and Columbus, Ohio, and Los Angeles and San Francisco, California talking to customers and doing meetups.This is my favorite time of year! As we lead to SpringOne Platform, there’s so much good stuff being released that one can hardly keep up! I am really looking fo...

Build a Java Web App Quickly With Java Servlet, JSP Tags, and Stormpath

 Mark As Read    

Update: Watch Stormpath CTO Les Hazlewood’s presentation on REST + JSON API design best practices.Not long ago, we released a major upgrade of our Java SDK, which now includes Java Webapp (Servlet 3.0+) support with a ton of user automation. Just drop our Servlet plugin into your Java web application and boom—instant user management with little to ...

A Case Study: Different GC Algorithms Behavior in Production

 Mark As Read    

On a major B2B application different GC algorithms behaviors were studied. This application is basically a webservice provider servicing SOAP and REST requests from its clients. This application doesn’t have any web browser interactions. Application runs on 8 Core CPU, Red Hat Linux 6.9. It’s using Java 7, Tomcat 7 and other popular Java frameworks...

How to Get Started With Java Machine Learning

 Mark As Read    

Java / Scala developer? Takipi replaces logging in production JVMs and lets you see the variable state that caused each log error and exception.What are the Best Tools to Get Started With Java Machine Learning?They’ve been around for awhile, but these days it feels like everyone is talking about artificial intelligence and machine learning. It’s no...

VMWare Fusion tip: drag n drop

 Mark As Read    

I have a recurring, not to mention infuriating, issue with Fusion which has existed since I started using the software in those heady beta days (2007?). To wit: drag n drop from the host to the guest OS just stops working for no apparent reason. Occasionally, this extends to copy and paste too. One way to address this is to restart the VM (bah!) or...

Ben Poole 4 days ago

Using Handlebars Java as a Server Side Templating Language

 Mark As Read    

handlebars.java is a server side Java template engine like Velocity or Freemaker. It follows the syntax of the Mustache spec. The main goal of handlebar.java is to reuse the same templates on both the client and server side. In this article we will see how to use Handlebars.java along with the Spring framework. I have used Spring Boot for this demo...

Apache PDFBox Command-Line Tools: No Java Coding Required

 Mark As Read    

In the blog post Apache PDFBox 2, I demonstrated how to use Apache PDFBox 2 as a library called from within Java code to manipulate PDFs. It turns out that Apache PDFBox 2 also provides command-line tools that can be used directly from the command line as-is with no additional Java coding required. There are several command-line tools available, an...

Java Quiz: Nested Classes and Constructors

 Mark As Read    

PurposeThis is a quiz aimed at intermediate developers to:Introduce you to how nested classes behave in Java.

New Refcardz Topics: Awesome or Lame?

 Mark As Read    

We've published over 200 Refcardz, and we'll be updating a ton over the next six months. The aim of the Refcadz line is to fill (what we see as) a gap in free learning materials available on the web: 'something for experienced developers who don't know this particular technology, who aren't actually going to read the whole manual/book right now, an...

WebSphere V9 "Traditional" Now Java EE 7 Certified

 Mark As Read    

WebSphere V9 "traditional" has recently been fully Java EE 7 certified. In case you are wondering, this is indeed the much maligned "kitchen sink" monolithic version of WebSphere—as opposed to the far more nimble WebSphere Liberty.Given the very large and loyal customer base IBM has as well as the continued substantial usage rates for WebSphere tra...

Sentiment analysis on tweets

 Mark As Read    

What’s the mood on Twitter today? Looking at my little

GroovyBlogs.org 5 days ago

Tips to Make Eating More Plant-Based Meals Easier

 Mark As Read    

It should be no surprise that healthier living starts with what you eat. Getting more plant-based foods into your diet while cutting back on meat is a great way to jump-start your journey into creating a healthier you. While exercise also plays an important role in creating a healthy lifestyle, changing what you eat can […] No visits yet The ...

LadyJava's Lounge 5 days ago

The new post-fact age

 Mark As Read    

It's terrifying, especially hot on the heels of the brexit farce here in the UK. Consider this comment, made in a book four years ago and derided at the time: The Republican Party has become an insurgent outlier in American politics — ideologically extreme; contemptuous of the inherited social and economic policy regime; scornful of compromise; un...

Ben Poole 6 days ago

What's in Your Java Application? [Infographic]

 Mark As Read    

As caretakers of the Central Repository, Sonatype receives more than 31 billion requests per year for Java open source components. We literally feed millions of developers the software parts they require to manufacture and continuously deliver modern applications.From this unique vantage point, we’ve amassed a great deal of data and we’ve developed...

Benchmarking the message queue based Activiti Async Executor

 Mark As Read    

A bit of history One thing that never ceases to amaze me is how Activiti is being used in some very large organisations at some very impressive scales. In the past, this has led to various optimizations and refactorings, amongst which was the async executor – replacement for the old job executor. For the uninitiated: these executors handle [&...

Folding the Universe, Part III: Java 8 List and Stream

 Mark As Read    

This is the third article in a series about applying functional programming techniques like folding to Java programs. This series is a complement to my book Functional Programming in Java published by Manning.The first two articles are available here:

Why Refactor Java Code? Here Are 44 Reasons (Based on 748 GitHub Projects)

 Mark As Read    

(Raw totals from our last poll: lousy naming choices and how often they come up. More analysis to follow.)Your code won't stay the same forever. Sometimes it changes because requirements have changed; sometimes because external dependencies and interfaces change; sometimes because it wasn't written well in the first place, and so on.

Geek Reading: Mixins Considered Harmful

 Mark As Read    

Yesterday was buy a company day! First, Atlassian announced their acquisition of StatusPage. This is yet another step in the DevOps and monitoring direction for Atlassian. Amazon acquired Cloud9, which gives them a development environment in the cloud. Basically, Amazon does not want to give you a reason to not use their services. In the not quite ...

How to Test if Your Multi-Threaded Java Rest Service Is Thread Safe

 Mark As Read    

In the following article, you will see how to test if your rest service is thread safe. Let us start with a simple example—a counter which contains a race condition.The Not-Thread Safe CounterAs an example, we use the following jersey rest service. It consists of a resource that increments a counter for each post call and returns the new value:...

Many Parameters and Lost Information

 Mark As Read    

The less code, the better? The fewer objects, the better? Is it true? As usual, it depends. There are cases when by adding something more we are adding unnecessary complexity. It happens when we are creating interfaces or other abstractions just because “we may need this additional flexibility in future.” It happens when we forget about YAGNI princ...

Java Community: The Ghost in the Virtual Machine

 Mark As Read    

I’ve often heard the term “ghost in the machine” in the past, but never went to the trouble of finding out where it originated. According to Wikipedia, the English philosopher Gilbert Ryle coined the phrase as a description of René Descartes’ mind-body dualism.“What does this have to do with Java?” I hear you ask.

Tabs vs Spaces: How They Write Java in Google, Twitter, Mozilla, and Pied Piper

 Mark As Read    

What are the Most Interesting Highlights in Java Code Styles?In spite of the suggestive image above, we don’t want to commence any unnecessary holy wars. When it comes down to coding styles, most choices are pretty arbitrary and depend on personal preference. Yes, even if tab width changes between editors, and if spaces tend to be more precise.If t...

I'd rather use tokenize() than split() - due to this difference that could lead to bug in code...

 Mark As Read    

I was recently fixing a bug in my code that used String class's split() method in groovy to split a string of values separated by comma (,) and was processing each element of the result using .each{} ...

GroovyBlogs.org 7 days ago

Programming Android

 Mark As Read    

Get thoroughly up to speed on Android programming, and learn how to create up-to-date user experiences for both handsets and tablets. With this book's extensively revised second edition, you'll focus on Android tools and programming essentials, including best practices for using Android 4 APIs.

Java 7 days ago

What Is an Object?

 Mark As Read    

There are thousands of books about object-oriented programming and hundreds of object-oriented languages, and I believe most (read "all") of them give us an incorrect definition of an "object." That's why the entire OOP world is so full of misconceptions and mistakes. Their definition of an object is limited by the hardware architecture they are wo...

Queries and Aggregations With Scala: Part 1

 Mark As Read    

In this post, we’ll take a look at the built-in aggregations in the Scala API.I was looking at publicly available data sets to run some analysis on, and a good choice seemed the Chicago Crime statistics, a data set that includes all crime cases since 2001.

Is Java Dead? No! Here’s Why...

 Mark As Read    

We see this “Is Java dead?” question pop up year after year, and yet, by all external markers, Java is alive, well, and growing. While newer languages grab the headlines, TIOBE ranked Java as it’s top language of 2015, and currently shows it enjoying 5% growth in use since 2014, more than any other programming language.Further, the PYPL Index, whic...

The Knights of Legacy Code

 Mark As Read    

Let's set the context first. Your team is in mid development of a new module, which depends on the obligatory legacy core application that your company spent serious amount of time and money to develop. The x week long iteration is starting to get out of hand, but it's still manageable. You need to check someting in the old codebase, and you stumbl...

Groovy Calamari - Issue 41 - 16th Jul 2016

 Mark As Read    

Comment I want to use this issue's prologue to thank all the plugin and projects authors in the Groovy Ecosystem. I've been seeing this trend for the past months. People are n...

GroovyBlogs.org 9 days ago
Java
Welcome!
OnlyJava aggregates blogs for the Java industry.
Custom Feeds
Add any RSS feed to the information you read daily.
Blocked Feeds
Block feeds to remove blogs you’re not interested in.
Account Settings
Customize the site by adding or removing feeds.

About Us

OnlyJava is your source for all your Java news.

Have a Suggestion for Us?
Know of a Java blog that we're missing? Let us know!

Share OnlyJava.com