-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement bytecode enhancement for zooActivateRead()/zooActivateWrite() and the rest #62
Comments
I just created a classfiletransformer for that exact purpose using javassist. It could probabely be done with bytebuddy too quite easily. |
Sorry for the late reply, I'm quite with other stuff at the moment. Your classfile transformer looks very useful. I suppose it could also be used to insert the super-class ZooPC or PersistenceCapableImpl? I think javassist has a setSuperclass() method. The getter/setter could also be fine-tuned to load/mark-dirty the objects only if the an attribute is actually accessed/modified. |
The current implementation is not yet complete. I plan to implement the super class injection as well. Basically you can inject whatever functionality you want into the bytecode - except lambdas! The goal behind spOt is to implement a rapid-application-development framework - similar to the SAP hybris stack (I'm a professional hybris dev). The framework provides a rich domain model (including the possibility to extend or modify existing models), services to connect to various 3rd party systems, convenience functionality (l10m, i18n, solr integration, generic entity management interface) and a (more or less) fully implemented shop interface). Currently spOt provides some domain models including the functionailty to alter them and add new ones. This is done using xml notation (https://raw.githubusercontent.com/mojo2012/spot-framework/master/spot-core/src/main/resources/core-itemtypes.xml). Unfortunately none of the major ORM mappers (I tried hibernate, eclipselink, datanucleus, ebean) work as reliable and as functional as Hybris. All of them have some downsides, like relying a lot on manually written code, are not threadsafe etc. So I was looking for better suited alternatives and landed here ;-) Currently ebean and zoodb are my two favorite frameworks to use for persistence. If your requirements are not too far from what I need, I will try to implement them of course. |
Thanks for the explanation, that sounds very cool (even though I never used SAP hybris or SAP in general). |
Could be done manually (!??!), with ASM, or with a high level library such as
CGLIB (https://github.com/cglib/cglib) or javassist (http://www.csg.ci.i.u-tokyo.ac.jp/~chiba/javassist/).
See also http://mydailyjava.blogspot.no/2013/11/cglib-missing-manual.html
The text was updated successfully, but these errors were encountered: