Skip to main content


Showing posts from 2015

Reload properties files without need to restart application

Properties files are the location where you most probably stores your configuration values and other that does not changes over time.

What if you have encountered with situation where you need to change your properties file and your application very large to restart/build ?

Apache has provides very beautiful util where you can reload properties file without need to restart your application.

It is part of Apache commons configuration package.

Your code will look like

I have removed try-catch block are removed for simplicity.
Below line reads your properties file from class-path

PropertiesConfiguration configuration = new PropertiesConfiguration("");

Here is the main part of this utility where we are specifying time period after which property file will be reloaded if it is changed. Time period is in milisecond.

configuration.setReloadingStrategy(new FileChangedReloadingStrategy());

Why FileChangedReloadingStrategy ?

   It looks for last modified date of p…

Windows : Kill the Process which is using your valuable Port

If you are doing programming , this is frequent problem. If you know your port suppose 1099 is the port that already in use.
Follow the following steps  -

open cmd promptenter command   > netstat -a -o -nfind out the Process id (PID) which is using your portenter command taskkill /F /PID piddone.
Note :  -a    -   show all connection and listening ports -n    -   show address and port in numeric form -o    -   show process id /F    -   forcefully kill


Understanding Spectrum allocation in Layman's way

The spectrum allocation means giving license to telecom operator like Vodafone, Airtel to use particular frequency in particular circle i.e. states.

example : if you ever tuned Mirchi 98.5FM to listen songs, then actually you are setting to 98.5 frequency which is particularly allocated to Mirchi FM. That means Mirchi FM sending frequencies at 98.5MHz. No other player is allowed to send frequency at 98.5Mhz because it is already allocated to  Mirch FM and to avoid interference.

Lets go back to our topic, in telecom,  actually different spectrum allocated to difference bands.

example : 2G at 900 MHz to 1800 MHz
          3G at 2100 MHz
          4G at 2300 MHz
          4G LTE at 600 MHz

With high frequency, more cycle per second means more bits are transferred.But you increases frequency , your speed and transferred increase but you coverage reduces. That why when you are using 3G at home , sometimes speed decreases though range is full and even you can call to other.

Simple say is t…

How internet works - Leyman's way

You are reading this blog means you know the internet.But don't you have question about how internet works? If you are non-technical person, then this image will help to understand how internet works.

MVC - Architectural Pattern in Leyman's way

Model–view–controller (MVC) is a architectural pattern most used in Web Based Application but it is not restricted to them.

1. Model - it is independent logic (domain) of application. it includes data, rules.
2. View  - it is representation to user.
3. Controller - it accepts input from user.We may called it as interaction.