Adding a timeout to JDBC queries might be useful in many use cases. It’s also very simple, just one line, let see how to do it.
Continue readingTag: Java
The Infamous No Suitable Driver Found For JDBC and how to fix it
The exception java.sql.SQLException: No suitable driver found for jdbc: is thrown when the driver is not in the classpath, or is not registered before getting the database connection.
Continue readingGuide of Virtual Threads – Lightweight threads in Java
Virtual Threads allows to have lightweight threads with a backward-compatible approach and supported in multiple API of the JDK. Let’s learn more about it…
Continue readingDONT be afraid of using var in Java
DO NOT BE AFRAID OF USING VAR, use it wisely, use it to reduce verbosity, make code readable and enforce other best practices in naming. Instead of prohibiting its use, let’s use correctly.
Continue readingDesign Patterns in Modern Java
Let’s review some of the design or programming patterns we can use in our code taking advantage of the Modern Java.
Continue readingSpring Framework 6 and Spring Boot 3 Released
A new generation of Spring Framework has been released, after 5 years with Spring Framework 5.x, in November 2022, Spring Framework 6 has been released. […]
Continue readingJava – Local variable Type Inference
Let’s review some considerations when using the Local variable type inference Java. It basically allows the developer to use the word var instead of the type when declaring local variables (into methods), the compiler is able to infer the type from the right side of the assignment.
Continue readingMicroProfile overview
MicroProfile is an open-source initiative managed by the Eclipse Foundation. MicroProfile optimizes Enterprise Java for micro-services, providing a lot of cloud native features
Continue readingTry Catch Block in Java
In Java, the try/catch block is the alternative to handle exceptions properly and avoid the application to crash. It has useful features like multi check, finally or try-with-resources statements.
Continue readingPKCS 11 Provider across multiple Java versions
A cross version approach to create SunPKCS11 providers to interact with smart cards. Supports version Java 5 to Java 18 at this moment.
Continue reading