Gradle Tutorial: Crash Course [Video] | Mark As Read |
Ever looked for a comprehensive tutorial for Gradle that is fun and entertaining at the same time? In this video tutorial below, you'll learn how to use Gradle like a professional. Cover topics i...
Groovy Goodness: Closed And Open Ranges | Mark As Read |
Groovy supports ranges for a long time. But Groovy 4 adds a new feature for ranges and that is the support for open (exclusive) ranges at the beginning of a range. Open means the number that defines t...
Get Absolute Path To An SDK With SDKMAN! | Mark As Read |
SDKMAN! has a home command that will return the absolute path of any SDK we pass as argument. This can be usefull in scripts where we need the absolute path to a SDK. We can specify the name of the SD...
Groovy Goodness: Creating TOML Configuration With TomlBuilder | Mark As Read |
Groovy 4 introduced support for TOML configuration file. In a previous post we already learned how we can parse TOML content. In this post we will see we can use a builder syntax to create TOML conten...
Top 7 Features in Jakarta EE 10 Release | Mark As Read |
Java EE was the dominant force behind all the enterprise development in Java. Lately, it was renamed Jakarta EE, transitioning from JCP to Eclipse Foundation. This transition opened the door to open governess, open compatibly testing (earlier Technology Compatibility Kit -TCK was closed source), and of course, open-source. That means no specific ve...
Javas Encapsulation - When the Getter and Setter Became Your Enemy | Mark As Read |
Encapsulation is the key to a good code design, but how to archive it? Java developers automatically think about putting getter and setter in a private attribute. The encapsulation is a wrapping up of data under a single unit. It is the way to protect the data with OOP and avoid any security issues. The main idea around encapsulation is the data's...
Groovy Goodness: Reading TOML Configuration | Mark As Read |
Since Groovy 4 we can parse TOML configuration data into a Map. Once the TOML data is transformed into the Map we can use all possibilities in Groovy to lookup keys and their values in maps. For examp...
Groovy Goodness: Get Row Number In GINQ Result Set | Mark As Read |
GINQ (Groovy-INtegrated Query) is added since Groovy 4. With GINQ we can query in-memory collections with SQL like statements. If we want to get the row numbers for each row in the query result set we...
Groovy Goodness: Using The Switch Expression | Mark As Read |
In a previous (old) post we learned how Groovy supports different classifiers for a switch case statement. Since Groovy 4 we can use switch also as an expression. This means the switch statement retur...
DataWeave Delight: Check Type Of Value | Mark As Read |
To check if a value is of a certain type in DataWeave we must use the is operator. We must specify the type after the is operator and the value before the is operator. For example to check if the valu...
Vaadin Apps as Native Executables Using Quarkus Native | Mark As Read |
JVM is a monster in a good way. Its architecture and especially the super-optimized just-in-time-compiler (JIT) help Java byte-code apps to run at a performance that makes startups rewrite their entire software when they grow up. But this amazing piece of engineering doesnt come without a price. Even small JVM applications are known to eat up a lo...
Getting Started With RSocket Kotlin | Mark As Read |
RSocket is a transport protocol designed for reactive applications. More information on RSocket can be found on their website, leaving me to focus on writing about how RSocket and Kotlin can be combined. RSocket has several libraries written in various languages that implement the RSocket protocol. For Kotlin, this comes as an extension for Ktor (a...
Understand Source Code Deep Into the Codebase, Locally and in Production | Mark As Read |
Say you have a new code base to study or picked up an open-source project. You might be a seasoned developer for whom this is another project in a packed resume. Alternatively, you might be a junior engineer for whom this is the first real project. It doesnt matter!
Spring, IoC Containers, and Static Code: Design Principles | Mark As Read |
In this article, I would like to discuss the inversion of control patterns, static code (can be legacy or newly created) within an IoC framework like spring, and the issue of wiring utility methods in static code inside the IoC framework. Static Methods For example, we have an HttpUtils class with inside a bunch of static methods. Should we remove ...
The Power of Enum: Make Your Code More Readable and Efficient [Video] | Mark As Read |
Like any other language, Java has the enum feature that allows us to enumerate items. It is helpful to list delimited items in your code, such as the seasons. Regarding the readability of code, it is better and cleaner than using constant codes such as int. It avoids mistakes, such as an invalid number or a value the system does not support. Once w...
What I Miss in Java, the Perspective of a Kotlin Developer | Mark As Read |
Java has been my bread and butter for almost two decades. Several years ago, I started to learn Kotlin; I never regretted it. Though Kotlin compiles to JVM bytecode, I sometimes have to write Java again. Every time I do, I cannot stop pondering why my code doesn't look as nice as in Kotlin. I miss some features that would improve my code's readabil...
Remote Debugging and Developer Observability | Mark As Read |
In this post, we'll go over remote debugging debugging production with developer observability tools and debugging asynchronous code, which presents its own unique challenges! This is actually material from four separate videos because I wanted to pool some ideas together into a single blog post, and the asynchronous stuff got pulled in. So withou...
The Trouble with Harry time loop | Mark As Read |
I saw The Trouble with Harry (1955) a while back and it didn't have a big impression on me. But recently I rewatched it and was amazed at how odd time seems to flow, how somewhat confused people are, as if they have memory problems.This review goes into detail about the movie, but I wanted to focus on a single riddle in the movie. It's this exchang...
Delegating JWT Validation for Greater Flexibility | Mark As Read |
In my opinion, the purpose of all software applications that have been created so far, are being and will be developed should primarily be to make humans' day-to-day activities easier to fulfill. Humans are the most valuable creations, and software applications are great tools that at least could be used by them. Nowadays, almost every software pro...
Kotlin vs Java: Which One Is the Best? | Mark As Read |
Through todays blog title, you must have got a hint. We will see the basic differences between Kotlin vs. Java in todays blog. We will make all the comparisons on Java vs Kotlin.
JVM C1, C2 Compiler Thread: High CPU Consumption? | Mark As Read |
C1 and C2 compiler threads are created by a Java virtual machine to optimize your applications performance. Occasionally these threads will tend to consume high CPU. In this post, lets learn a little more about C1 and C2 compiler threads and how to address their high CPU consumption. After reading this post, terminologies like Hotspot JIT, C1 compi...
DBCP Connection Pooling | Oracle - MySQL | Mark As Read |
In the video below, we take a closer look at DBCP Connection Pooling. Learn more about Oracle - MySQL, Tomcat, Java Servlets, and JDBC. Let's get started!
Making Your Life Easier Around Data With Java and Jakarta EE | Mark As Read |
There is no doubt about the importance of data around the application. We often talk about a stateless application, and it is the data where we delegate the state of the application. If the architecture is the mind, the information is the heart. This article will cover more about the next steps of Jakarta EE around the world of data and its techniq...
Build a Quarkus Reactive Application Using Kubernetes Secrets | Mark As Read |
Many organizations have security policies in place that dictate how to store sensitive information. When you're developing applications for the cloud, you're probably expected to follow those policies, and to do that, you often have to externalize your data storage. Kubernetes has a built-in system to access external secrets, and learning to use th...
How Java Apps Litter Beyond the Heap | Mark As Read |
As Java developers, were no strangers to the concept of garbage collection. Our apps generate garbage all the time, and that garbage is meticulously cleaned out by CMS, G1, Azul C4, and other types of collectors. Basically, our apps are born to bring value to this world, but, nothing is perfectincluding our apps that leave litter in the Java heap. ...
Cleaning up the Java illumos port | Mark As Read |
This was originally a twitter thread, this is a more permanent expanded version.When support for Solaris and SPARC was removed from Java, the code that was removed fell into a number of distinct classes, not all of which are equally valuable.Solaris platform supportFirst, there's the support for Solaris (and thus illumos) as an operating system (th...
On Architects, Architecture, and Failures | Mark As Read |
Lets consider two things: 1.) Bad things happen to good people
Reactive Programming: The Steps To Integrate It Into Your Application | Mark As Read |
According to Wikipedia, reactive programming (Rx) "is a declarative programming approach in computers that deals with data streams and change propagation. This paradigm allows users to easily specify static (e.g., arrays) or dynamic (e.g., event emitters) data streams, as well as indicate that an inferred dependence exists inside the related execut...
Why and How Java Continues to Be One of the Most Popular Enterprise Coding Languages | Mark As Read |
Java was created over 25 years ago, and it is still one of the most popular programming languages. This article will present an overview of how Java has grown into today's complex system and why it continues to remain a contemporary development environment. According to The PYPL Popularity of Programming Language Index, in February 2022, Java was t...
Instrumenting a JavaScript Application for OpenTelemetry, Part 1: Setup | Mark As Read |
A lot of what you read around the topic of Observability mentions the benefits and potential of analyzing data, but little about how you collect it. This process is called instrumentation and broadly involves collecting events in infrastructure and code that include metrics, logs, and traces. There are of course dozens of methods, frameworks, and t...
DBCP Connection Pooling | Oracle | MySQL | Tomcat | Java Servlets | JDBC | Mark As Read |
In the video below, we take a closer look at DBCP connection pooling. Let's get started!
When Disaster Strikes: Production Troubleshooting | Mark As Read |
Tom Granot and I have had the privilege of Vlad Mihalceas online company for a while now. As a result, we decided to do a workshop together talking about a lot of the things we learned in the process. This workshop would be pretty informal ad-hoc, just a bunch of guys chatting and showing off what we can do with tooling. In celebration of that, I...
How to Streamline the Customer Experience with Monads in Kotlin | Mark As Read |
At my company, we see a lot of SDKs and Swagger-generated clients that could throw exceptions at any time. This could be a fault in our logic, or it could be a fault with some 3rd party SDKs that have no rhyme or reason to how their exception handling works. But either way, when our customers want to fetch a Git commit history for a service, they d...
Better Scaffolding with jQuery - Part I | Mark As Read |
Grails scaffolding works great out of the box. Today I want to see how we can improve adding data to the many side of a one-to-many relationship using jQuery, jQueryUI's Dialog, and some Ajax. &...
Better Scaffolding with jQuery - Part I | Mark As Read |
Grails scaffolding works great out of the box. Today I want to see how we can improve adding data to the many side of a one-to-many relationship using jQuery, jQueryUI's Dialog, and some Ajax. Using the same domain objects as my previous article I want to show how we can add Reminders to an Event without needing to navigate to a new page, assumin...
Get Started With Cloud-Native Decision Automation on Quarkus | Mark As Read |
This article will guide you through creating a decision application based on Quarkus and trying out the business modeling in VSCode. You will experience hot reload of business assets during development and validate your decisions. Development of decision automation solutions has never been easier thanks to DMN (Decision Model and Notation), Kogito...
Maven - finer control of running tests . . . | Mark As Read |
There should always be something new to learn everyday. Otherwise, life is boring. In software development, it is even more boring if we don't explore to learn anything new.Maven is popular open sourc...
Farewell to the 2021-2022 Ski Season | Mark As Read |
I had a lot of fun this ski season, but I didn't make it to the mountains as much as I thought I would. I bought both the Epic and Ikon passes with high hopes at the beginning of the season. The rest of the family had Ikon. The ski season started for me on Nov 24, 2020 with a backyard cross-country ski. It took me another month until I ventured up ...
How to Design a CRUD Web Service for Inheritable Entity | Mark As Read |
Introduction Sometimes we need to develop a web service that provides CRUD (Create, Read, Update, and Delete) operations for an entity that supports inheritance. However, the traditional layered architecture (controller layer, service layer, and repository layer) is not enough to have a clean and scalable code. Indeed, if we put the business logic ...
Servlets Listeners Introduction and Examples | Mark As Read |
In the video below, we take a closer look at servlets listeners' introduction & examples. Let's get started!
Pattern Matching for Switch | Mark As Read |
According to some surveys such as that of JetBrains, version 8 of Java is currently the most used by developers all over the world, despite being a 2014 release. What you are reading is the one in a series of articles titled Going beyond Java 8, inspired by the contents of my books Java for Aliens (English) and Il nuovo Java (Italian). These artic...
Datafaker: An Alternative to Using Production Data | Mark As Read |
As developers or testers, we frequently have the need to test our systems. In this process, be it unit testing, integration testing, or any other form of testing, the data is often the leading and deciding factor. But getting access to good data isn't always easy. Sometimes the data is quite sensitive, like medical or financial data. At other times...
Instancio: Test Data Generator for Java (Part 2) | Mark As Read |
In part 1, we introduced Instancio and how it can be used to automate data setup in unit tests. To recap, Instancio is a library that automates data setup in unit tests, with the goal of reducing manual data setup. More specifically, it accepts a class (or a "type token") as an argument and returns a fully-populated instance of the class. Sticking ...
Debugging Java Collections Framework Issues in Production | Mark As Read |
The Java Collections Framework was a huge leap forward when it was introduced as part of Java 2 (JDK 1.2). Thanks to the included collection classes we finally moved beyond the limits of Vector and Hashtable to more mature and generic solutions. With the introduction of Streams and functional concepts in Java 8, the framework took everything to the...
Which JVM Version Is the Fastest? | Mark As Read |
Benchmarks This article will use open-source Chronicle Queue to exchange 256-byte messages between two threads whereby all messages are also stored in shared memory (/dev/shm is used to minimize the impact of the disk subsystem). Chronicle Queue is a persisted low-latency Java messaging framework for high-performance and critical applications. Bec...
Debugging the Java Message Service (JMS) API Using Lightrun | Mark As Read |
The Java Message Service API (JMS) was developed by Sun Microsystems in the days of Java EE. The JMS API provides us with simple messaging abstractions, including message producer, message consumer, and so on. Messaging APIs let us place a message on a queue and consume messages placed into said queue. This is immensely useful for high-throughput s...
Toying With Kotlins Context Receivers | Mark As Read |
Kotlin added the idea of Context Receivers in version 1.6.20. In this post, I'd like to toy with them to understand how useful they can be. Note that if you want to play along, you'll need to compile with the -Xcontext-receivers flag.
What Are Cookies in Servlets? | Mark As Read |
In the video below, we take a closer look at Cookies in Servlets with examples. Let's get started!
Java: Why Core-to-Core Latency Matters | Mark As Read |
Last year we had a global shortage of microchips; today, I feel there is a worldwide shortage of software developers. Like many other software companies, Chronicle Software is rapidly expanding and interviewing candidates. We usually ask candidates to demonstrate a good knowledge of core Java, and then we cover slightly more advanced concepts, such...
What Is URL Rewriting? | Java Servlets | Mark As Read |
In the video below, we take a closer look at URL rewriting with demo and Java servlets. Let's get started!
- 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.
Don’t have an account yet?
- Customize your settings
- Edit how your blog displays
- Add or remove blogs you read. Sign Up.
About Us
OnlyJava is your source for all your Java news.
Know of a Java blog that we're missing? Let us know! |