OnlyJava is your source for Blog Aggregation in the Java industry

Memory Debugging and Watch Annotations

 Mark As Read    

Before diving into debugging memory issues and the other amazing running process, memory debugging capabilities (which are amazing)... I want to discuss a point I left open in the last duckling post. Back there we discussed customizing the watch renderer. This is super cool! But it's also tedious. Before we continue, if you prefer, I cover most of ...

Java Hashtable, HashMap, ConcurrentHashMap: Performance Impact

 Mark As Read    

There are a good number of articles that articulate functional differences between HashMap, Hashtable, and ConcurrentHashMap. This post compares the performance behavior of these data structures through practical examples. If you dont have the patience to read the entire post, here is the bottom line: when you are confronted with the decision of wh...

How to Upload/Download a File to and From the Server?

 Mark As Read    

In the video below, we take a closer look at how to upload/download a file to and from the server? Let's get started!

Debugging Deadlocks and Race Conditions

 Mark As Read    

Thread debugging has the reputation of being one of the most arduous tasks for developers. I beg to differ. Asynchronous debugging is so much worse. Its supposed to solve threading problems, and to some degree, async helps But it doesnt make debugging simpler. I will get into that in the next post. Today we'll discuss the process of debugging threa...

How to Generate Fake Test Data

 Mark As Read    

Are you also often uninspired when you need to think of useful test data for your unit tests? Is John Doe your best test friend? Do not worry, Java Faker comes to the rescue! In this blog, you will learn how to generate your test data. 1. Introduction Making up test data is one of the hardest tasks when writing tests. Often you will see 123 when nu...

JUnit 5 Tutorial: Nice and Easy [Video]

 Mark As Read    

Ever looked for a comprehensive intro to JUnit 5 that is fun and entertaining at the same time? Then have a look at this brand-new episode of the "Marco Codes" YouTube channel: JUnit 5 Tutorial - Nice...

GroovyBlogs.org 708 days ago

Synchronization Methods for Many-To-Many Associations

 Mark As Read    

The many-to-many association is a common thing in data modeling. In JPA entities, it is implemented as collections that store associated entities from the other side of the association. To keep collections consistent on both sides, developers usually implement data synchronization methods. This article will highlight common issues that happen when ...

JUnit 5 Tutorial: Nice and Easy [Video]

 Mark As Read    

Ever looked for a comprehensive intro to JUnit 5 that is fun and entertaining at the same time? Then have a look at this brand-new episode of the "Marco Codes" YouTube channel: JUnit 5 Tutorial - Nice & Easy. In this video, you'll learn how to use JUnit 5 like a professional. Understand what Maven/Gradle dependencies you'll need, how to write t...

Kafka Fail-Over Using Quarkus Reactive Messaging

 Mark As Read    

Background Recently, I came across a scenario where, at first glance, we needed an active-active Kafka cluster with bi-directional replication using MirrorMaker2. However, while diving deeper into the nuances of the solution that this particular project demanded, a number of factors showed this wasn't really the case. For example, a look at how the...

Exporting and Importing Projects in Eclipse

 Mark As Read    

I admit that I have (a few? or not so few) bad habits: one of them is that usually, I find a way to do things, and if that works, I stick with it. I know that there are other ways to do things, but hey, why bother? and sometimes a good friend asks an excellent question (are there any bad questions?), and this lets me review the way Im doing things....

After COVID, Developers Really Are the New Kingmakers

 Mark As Read    

Several years ago, pre-COVID, I wrote the article Developers are the New Kingmakers. Today, companies see the value of developers as being even greater. Since the pandemic began, we've seen a renewed focus on digital transformation. Companies and industries are transforming two to three times faster than they were prior to COVID. Businesses have mo...

How to Leverage Method Chaining To Add Smart Message Routing in Java

 Mark As Read    

We are going to use the open-source serialization library Chronicle Wire. Let's assume we have some data that we want to send to a particular destination; we don't want to pollute our business data structures with the routing information. In the future, the routing information could be removed or changed based on external factors such as system fai...

Growth in Java Development for Web and Mobile Apps

 Mark As Read    

Java is the fifth most used programming language with a market share of 35.35%. It is a viable technology for enterprise, web, and mobile applications. Java has become the primary programming language for companies across multiple domains in recent years. It is powerful, scalable, and enterprise-grade. As a result, Java software development service...

Maven Tutorial: Nice and Easy [Video]

 Mark As Read    

Ever looked for a comprehensive intro to Maven that is fun and entertaining at the same time? Then have a look at this brand-new episode of the "Marco Codes" YouTube channel: Maven Tutorial - Nice & Easy. In this video, you'll learn how to use Maven like a professional: installations, using the mvn wrapper, using Maven together with IDEs, and o...

MySQL DB Installation and Workbench [Video]

 Mark As Read    

In the video below, we take a closer look at MySQL DB installation, MySQL Workbench, how to connect to the MySQL DB, and how to get info using the Java program. Let's get started!

Refactoring Java Application: Object-Oriented And Functional Approaches

 Mark As Read    

Java Refactoring Approaches Refactoring in Java has many aspects, but among all of them, there are two fundamentals: object-oriented and functional. Object-oriented existed almost from the first Java version, whereas functional appeared only with Java 1.8 (March 2014). Object-Oriented (OO) and Functional Approaches Java is a classical object-orient...

Usage of Java Streams and Lambdas in Selenium WebDriver

 Mark As Read    

Overview: Java Streams and Lambdas Lambdas A lambda expression is a microcode that takes in parameter(s) and returns a value. Lambda expressions are similar to methods, but they are anonymous and they can be implemented right in the body of a method. Lambdas Syntax Java expression //to use single parameter & expr...

Testing Schema Registry: Spring Boot and Apache Kafka With JSON Schema

 Mark As Read    

Introduction Apache Kafka is the most widely used reliable and scalable eventing platform. It helps in providing the base for a fast, scalable, fault-tolerant, event-driven microservice architecture. Any type of data can be published into a Kafka topic and can be read from. Kafka does not provide an out-of-the-box schema validation system and hence...

Maven - running Java app . . .

 Mark As Read    

When Maven is the build tool and you have no choice, you need to factor in additional amount of development time dealing with its build file: the pom.xml. Any new additional feature eats up unexpected...

GroovyBlogs.org 717 days ago

JDBCRowSet and JDBCRowSet Event Handling [video]

 Mark As Read    

In the video below, we take a closer look at what JDBCRowSet and JDBCRowSet event handling are. This tutorial includes examples. Let's get started!

What Is HttpSession in Servlets?

 Mark As Read    

In the video below, we take a closer look at HttpSession in Servlets and HttpSession Attribute example. Let's get started!

4 Types of JDBC Drivers [video]

 Mark As Read    

In the video below, we take a closer look at JDBC-ODBC Bridge, Native-API, Network Protocol, and Thin Drivers. Let's get started!

Spring Transaction Debugging in Prod With Lightrun

 Mark As Read    

Spring makes building a reliable application much easier thanks to its declarative transaction management. It also supports programmatic transaction management, but thats not as common. In this article, I want to focus on the declarative transaction management angle, since it seems much harder to debug compared to the programmatic approach. This is...

Processing Images in Java With OpenCV and Quarkus

 Mark As Read    

If you are into computer vision, you probably are familiar with OpenCV. It's an amazing library that has almost everything one needs to do 2D and 3D processing and much more. Gesture recognition, face detection, Motion tracking, think of anything related to image processing and OpenCV can be your goto. It's based on the BSD license, so you can just...

Slowness in Java Application Due To Increased FullGC Events: G1GC

 Mark As Read    

In this blog, we will see one of the issues and solutions which I found in one of our production servers: our Java application became slow due to more GC pauses. I will explain a particular approach that can be one of the reasons for initiating more GC pauses. To understand this article, one must have basic knowledge of the G1GC algorithm of Java ...

What Is Send Redirect in Servlet With Examples

 Mark As Read    

In the video below, we take a closer look at Send redirect in Servlet with examples and Java servlets. Let's get started!

JDBC Scrollable ResultSet and JDBC Updatable ResultSet [video]

 Mark As Read    

In the video below, we take a closer look at the JDBC scrollable ResultSet and JDBC updatable ResultSet with examples. Let's get started!

Oracle DB Server Installation | Oracle SQL Developer - Connect to the User

 Mark As Read    

In the video below, we take a closer look at Oracle DB server installation and connect to a user using Oracle SQL Developer. Let's get started!

Debugging jsoup Java Code in Production Using Lightrun

 Mark As Read    

Scraping websites built for modern browsers is far more challenging than it was a decade ago. jsoup is a convenient API that makes scraping websites trivial via DOM traversal, CSS Selectors, JQuery-Like methods, and more. But it isnt without its caveat. Every scraping API is a ticking time bomb. Real-world HTML is flaky. It changes without notice s...

Speeding Up Large Collections Processing in Java

 Mark As Read    

According to The Britannica Dictionary, the term collection designates a group of interesting or beautiful objects brought together in order to show or study them.

How to Implement a Voice Changer Capability

 Mark As Read    

Research has shown that our voice is often an indicator of our personalities, and this is why we're so fascinated with changing our voice to make it sound more fun and uplifting in, for example, videos and live streams. As a mobile developer, I have implemented a voice changing function into my own app, which you can try out in my demo. This functi...

Instancio: Random Test Data Generator for Java (Part 1)

 Mark As Read    

By now hopefully all of us, developers, have embraced unit testing. Good test coverage of our codebase, combined with that green checkmark after running the tests, gives us a warm fuzzy feeling that everything is in order. While we all like that warm fuzzy feeling, writing tests usually requires some plumbing. This is the "boring part", where you c...

Spring Boot: Nice and Easy [Video]

 Mark As Read    

Ever looked for a comprehensive intro to Spring Boot that is fun and entertaining at the same time? Then have a look at this brand-new episode of the "Marco Codes" YouTube channel: Spring Boot - Nice & Easy. In this video, we will build a tiny Google Photos-like clone with Spring Boot. Additionally, along the way, you'll learn plenty about Spri...

JDBC Batch Processing - Introduction and Demo Using Statement and Preparedstatement

 Mark As Read    

In the video below, we take a closer look at JDBC batch processing, introduction, and demo using Statement and PreparedStatement. Let's get started!

Visualizing Thread-Safe Singletons in Java

 Mark As Read    

Working in Java, we seldom have to create our handwritten singletons, for the existing frameworks like Spring creates these objects for us and maintains them. In enterprise applications, we get into framework disposal and let them create the singletons. But it is interesting to know the singleton pattern and visualize the famous pattern in a multi-...

How to Configure VS Code for Java

 Mark As Read    

I recently shifted from IntelliJ IDEA Ultimate to Visual Studio Code (VS Code) and I have no regrets! VS Code is highly customizable and fast. It stores your settings in the cloud so you dont have to worry about configurations when you move to a different machine. As expected, it has support for Java, Git, SQL, Spring Boot, and many other languages...

Decoding the Merits of MEAN Tech Stack for Your Organization

 Mark As Read    

This decade has witnessed numerous shifts in the technological domain resulting in quick and sustainable advancement. One of such advancements in the arena of technology is the MEAN tech stack which resonates with a pioneering version of web development. Being an abbreviation of MongoDB, Express.js, AngularJS, and Node.js, MEAN stack stands to syn...

Java Bytecode Simplified: Journey to the Wonderland (Part 1)

 Mark As Read    

There are two ways to see a thing. One, see it as it appears to us; two, see it and appreciate it. For example, we get light when we switch on a lightbulb. We press the button and then get busy with our life. Pretty simple, but boring. On the other hand, if we know how the light gets energy from an electrical power grid far from our home with wires...

Designing Human-Targeted Random IDs

 Mark As Read    

Designing Human-Targeted Random IDs NOTE: We don't deal here with technical IDs used as primary keys in relational databases. See my previous article here if you seek a great way to generate them. Context During one of my recent projects, I have been asked to design a scheme of IDs highly usable by humans. The business requirement was mainly to cre...

Connect to Oracle DB Using JDBC Program

 Mark As Read    

In the video below, we take a closer look at Oracle DB server installation | Oracle SQL Developer | Connect to Oracle DB using the JDBC program. Let's get started!

Extend Kubernetes Service Discovery With Stork and Quarkus

 Mark As Read    

In traditional monolithic architecture, applications already knew where the backend services existed through static hostnames, IP addresses, and ports. The IT operation team maintained the static configurations for service reliability and system stability. This Day 2 operation has significantly changed since microservices began running in distribut...

How to Manage Your JDKs With SDKMAN

 Mark As Read    

In this blog, you will learn how to manage several Java Development Kits (JDKs) on your Linux system using SDKMAN. Besides JDKs, several other SDKs can be managed by means of SDKMAN. Enjoy! 1. Introduction Some time ago, a colleague of mine showed me how he used SDKMAN and how easy he could maintain different versions of JDKs, Maven, etc. on his Li...

Benefits of Setting Initial and Maximum Memory Size to the Same Value

 Mark As Read    

When we launch applications, we specify the initial memory size and maximum memory size. For the applications that run on JVM (Java Virtual Machine), initial and maximum memory size is specified through "-Xms" and "-Xmx" arguments. If Java applications are running on containers, its specified through "-XX: InitialRAMPercentage" and "-XX: MaxRAMPerc...

JDBC: Clauses, Sorting Data, Create and Drop Database, and Table Examples

 Mark As Read    

In this video tutorial, we take a closer look at JDBC Insert, Update, Read, Delete, Where, and Like clauses, as well as sorting data, create and drop database, and table examples. Let's get started!

What Are Java Servlets and Servlets Basics? | Servlets Life Cycle | How Servlets Works

 Mark As Read    

In the video below, we take a closer look at Java servlets and servlets basics along with Servlets Life Cycle. Learn how Servlets work etc. Let's get started!

Spring vs. Jakarta EE: Injecting Dependencies

 Mark As Read    

The article Spring vs. Jakarta EE: Defining Injectable Beans addressed the first half of Dependency Injection in Spring and Jakarta EE: the definition of beans that shall be injected. The current article discusses the details of how these beans can be injected. This forms the second part of the dependency injection process, which can be further bro...

Logging Best Practices MDC, Ingestion, and Scale

 Mark As Read    

I don't care about religious wars over "which logger is the best". They all have their issues. Having said that, the worst logger is probably the one built "in-house"... So yes, they suck, but re-inventing the wheel is probably far worse. Let's discuss making these loggers suck less with proper usage guidelines that range from the obvious to subtle...

Debugging Collections, Streams, and Watch Renderers

 Mark As Read    

In the last two ducklings, I finished the extensive discussion on breakpoints and switched my focus to the watch area. In it, we have several amazing and lesser-known tools that let us build insight into our running application. Being able to tell at a glance if something works correctly is crucial for many applications. This is very important for ...

Java Serverless Functions With Quarkus Quick Starts

 Mark As Read    

Are you looking for the shortest path or cheatsheet to bring your Java application into a serverless platform based on Kubernetes? Perhaps you don't have enough time to stand up relevant infrastructure and configure settings for both the application and the platform. This article is a guide to developing Java serverless functions using a Quarkus qu...

JDBC Create Database and Database Example

 Mark As Read    

In the video below, we take a closer look at Create database and Drop database examples in JDBC. Let's get started!

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