RE: [Objectbridge-jdo-dev] Instrumentation/Enhancement pros and cons
Brought to you by:
thma
From: g <it...@ge...> - 2002-03-04 17:49:51
|
You are correct, Jim, I looked over the spec again. I guess Thomas' post that I read that contemplates not utilizing enhancement implies that we would be willing to selectively conform to the spec. It does seem like the kind of feature that can be added or subtracted to the project without a great deal of disruption. George On Mon, 4 Mar 2002, Jim Hughes wrote: > > Hi. My name is Jim Hughes, and I hope to be able to contribute in some > way to this project. > > Anyway, my understanding is that if we do enhancement, the way we do it > is pretty well specified, if we want to comply with the spec, that is. > Classes need to be modified to implement PersistenceCapable, etc. The > spec even states that enhanced classes must be portable between > different JDO impls, which really constrains us. E.g., we couldn't do > this: > > // way pseudo! > package org.objectbridge.jdo; > interface PersistenceCapable extends javax.jdo.PersistanceCapable > { > void persistYourself() ; > } > > public class PersistenceManager implements javax.jdo.PersistanceManager > { > void makePersistent(Object o) > { > PersistenceCapable pco = > (org.objectbridge.jdo.PersistenceCapable)o; > pco.persistYourself(); > } > } > > because this code would not work with PersistenceCapable class enhanced > by other impls. > > I would be interested in working on the enhancer. Is anyone working on > it yet? > > Jim > > > -----Original Message----- > From: obj...@li... > [mailto:obj...@li...] On Behalf Of g > Sent: Monday, March 04, 02 10:48 AM > To: obj...@li... > Subject: [Objectbridge-jdo-dev] Instrumentation/Enhancement pros and > cons > > > 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? > > 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 > > > _______________________________________________ > Objectbridge-jdo-dev mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-jdo-dev > |