Re: [Objectbridge-jdo-dev] Instrumentation/Enhancement pros and cons
Brought to you by:
thma
From: Thomas M. <tho...@ho...> - 2002-03-04 17:48:15
|
Hi again George, g wrote: > Hi all, > I have been reading up on the controversy over some of JDO's > features, and have reaqd some of the postings on this list regarding JDO. > I understand and agree with the concerns of some people who have found > that classees that have been enhanced through byte code instrumentation > may behave unpredictably, for example when debugging information is lost, > mangled, or not properly inserted into an instrumented class file. > The seemingly mysterious nature of this instrumenting process does evoke a > sense of worry, but I have not seen any discussions of what the > alternatives are. > > Have we as a group had any discussion about how we might avoid choosing > the abovementioned approach? Perhaps a compromise like inserting just > enough code into the enhanced class to provide proper identity attributes, > which would enable us to use metadata accessed from behind the facade of > the PersistenceManager? This has been one of my first ideas. I thought that something like the ObjectEnvelope as we are using it in the ODMG impl might work as an adapter between business objects (with little or no enhancements) and the JDO implementation that needs a lot of navgitaional etc. infrastructure for each persistent instance. I thought that this was a legal approach as there are comments in the JDO docu saying that one is *not* forced to do byte code enhancements. But there are other parts in the spec clearly stating that we must 1. enhance our classes. They must even be enhanced in a way that they may well work with other JDO implementations 2. Our Jdo Implementation must be able to use classes enhanced by other JDO vendors! IMHO these rules are very strict and there is not much space for argumentation. (Of course there are lots of people saying that the JDO spec is not rigid enough to provide this kind of interoperability of enhanced classes). I hope that it will be possible to use the byte code enhancer from the JDO RI ("reference enhancer"). cu, Thomas > > I have some experience with the BCEL byte code libraries, and have some > code that traverses compiled code and can do analysis or make changes. > This code uses BCEL. It's pretty straightforward. > > Thanks, > > George Coles > > > _______________________________________________ > Objectbridge-jdo-dev mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-jdo-dev > > > > |