Discussions

News: New release of ObJectRelationalBridge O/R mapping tool

  1. There is a new version of the opensource Object/Relational mapping tool ObJectRelationalBridge (OJB) available. The new version includes a graphical tool for building mappings and JTA Integration for J2EE AppServer environments. OJB is an Object/Relational mapping tool that supports ODMG 3 API
    s, with a JDO interface also in the works.

    More info is available here: http://objectbridge.sf.net.

    From the Release-notes:
    ------------------------
    ObJectRelationalBridge -- Bridging Java Objects and Relational Databases

    ObJectRelationalBridge (OJB) is an Object/Relational mapping tool that provides transparent persistence for Java Objects against relational databases.
    OJB supports multiple APIs:
    - A full featured ODMG 3.0 compliant API.
    - planned: A JDO compliant API
    - A low-level PersistenceBroker API which serves as the OJB persistence kernel.

    OJB can be used in single VM mode or in a distributed, loadbalanced Client/Server mode.
    OJB uses an XML based dynamic Object/Relational Mapping that can be manipulated at
    runtime through a simple Meta-Object-Protocol (MOP).
    OJB provides several advanced O/R features like M:N associations, a pluggable ObjectCache,
    lazy materialization through virtual proxies and
    a distributed lock-management with configurable Transaction-Isolation Levels.

    new features:
    - Allow autoincrement for non-pk fields
    - Platform enhancements for several RDBMS
    - Improved "out-of-the-box" support for Informix and Oracle
    - JTA Integration
    - Proxies for 1:1 references
    - Order of insert statements in ODMG transaction commit cares for foreign key constraints on the database
    - PersistentField implementation made configurable

    Threaded Messages (16)

  2. Now I think we need a Comparative review of different Open source ObjectRelational Mapping tools.
    It will be nice if people can share there experiance with different such tools.
  3. I'd love to see an open source O/R-based JDO implementation. Frankly, I've been really disappointed by Sun's inability to release their O/R JDO RI. With most other specifications, they've been quite good at releasing useable RI's.

    -Toby Reyelts
  4. Indeed, if we could get a good open source JDO implementation, I would consider using it on TSS. I am surprised that the Castor project doesn't already have one, since they already had a JDO-like product.

    Floyd
  5. What is wrong with current Castor implementation? It's not Sun JDO, but still, it is very convinient and super easy to use.

    --
    Dimitri
  6. <quote>
    What is wrong with current Castor implementation?
    </quote>

    FWIW, Castor appears to be stuck on 0.9.x release for more than a year now.

    Are you actually using Castor or do you just believe that, in theory, it could be used?
  7. I am a user of castor for about a year now. It has it's limitations but all in all, I found it useful enough to introduce to my team. Combined with unit testing, many of my team's bugs caused by sql/jdbc related code, simply vanished.

    Is there any major problems with castor that a user like me does not know of?
  8. <quote>
    Are you actually using Castor or do you just believe that, in theory, it could be used?
    </quote>

    Yes - mostly for XML binding, and JDO on occasion.

    --
    Dimitri
  9. Its a great tool, used within many projects.
    Don't get confused with release numbers.
    Just because some vendors jump a large version
    number every week, doesn't mean it is even as much
    of a jump as a point release for some good tools.
    Marketing == version increases ;)
  10. The OJB has started to work on a JDO implementation.
    We have not started to code, but are having a lot of creative discussions.
    here is my initial proposal for a OJB based JDO implementation http://objectbridge.sourceforge.net/jdo/jdo-proposal.html

    We are currently planning to form a joint venture with the Sparrow project (http://sourceforge.net/projects/sparrow) to speed up the implementation.

    - Thomas Mahler
    (OJB architect)

  11. For those interested, there is a good overview (and up to date it seems) of the different mapping tools/frameworks available at http://www.javaskyline.com/database.html

    cheers,

    Paul.
  12. How about JBoss integration?
    Castor has integration module.
  13. OJB has a JBoss compliant JTA integration.
    We are currently working on a complete JCA conformous integration. I hope to get this finished in the next public release.
    -- Thomas Mahler
  14. Thomas Mahler,

    In Object Relational Bridge is there a way to map a 1-to-1 reference where the class for the reference is mapped to the same table as the containing class (i.e., there's no join involved)?

    For example there are two classes PATIENT and ADDRESS and I have to persist them to one dB2 table TE_PATIENT_INFO.

    public class Patient{
      Int id;
      String name;
      ...
      ...
      Address address;
      ....
      ...
     }

    Public class Address{
      String city;
      ...
    }
    Now if I want to persist the attributes id, name, city to the same DB2 table, then what would be the XML maping(repository.xml) for this scenario

    Thanks
  15. with Castor if you have an xml file like this one:
    <header1>
      <header2>
         <field1>
  16. Sorry for my previous posting that was submitted by mistake.
    Ok, with Castor if you have this XML file:
    <header1>
      <header2>
         <field1>
            whatever
         </field1>
      </header2>
    </header1>
    Your class MUST have fields that correspond to header1, header2, field1. Mostly one does not need this literal mapping.
  17. We've been using Torque for a while now and we're happy with it. Torque is a persistence layer. Torque generates all the database resources required by your application and includes a runtime environment to run the generated classes.

    Torque was developed as part of the Turbine Framework. It is now decoupled and can be used by itself.

    http://jakarta.apache.org/turbine/torque/index.html