Girish Gaurav Agarwal

Author's posts

Manage Multiple JDKs in Linux: Default & Switch Guide

In the dynamic world of Java development, you often need to manage multiple JDKs in Linux simultaneously. Indeed, this is crucial for: Ensuring Compatibility: Testing your applications across different JDK versions. Supporting Legacy Projects: Maintaining projects that rely on specific, older JDKs. Facilitating Multi-Project Development: Handling projects with diverse JDK requirements. Therefore, this guide will …

Continue reading

Streamlining Java Apps: Effortless Service Management with systemd in Ubuntu

Tired of wrestling with manual start/stop commands for your Java apps as systemd services in Ubuntu? In today’s streamlined Ubuntu environments, systemd stands as the quintessential service manager. Therefore, let’s delve into the process of running your Java apps as systemd services in Ubuntu, simplifying management and ensuring robust automatic restarts. Imagine the all-too-familiar scenario: …

Continue reading

Streamline Your Java App: Running it as a Service with Upstart in Ubuntu

Want to simplify managing your Java application as a service with Upstart in Ubuntu? Hi, one day, while I was deep into my Java project, I found myself in a repetitive cycle of debugging. Specifically, I’d tweak configuration files, restart the application, and then repeat the process. To stop my Java application, I’d hunt down …

Continue reading

Beyond Tables: Diving into the NoSQL World with MongoDB

The digital realm is in perpetual motion, and consequently, traditional relational databases often struggle to keep pace with the demands of modern applications. Therefore, if you’re building dynamic, scalable applications that grapple with diverse and rapidly evolving data, then it’s time to explore the world of NoSQL, where MongoDB provides a compelling and approachable entry …

Continue reading

Persist/Share tomcat session state between multiple instances

In this article, I am going to explain how can you persist/share tomcat session state between multiple instances, and improve your site performance. Persisting your session state outside of the tomcat servers is a very common and recommended configuration for large scale websites. This is usually done in pursuit of an architecture style called Shared …

Continue reading

Replication aware JDBC connection in java and MySQL

Hi, recently I was reviewing the code a project which was having some database issues, while the review I found that the project environment was setup with the MySQL with one master node and two slave node, and I was surprised that in the code they have used the default JDBC driver for database connectivity which …

Continue reading

Helpful bash aliases for any Unix/Linux user

Aliases can be very helpful for any linux user, and after writing my last post “How to create custom command in Unix/Linux” I want to share these helpful bash aliases for any unix/linux user. List in long format alias ll=’ls -l’ Clear the screen alias c=’clear’ Clear the history and screen alias hcl=’history -c; clear’ …

Continue reading

How to create custom commands in Unix/Linux

Few days ago one of my friend told me that the work on linux is so difficult, because he didn’t remember the complex commands of linux and every time when he want to do some debugging on their linux server he always need to google some commands first, so I’ve decided to write this post “How …

Continue reading

How to enable garbage collection logging (GC logs) in Apache tomcat

In this article I’ll provide information about how to enable garbage collection logging (GC logs) in Apache tomcat. GC logs are very important when you are debugging an application. GC logs helps to analyse how your program uses the memory. GC logs also helps to find how often garbage collector cleans the memory for unused objects. …

Continue reading

Send error logs through email using log4j SMTP appender

recently I was reading about Apache log4j appenders. and found log4j SMTPAppender which sends an e-mail when a specific logging event occurs, typically on errors or fatal errors. That time I got idea to write this post to send error logs through email using log4j SMTP appender. for a developer error logs are very important. and …

Continue reading

Load more