About Soroosh Sarabadani
Spring framework has several modules that provide a range of services, many of these modules Can work just for managed Objects (Spring Beans) Some examples about these services are Dependency Injection, Transaction Management, AOP Services , etc. Everything is fine when we are using Objects as Services, so they are managed by by Spring with a specific scope. But sometimes we need our domain objects have these services. Usually domain objects are created with new keyword so they cannot be managed by default with spring.
In my Previous post (How to use Events in Spring 3.x) we had a domain object with name Order. for decoupling between object we used events. But just Managed beans can raise event in Spring framework (Probably every Framework you know and has this feature).
Spring introduce an annotation with name Configurable. Using this annotation on our domain objects make them Managed by spring.
But how does it work: Configurable for its purpose needs AspectJ Compiler, your class needs Byte Code Enhancement in Compile Time or Load Time until can satisfy your requirements.
Source : http://www.javacodegeeks.com/2013/09/spring-configurable-magic.html