You may utilize AspectJ in your application. I can't help you any further on how to configure and setting it up