I am writing for my diploma thesis an aspect oriented persistence layer. I use Hibernate for the persistence layer and add aspects to it. My goal is that the programmer only need to declare a java object as persistent. Other things such as mapping and database access code will be automaticaly added from the aspects. The problem I have now is the following: I am loading the persistent classes at runtime. After loading the class i generated the mapping for it and add the mapping to the hibernate configuration at runtime. The problem now is, if I load an subclass of an class that is already in configuration, I have to remove old mapping and replace it with new one which additionaly contains the subclass block.
I can not extend the Configuration and Binder classes, because Binder is final. What could be the alternative way to achieve this?
listopad
|