Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-682

Generic Cayenne POJO enhancer

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0
    • 3.0
    • Core Library
    • None

    Description

      JPA implies POJO persistence, so to hook up pojos to Cayenne we need an enhancer.

      However it looks like the enhancer itself doesn't have to know anything about JPA - it can be built on top of Cayenne. I prototyped an ASM-based enhancer [1] that turns a POJO into a Persistent instance and also does property interception. It is much cleaner and intuitive than our current CGLIB JPA enhancer, and (again) - it does not depend on anything JPA.

      The next steps I am going to take:

      • move it to Cayenne core,
      • create more tests
      • switch JPA to the new enhancer
      • add support for relationships interception

      So we will support POJO's without JPA! (and without spending any extra time in addition to what was planned for JPA work).

      [1] https://svn.apache.org/repos/asf/incubator/cayenne/sandbox/asm-enhancer/

      Attachments

        Issue Links

          Activity

            People

              andrus Andrus Adamchik
              andrus Andrus Adamchik
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: