Discussions

News: JDO Genie now supports JDK 1.5 Generics

  1. JDO Genie now supports JDK 1.5 Generics (5 messages)

    JDO Genie has released a JDO implementation with support for JDK 1.5 generic collections and maps. What is interesting is to see how "things change" when you support generics. In this case, you no longer need to specify the element-type, value-type and key-type attributes in the JDO meta data.

    You need to compile with "-source 1.5" and run under JDK 1.5.

    Example classes:

    public class Product {
        private String name;
        private List<Category> categoryList = new ArrayList<Category>();
    }

    public class Category {
        private String description;
    }

    Corresponding JDO meta data:

    <jdo>
      <package name="com.acme.model">
        <class name="Product"/>
        <class name="Category"/>
      </package>
    </jdo>

    More information and download at http://www.jdogenie.com

    This is just a sniff at how many things are going to change with the addition of generics. The same could be said about JSR 175 annotations. JDK 1.5? Why didn't they call it Java 3!

    Threaded Messages (5)

  2. JDK 1.5 Rooooockssssss!!!!!![ Go to top ]

    JDK 1.5 Rooooockssssss!!!!!!

    I can't wait to see it's impact on JDO, JDBC, EJB, JMS, Connectors..., especialy regarding generics and annotations.

    It is interesting that you can prepare your code for annotations by adding final static fields, and then use reflection to read it at runtime. It is not as ellegant as annotations, but works and can be easily changed to use annotations when JDK 1.5 is released.

    Mileta
  3. JDO Genie now supports JDK 1.5 Generics[ Go to top ]

    Hi David

    Congratulations - this is excellent, and is exactly inline with my own thoughts on how Generics should affect JDO.

    > Why didn't they call it Java 3!

    Because I don't yet have the persistence hooks I need in order to make the bytecode enhancement phase of JDO unnecessary. As soon as I've got that JSR resubmitted, approved, implemented and standardized then they can call it Java 3. Hopefully they'll also add primitive representations for BigInteger and BigDecimal so that the mathematical operators are applicable, and generally remove the deprecated and unused stuff that is liberally spread around the API.

    Well done on your Generics support!

    Kind regards, Robin.
  4. Persistence hooks and AOP[ Go to top ]

    Because I don't yet have the persistence hooks I need in order to make the bytecode enhancement phase of JDO unnecessary.

    By the time you create VM hooks to make bytecode enhancement unnecessary for JDO, what's to keep you from creating a generic AOP mechanism for other uses? How close does your JSR come to just that?

    Hopefully they'll also add primitive representations for BigInteger and BigDecimal so that the mathematical operators are applicable, and generally remove the deprecated and unused stuff that is liberally spread around the API.

    I'll second that.

    God bless,
    -Toby Reyelts
  5. JDO Genie now supports JDK 1.5 Generics[ Go to top ]

    This looks very impressive, JDO is already the persistence of the future but given these leading edge feature it's hard to resist.

    While refactoring our product, as we do for about 3 months every year, we’ve made the decision to follow the JDO path. I’ve looked at a lot of persistence layers over the last 6 months, Hibernate was almost there but JDO is the way we’re going to go. This decision was partly technical and partly customer driven. We are starting to see a serious uptake of JDO in our customers, large banks, and this obviously has a strong bearing on our direction.

    I for one have just downloaded this new version, I’ve been using J2SE 1.5 since Christmas Eve and JDO for some years now. This is going to be an excellent new “toy” to play with. I can already see a variety of uses and look forward to getting stuck in.

    Great job David, I hope I can pass some business your way, I’ll be watching this implementation very closely. Robin, keep up the good work on the JSR.

    -John-
  6. That's great news David. It looks like JDO Genie 3.0 is really beginning to shape up. I hope the Signature Attribute parsing code I gave you helped you guys out some with the Generics support.

    God bless,
    -Toby Reyelts