You say...
...When it is killed using kill -3, the app doesnt stop cleanly and the...
Usually a Java app does not terminate by using Kill -3.
Kill SIGQUIT (-3) is used to take a Java thread dump.
Try using kill -9 or -15
If some special signal handling hook is enabled, this behaviour could change.
EDIT:
Also, a controlled, clean Java app shutdown is originated within the app.
Have a look at How to gracefully handle the SIGKILL signal in Java