The recommended way to provide dependency injection for instances outside of Spring is to use the AspectJ-based solution you mentioned. To my knowledge, Hibernate-related classes have been canceled in favor of the general approach described here .
Also note that you do not need @Configurable if you are using AbstractInterfaceDrivenDependencyInjectionAspect . As you said, you will need to use AspectJ either for download or at compile time. As a benefit, you get dependency injection for “corner cases” such as deserialization, as well as with this approach.
For a detailed example of how the templates offered by Ramnivas can be implemented and integrated, see here .
source share