Re: Opinion on using DO class as entity id!?

From: Andriy Shapochka (ashapochk..otmail.com)
Date: Thu Jan 30 2003 - 17:26:39 EST

  • Next message: Andrus Adamchik: "Re: Opinion on using DO class as entity id!?"

    > Is it possible for you to use java.lang.reflect.Proxy for this purpose:
    >
    > http://java.sun.com/j2se/1.3/docs/api/java/lang/reflect/Proxy.html
    >
    > So far I couldn't find a single justified use of the Java Proxy feature,
    > but maybe this is just it? :-)
    >

    Nope, this wouldn't work because of the way JVM creates $Proxy classes. For
    all I know, you cannot control or vary their names for the same interface.
    I have found a solution though (only for the regression application - the
    general case remains unclear). I use Apache BCEL to generate empty classes
    with custom names extending CayenneDataObject at runtime and load them via a
    homemade ClassLoader bootstrapped to Configuration from a memory buffer.
    What a wonder, really!
    Andriy.



    This archive was generated by hypermail 2.0.0 : Thu Jan 30 2003 - 17:26:02 EST