Re: jpa provider

From: Craig L Russell (Craig.Russel..un.COM)
Date: Fri Jan 04 2008 - 16:03:47 EST

  • Next message: Tarik: "Can't see server errors when running ROP"

    Hi,

    On Jan 3, 2008, at 5:09 AM, Andrus Adamchik wrote:

    >
    > On Jan 2, 2008, at 10:02 PM, Gilberto C Andrade wrote:
    >
    >>> <phase>process-classes</phase>
    >>> <configuration>
    >>> <tasks>
    >>> <java
    >>> classname="org.apache.cayenne.enhancer.Enhancer"
    >>>
    >>> classpathref="maven.runtime.classpath"
    >>> dir="target/classes"
    >>> fork="true" />
    >>> </tasks>
    >>> </configuration>
    >
    > This certainly won't work cause there's no such ant task in
    > Cayenne. OpenJPA in this example seems to be doing the enhancement
    > right after compilation instead of runtime.

    OpenJPA can run in multiple modes:

    1. Enhance as part of building the application's jar file. There are
    Eclipse, ant, and maven plugins for this purpose (sure about the
    maven part; not as sure about the Eclipse and ant plugins)
    2. Enhance during class loading via Java agent specified on the java
    command line
    3. Enhance during deployment class loading via Java EE integration
    callback
    4. Don't enhance but use reflection at runtime.

    Craig

    > We will likely provide a similar task at some point, but this
    > shouldn't really change how enhancer operates (i.e. if it has bugs,
    > those won't go away if we do enhancement at a different point).
    >
    > Andrus

    Craig Russell
    Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
    408 276-5638 mailto:Craig.Russel..un.com
    P.S. A good JDO? O, Gasp!





    This archive was generated by hypermail 2.0.0 : Fri Jan 04 2008 - 16:04:26 EST