Re: [Objectbridge-jdo-dev] Instrumentation/Enhancement pros and cons
Brought to you by:
thma
From: Thomas M. <tho...@ho...> - 2002-03-04 17:56:46
|
Hi Jim, 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 totally agree with you ! > > I would be interested in working on the enhancer. Is anyone working on > it yet? No, there is not much real work going on just now. Christian Rath and I had some plans on writing a first prototype based on the JDO RI. The RI has a clear layered architecture with a StoreManager interface that allows to abstract from implementations (as the default FOStore implementation). Our idea was just to provide simply a OJB PersistenceBroker based StoreManager. But we have been so busy with other things that we did not yet start on this ! cu, Thomas > 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 > > > > |