Why Use Java Thread Pools?

Finally Getting the Most out of the Java Thread Pool

Eugen Paraschiv Developer Tips, Tricks & Resources Leave a Comment

Thread pool is a core concept in multithreaded programming which, simply put, represents a collection of idle threads that can be used to execute tasks. First, let’s outline a frame of reference for multithreading and why we may need to use a thread pool. A thread is an execution context that can run a set of instructions within a process – …

Java Stack vs. Heap

Java Heap Space vs. Stack Memory: How Java Applications Allocate Memory

Angela Stringfellow Developer Tips, Tricks & Resources Leave a Comment

Java applications need a certain amount of RAM on a computer to run. Each time an object or variable is declared, it needs more RAM. Simply designating enough memory to hold every value declared and run each method would lead to a bloated application. To keep application memory requirements lean, it is partitioned in ways that require less memory and …

Common Mistake to Avoid with Java Exception Handling

7 Common Mistakes You Should Avoid When Handling Java Exceptions

Thorben Janssen Developer Tips, Tricks & Resources Leave a Comment

Handling an exception is one of the most common but not necessarily one of the easiest tasks. It is still one of the frequently discussed topics in experienced teams, and there are several best practices and common mistakes you should be aware of. Here are a few things you should avoid when handling exceptions in your application. Mistake 1: Specify …

Use Jackson XML module to support for both JSON and XML data

Solving the XML Problem with Jackson

Eugen Paraschiv Developer Tips, Tricks & Resources Leave a Comment

Introduction Jackson is a popular library for handling JSON in Java applications, quickly becoming the de-facto standard in the ecosystem. Starting with version 2, it has also introduced a mature XML implementation alongside its established JSON support. Adding Jackson XML to the Project Adding the Jackson XML module to the project only needs a single dependency – the Jackson XML …

How To Handle Java Exceptions

9 Best Practices to Handle Exceptions in Java

Thorben Janssen Developer Tips, Tricks & Resources Leave a Comment

Exception handling in Java isn’t an easy topic. Beginners find it hard to understand and even experienced developers can spend hours discussing how and which Java exceptions should be thrown or handled. That’s why most development teams have their own set of rules on how to use them. And if you’re new to a team, you might be surprised how …

Understand Java Memory Leaks

How Memory Leaks Happen in a Java Application

Eugen Paraschiv Developer Tips, Tricks & Resources Leave a Comment

Introduction to Memory Leaks In Java Apps One of the core benefits of Java is the JVM, which is an out-of-the-box memory management. Essentially, we can create objects and the Java Garbage Collector will take care of allocating and freeing up memory for us. Nevertheless, memory leaks can still occur in Java applications. In this article, we’re going to describe the …

Solving Logback problems

Solving Your Logging Problems with Logback

Eugen Paraschiv Developer Tips, Tricks & Resources Leave a Comment

Logback is a logging framework for Java applications, created as a successor to the popular log4j project. In fact, both of these frameworks were created by the same developer. Given that logging is a crucial part of any application for both debugging and audit purposes, choosing an adequate logging library is a foundational decision for any project. There are several …

Java Memory Leaks - How To Fix Them

What to Do About Java Memory Leaks: Tools, Fixes, and More

Stackify Developer Tips, Tricks & Resources Leave a Comment

Memory management is Java’s strongest suit, and one of the many reasons why developers choose Java over other platforms and programming languages. On paper, you create objects and Java would deploy its Garbage Collector to allocate and free up memory. But that’s not to say  Java is flawless; in real life, memory leaks do happen, and it happens a lot …

Java Strings dos and don't

The Do’s and Don’ts of Java Strings

Lyndsey Padget Live Queue Leave a Comment

Today we’re going to be talking about Strings in Java.  If you write Java often, you know that a String is considered a first class object, even though it is not one of the eight primitive types.  What you may not know is how to best handle Strings in production applications. To do this, you’ll need to understand how to …

Java EE

How To Build Microservices With Java EE And JBossForge

Thorben Janssen Developer Tips, Tricks & Resources Leave a Comment

Microservices have become one of the most popular architectural styles in the recent years. Previously, most development teams created huge monoliths which implemented all customer requirements. The downside of this approach is that the application often becomes a huge, unstructured combination of components, classes, and interfaces. That makes it hard to understand the overall system and to predict the side-effects …

How to Handle Exceptions in Java

How to Specify and Handle Exceptions in Java

Thorben Janssen Developer Tips, Tricks & Resources Leave a Comment

Errors happen all the time in the software world. It might be an invalid user input or an external system that is not responding, or it’s a simple programming error. In all these situations, the errors occur at runtime and the application needs to handle them. Otherwise, it crashes and can’t process further requests. Java provides a powerful mechanism which …

Top Java Tools

Top Java Tools: 63 Tools to Power Every Phase of Java Development

Stackify Developer Tips, Tricks & Resources Leave a Comment

Many know Java as one of the simplest, but most powerful (not to mention sought-after) programming languages used by web developers. There are others who see it in the opposite light, saying that Java is a hard and more complex programming language. In order to execute your Java coding more effectively, there are a handful of Java tools that web …

Stackify Linux Agent 2.0 and Java APM 1.15 Release

Stackify’s Linux Agent 2.0 & Java APM 1.15 Release Is Here!

Stackify Stackify Product & Company Updates Leave a Comment

Stackify is thrilled to announce our latest release, Linux Agent 2.0 and Java APM 1.15. We think you’ll be excited about this release, too, and here are just a few reasons why. What’s New in Our Linux Agent 2.0 and Java APM Release? In this latest release, we’ve added additional agent installation options and support for additional application servers, including: …

Java Web Services Tutorial: Improve App Communication And Flexibility

Eugen Paraschiv Developer Tips, Tricks & Resources Leave a Comment

Web services have taken the development world by storm, especially in recent years as they’ve become more and more widely adopted. There are naturally many reasons for this, but first, let’s understand what exactly a web service is. The World Wide Web Consortium (W3C) defines “web of services” as “message-based design frequently found on the Web and in enterprise software”. …

Java Interview Questions

20 Java Pros and Dev Leaders Share Their Favorite Java Interview Questions (and How You Should Prepare to Answer Them)

Stackify Developer Career Development Leave a Comment

Java remains a popular programming language, and it’s still the most sought-after programming language among employers. That means if you’re looking for a programming job, prospective employers will likely be asking questions designed to gauge your knowledge of this long-established programming language. (If you’re interviewing for new developer positions, you should probably brush up on your DevOps interview questions, too.) …

JUnit 5 Code Example

A Look at JUnit 5’s Core Features & New Testing Functionality

Eugen Paraschiv Developer Tips, Tricks & Resources Leave a Comment

JUnit 5 is the updated version of the highly popular testing library for Java applications, JUnit, scheduled to be released in Q3 2017. The new version enables a lot more testing options and finally adds support for Java 8 features. In fact, JUnit 5 requires Java 8 to work. The library is composed of several modules, organized in 3 main sub-projects: JUnit …

Gradle vs. Maven

Gradle vs. Maven: Performance, Compatibility, Builds, & More

Stackify Developer Tips, Tricks & Resources Leave a Comment

Gradle is one of several Java development tools featured in Stackify’s Comprehensive Java Developer’s Guide, but it’s not the only build automation tool to consider. Maven is an older and commonly used alternative, but which build system is best for your project? With other tools, such as Spring, allowing developers to choose between the two systems, coupled with an increasing …

Find and fix issues in Hibernate with Retrace

How to Find Hibernate Performance Issues in Development and Production

Thorben Janssen Developer Tips, Tricks & Resources Leave a Comment

The Java Persistence API (JPA), and Hibernate ORM as its most popular implementation are used in most Java applications to interact with a relational database. The main reason for their popularity is that they use object-relational mapping to abstract the database interactions and make it very easy to implement simple CRUD operations. But this abstraction also has its downsides. Hibernate …

Java Software Errors and How to Fix Them

Top Java Software Errors: 50 Common Java Errors and How to Avoid Them

Stackify Developer Tips, Tricks & Resources, Insights for Dev Managers Leave a Comment

There are many types of errors that could be encountered while developing Java software, from, but most are avoidable. We’ve rounded up 50 of the most common Java software errors, complete with code examples and tutorials to help you work around common coding problems. For more tips and tricks for coding better Java programs, download our Comprehensive Java Developer’s Guide, …

How Log4J2 Works: 10 Ways to Get the Most Out Of It

Eugen Paraschiv Developer Tips, Tricks & Resources Leave a Comment

Log4j2 is the updated version of the popular and influential log4j library, used extensively throughout the Java ecosystem for so many years. Version 2.x keeps all the logging features of its predecessor and builds on that foundation with some significant improvements, especially in the area of performance. And of course, given how instrumental logging is for any application, both for …