OnlyJava is your source for Blog Aggregation in the Java industry

A Beginner’s Guide to Java Internationalization

 Mark As Read    

When developing software or websites today, an essential consideration is the global marketplace. As the growth of software products for global markets continue, it has become critical for companies to design products that interact with users in their native regions and languages. Software developers working on software for foreign markets should b...

ReentrantLock Cheat Sheet

 Mark As Read    

The ReentrantLock is a replacement for the easier-to-use synchronized statement when you need one of the following advanced techniques: lockInterrupibly, tryLock, lock coupling, multiple conditions, or fair locks.In the cheat sheet below, I summarized each technique. And in the rest of this blog post, I give a detailed description of those techniqu...

One Gradle Plugin to JAR Them All

 Mark As Read    

ScenarioYou have to pack a standalone application into one JAR that will contain your custom code and also all of the third-party libraries the code needs to function properly. You are using Grad...

GroovyBlogs.org 2 hours, 56 min ago

The Java Web App Journey... SOAP Services (Part 3)

 Mark As Read    

We left off in part 2, where we had conducted an initial, successful test of the generated WSDL using SOAPUI. Now, it's time to continue continue...There is a link to the latest code at the end of this article.

Language Flavors

 Mark As Read    

It might be having a child in Spanish this year, or maybe it's the fact that I've been switching from Java to Ruby to Go to Python over the past couple months, but I've been giving some thought to how different languages are "flavored." One of my favorite things about the Go programming language is that the second thing you read while learning it i...

One Gradle Plugin to JAR Them All

 Mark As Read    

ScenarioYou have to pack a standalone application into one JAR that will contain your custom code and also all of the third-party libraries the code needs to function properly. You are using Gradle for your build scripts. The solution to this task has two steps.StepsCreate a Gradle build that will compile and package your standalone application. Th...

Java Code Challenge: Wandering Fingers

 Mark As Read    

The Java Code Challenge is a regular segment taking the best challenge from Reddit's dailyprogrammer. Things are a little different here, as we're focused purely on Java. A working solution is not enough; we're looking for the cleanest Java code with tests. Third-party libraries are welcome, but if you can do it without it will be easier for others...

Grails 3.2 and GORM 6.0 Released

 Mark As Read    

Today we are pleased to announce the GA releases of Grails 3.2 and GORM 6.0.

GroovyBlogs.org 20 hours, 43 min ago

JavaZone 2016 (And Why You Should Go Next Year)

 Mark As Read    

It’s been a while since I wrote a conference write up. The short version of “why” is because I got a bit bored of doing it. Plus, I found I was attending conferences as a speaker “on the circuit”, and my experience of hanging out, catching up with my friends, chatting to other attendees to see what they’re up to and so forth, didn’t seem as useful ...

The Java Web App Journey... SOAP Services (Part 2)

 Mark As Read    

In part 1, we did most of the setup of our new web service project, and we were able to generate an initial WSDL. Now we want to deploy something (even if minimal) to our Eclipse Tomcat server — so we are jumping right in from where we left off.Java ConfigWe completed a web application (it used the Shape Calculator) that we covered over several art...

Grails Tips – How to unit tests allowed HTTP request methods in a Grails 3 Controller’s action?

 Mark As Read    

I am fan of restricting my Grails 3 Controller's actions to certain HTTP methods. If an action does not modify the database let use GET, if an action inserts a new row in the database lets use P...

GroovyBlogs.org 1 day ago

Creating Maven Artifacts From a jar File

 Mark As Read    

Today, we're going to create an artifact from mailapi.jar with version 1.4.5 and use it in our Maven project. This article will guide you through the steps to make that happen.BackgroundWhile creating Maven projects, we often come across a scenario when we have to import a jar from local repositories instead of Maven.

Jackson Mixin to the Rescue

 Mark As Read    

Many-a-times it's not possible to annotate classes with Jackson Annotations simply for serialization/deserialization needs. There could be many reasons, for example:Classes that need to be serialized/deserialized are third-party classes.You don’t want Jackson invading your code base everywhere.You want cleaner and more modular design.Jackson Mixin ...

Integrating SonarQube with Jenkins

 Mark As Read    

Recently, we got a requirement where Development team needs to have a one-click interface to run units test cases for their Grails application and send the results to SonarQube. SonarQube is a web-bas...

GroovyBlogs.org 1 day ago

Object Identity and Equality in Java

 Mark As Read    

IntroductionIn this article, I will discuss Object Identity and Object Equality in Java.Object IdentityWhen we create objects in Java, the computer stores them in its memory. To be able to locate an object, the computer assigns it an address in the memory. Every new object you create gets a new address. If this yellow area represents an area of ...

Debug Like a Champion

 Mark As Read    

As Pareto’s Law says: Software development is 20% of the time developing and 80% debugging.Imagine how powerful you could become if you cut down the debugging time and made the debug process more efficient, finding the root cause of the problem in your code or understanding the workflow of your algorithm.

Grails Diary - weeks 37-38 in 2016

 Mark As Read    

My favorite talk from GR8Conf EU this year is out on video, Marcin Zajaczkowski sharing "Interesting nooks and crannies of Spock you (may) have never seen before". Besides that, conference season...

GroovyBlogs.org 1 day ago

My Journey in Scala, Part 3: None Is Better Than Undefined

 Mark As Read    

Here’s the situation: At Threat Stack, we consume a torrent of security event data every day, and as many new customers come on board, the amount of data we need to ingest, transform, store, and retrieve just keeps growing. About a year ago, we implemented a caching layer to allow us to display more aggregated information to customers on our Dashbo...

Gradle 3.1: Composite Builds, Here you Go!

 Mark As Read    

Our journey with Gradle started one and half years ago with this presentation. Everybody in the company just loved its expressive and easy-to-understand structure and realized that a plugin model was ...

GroovyBlogs.org 2 days ago

The Java Web App Journey... SOAP Services (Part 1)

 Mark As Read    

IntroductionOur continuing make-believe story: You work in a team of developers, and some time ago, you took some code that was very useful to you (albeit somewhat simple), and you realized it might be resuable. You made it into a separate project, and later, you wrapped it in a simple command-line application. Some of your teammates saw it and su...

Gradle 3.1: Composite Builds, Here you Go!

 Mark As Read    

Our journey with Gradle started one and half years ago with this presentation. Everybody in the company just loved its expressive and easy-to-understand structure and realized that a plugin model was the wrong level of abstraction. Instead, language-based approaches were the right one in terms of their flexibility for the long term.So it didn't tak...

Should Tests Be Ordered or Not?

 Mark As Read    

Most of our day-to-day job is learned through mentorship and experience and not based upon scientific research. Once a dogma has permeated a significant minority of practitioners, it becomes very hard to challenge it.Yet, in this post, I’ll attempt to not only argue that sometimes tests must be ordered, but I'll prove that in different use-cases.

JavaOne 2016 Lightweight Java EE Talk

 Mark As Read    

At this JavaOne conference, I gave several presentations about Java EE. The recording of my “Lightweight Java EE” session is available:

Possible Ways Forward for MVC 1.0

 Mark As Read    

As mentioned in Aggressive Road Map for Java EE 8, MVC 1.0 has been left out of the plans for Java EE 8.The way I see it, and also have indications from several people I have talked with during JavaOne, the possible outcomes of this are:

Tribblix - updates versus upgrades

 Mark As Read    

Having released a new version of Tribblix, I thought it worth writing a little on how I see updates and upgrades in the Tribblix world, and how they differ.After all, one thing I said about the Tribblix philosophy of keeping current is that Tribblix is essentially a rolling release, in that new versions of applications are continuously added. You c...

Awesome Asciidoctor: Trick To Use Caption Labels And Numbers In References

 Mark As Read    

In Asciidoctor we can add an anchor with an ID to a section or title and then reference it in a link. The title of the section is used as link text. We can alter that when we define the link, but if w...

GroovyBlogs.org 2 days ago

Awesome Asciidoctor: Use Captions For Listing Blocks

 Mark As Read    

Asciidoctor has some built-in attributes to work with captions for certain content blocks. For example the table-section attribute defines the caption label (by default Table) that is prefixed to a co...

GroovyBlogs.org 2 days ago

Life Update: A Summer to Remember, a New House, and a Sweet New Gig

 Mark As Read    

TL;DR: I had a super fun summer traveling with my family, recently moved to a new house in the country, and I've joined Stormpath as a Developer Evangelist. Wahoo! I've written several "life update" posts in the past, but there's been few as epic as this one. When I wrote my 2016 Goals, I listed "July in Montana" as one of them. A...

Raible Designs 2 days ago

Awesome Asciidoctor: Customize the Figure Captions

 Mark As Read    

With Asciidoctor we can use images in our documents with the image directive. When the document is converted each image gets a caption. By default the caption label is Figure followed a number for the...

GroovyBlogs.org 3 days ago

Securing Spring Boot With JWTs

 Mark As Read    

Spring Boot is a technology from Pivotal, known for giving us the powerful Spring framework. With Spring Boot, they offer an easy way to set up a project and get it running in no time. They took the approach of valuing convention over configuration, meaning that you will spend a lot less time struggling with the setup and more time focusing on what...

9 Signs You Need Help With Java Internationalization

 Mark As Read    

Global business, global software. The people who designed Java were forward-looking. They oriented this programming language towards international use from the beginning. Eminently portable, Java lends itself well to internationalization and the adaptation of texts, numbers, dates, currencies, and any other culturally dependent dimension. With bett...

Cloning With Examples

 Mark As Read    

In Java, whenever we assign an object reference to another, it is just a bit by bit copy of the memory address, so any changes made using first object reference will be reflected in others and vice versa.For example:

10 Commandments of Object-Oriented Design

 Mark As Read    

No, this isn’t the word of God.It isn’t the word of Jon Skeet/Martin Fowler/Jeff Atwood/Joel Spolsky (replace it with your favorite technologist) either.

Code Smell Series: Parallel Inheritance Hierarchies

 Mark As Read    

Code smells are similar in concept to development-level anti-patterns. Sometimes, in our code, we unintentionally introduce code smells and make our design fragile.Definition of a Code SmellCode smells, also known as a bad smell, in computer programming refer to any symptom in the source code of a program that possibly indicates a deeper problem.

Finally! A Web App (Part 6, Finale)

 Mark As Read    

Today we will finish (for now) our most recent iteration of our Shape Calculator component (or service, if you will). We have been on a long journey to this point. Once we are done, we will move onto:SOAP services.

Groovy Calamari - Issue 49 - 24th Sep 2016

 Mark As Read    

Comment This issue is dedicated to logging. Put your log level in trace and continue reading Groovy Calamari Groovy Create your own Groovy type con...

GroovyBlogs.org 4 days ago

Gradle Releases Version 3.0 of Their Polyglot Build Tool

 Mark As Read    

Gradle announced a milestone version 3.0 release of their polyglot build tool that offers Gradle Cloud Services, an improved Gradle Daemon, improved IDE support, and initial support for Java 9. By M...

GroovyBlogs.org 4 days ago

Is Everything an Object?

 Mark As Read    

I have been reading two great books, Object Thinking by David West and Clean Code by Robert C. Martin. In these two great books, the authors mention the phrase: “Everything is an object.” What caught my attention was that both express very different thoughts about this phrase. In his book, David West affirms that everything is an object and is a pr...

Finally! A Web App (Part 5)

 Mark As Read    

IntroductionHopefully, you have been following along in this series of articles, and we are in the final stages of this iteration of a web-enabled Shape Calculator app. We have been pretending to enhance some in-house code that started out in your development team. I chose the Shape Calculator, but it could be anything.Our first two rounds of the a...

New In Spring 5: Functional Web Framework

 Mark As Read    

As mentioned yesterday in Juergen’s blog post, the second milestone of Spring 5.0 introduced a new functional web framework. In this post, I will give more information about this framework.ExampleWe start with some excerpts from our sample application. Below is a reactive repository that exposes Person objects. It is quite similar to a traditional,...

Spring(boot)ing to the Web With Java and Pom.xml

 Mark As Read    

This blog presents instructions on how to quickly get started with Spring Boot Hello World with just one Java file and a Pom.xml.Before getting to the files, make sure you have installed and configured the following:

Grails Tips – How to log from a none Grails Artifact

 Mark As Read    

Create a grails app with the rest profile: Create a controller grails-app/controllers/lognongrailsartifact/TestController.groovy Create a Groovy Class src/main/groovy/lognongrailsartifact/NonGrailsArt...

GroovyBlogs.org 6 days ago

Correcting the Server Shutdown Process: A Web App Detour (Part 2)

 Mark As Read    

IntroductionIn Part 1, we discussed the issue of resources not being cleaned up during shutdown and how to do this while dealing with the Root context and the Servlet context. If you want to actually try all this, check out the other article, as it has all the code.How to Release ResourcesWe have our ShapeCalcServletContextListener that implements ...

How to Recognize Dates in PDFs

 Mark As Read    

One of the “pleasures” of having your own business is dealing with accounting.Now, to survive, I tried a few things like:

Java DSL for Spring Integration 1.2 Milestone 2 Is Available

 Mark As Read    

I’m pleased to announce that the Java DSL for Spring Integration 1.2 M2 is available now!First of all, I’d like to thank everyone who created issues, raised Pull Requests, provided feedback or just asked questions on StackOverflow. Especial thanks for early adopters since the previous Milestone 1. With their help, we have improved and fixed some is...

Functors in Scala

 Mark As Read    

While programming in Scala, we often come across a term called a functor. A functor is an extremely simple, but powerful concept. In this blog, we'll discuss that in more detail.Theoretically, a functor is a type of mapping between categories. Given two categories, A and B, a functor, F, maps the objects or entities of A to the objects or entities ...

Gradle Goodness: Use Command Line Options With Custom Tasks

 Mark As Read    

Suppose we have a custom task with some properties that can be configured. Normally, we would add the configuration in the build script. But we can also use command line options to configure a task. So when we run the task from the command line, we can provide a configuration value for the task on the command line. To see which command line options...

Java Code Challenge: Chemical Symbol Naming (Part 2) — Solution

 Mark As Read    

If you need a reminder of what's involved in the challenge, check out the article here.This week's challenge was a nice, easy one, assuming you had completed part one of the challenge, as it was very much leveraging the same code.

Can We Have OOP Without Classes?

 Mark As Read    

I interviewed David West, the author of the Object Thinking book, a few weeks ago, and he said that classes were not meant to be in object-oriented programming at all. He actually said that earlier; I just didn't understand him then. The more I've thought about this, the more it appears obvious that we indeed do not need classes.Battleship Potemkin...

Correcting the Server Shutdown Process: A Web App Detour (Part 1)

 Mark As Read    

IntroductionWe were well on our way in the previous article toward completing our third round of applications that utilize an in-house component, but we noticed an issue when shutting down the server. We'll get on with the web app completion after we handle this shutdown issue.Here is what we noticed:

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