Re: cayenne-jpa - volunteer help?

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Feb 16 2006 - 17:00:45 EST

  • Next message: Tore Halset: "Re: cayenne-jpa - volunteer help?"

    Thanks! I just checked it in.

    > * The query stuff will require some work... I guess SQLTemplate
    > can be used for native sql. And we do have named queries.

    Yep - SQLTemplate is same as (actually better than) JPA native SQL
    query.

    We'll develop EJB QL support later

    Everything else will be handled as named queries.

    > * I do not know about the transaction stuff.

    Need to check on that as well.

    A few more notes.

    I did some refactoring to split the common JPA spec code from Cayenne-
    specific stuff. My (unproven) idea is that the resulting
    implementation will be more flexible and easy to share with others if
    we keep everything that does not depend on cayenne.jar in a separate
    package ("cayenne.jpa" and "cayenne.jpa.spi"). All things that
    require an import from cayenne.jar would go into "cayenne.cjpa".

    And the next task would be to load JPA entity mapping XML descriptor
    and convert it to a DataMap ;-)

    The loader I wrote for the simpler persistence.xml schema is SAX
    based (i.e. manual, although it does fancy stuff like schema
    validation :-)). Entity mapping descriptor is much more complex, but
    I wonder if we can use our own XMLDecoder for that? A good test of
    its capabilities. I guess it can load an intermediate metadata object
    that later can be converted to the DataMap.

    Suggestion to use XMLDecoder is somewhat contrary to what I just said
    about spec/cayenne split, but I think it is OK, as XML piece is more
    of a utility package and can be used standalone.

    Andrus

    On Feb 16, 2006, at 3:12 PM, Tore Halset wrote:
    > On Feb 15, 2006, at 21:44, Andrus Adamchik wrote:
    >
    >> This is a starting point of the JPA provider implementation. It
    >> already has a spec-compliant configuration and bootstrapping
    >> mechanism. Note that JPA stack can operate with or without a
    >> container. I started collaborating with Geronimo (specifically
    >> OpenEJB) folks on pieces that are shared between the both modes of
    >> operation. If we move quickly, we will be in a good position to
    >> offer Cayenne as a default JPA provider to Geronimo.
    >
    > Cool.
    >
    >> The first major task that needs to be done now is to write a non-
    >> compliant javax.persistence.EntityManager facade to the current
    >> Cayenne stack. It should be able to work in a standalone mode (via
    >> javax.persistence.Persistence).
    >
    > EntityManager:
    > * The query stuff will require some work... I guess SQLTemplate
    > can be used for native sql. And we do have named queries.
    > * I do not know about the transaction stuff.
    > * The rest matches DataContext metods.
    >
    > The attached files should not be taken seriously. Just a first
    > reading-through-javadoc-and-hacking-away.
    >
    > - Tore.
    > <JpaEntityManager.java>
    > <JpaEntityManagerFactory.java>



    This archive was generated by hypermail 2.0.0 : Thu Feb 16 2006 - 17:00:46 EST