Oracle today announced the release of Oracle TopLink 11g. This release includes EclipseLink 1.0.1 with support for JPA, MOXy, and SDO as well as the introduction of TopLink Grid which integrates JPA with Oracle Coherence. For more information including downloads and feature overview please check out the TopLink pages on OTN.
- Posted by: Doug Clarke
- Posted on: September 23 2008 07:55 EDT
- Re: Oracle TopLink 11g Released by Cameron Purdy on September 25 2008 11:33 EDT
- Model RelationShip not supported ;-| by carpediem98 carpediem98 on September 25 2008 15:25 EDT
.. as well as the introduction of TopLink Grid which integrates JPA with Oracle Coherence.The JPA support has been in the pipeline for quite a while, and we've been eagerly waiting for it. I've gotten to see the demos this week here at the OpenWorld conference, and it's looking good. Great job, guys! Peace, Cameron Purdy Oracle Coherence: Data Grid for Java, .NET and C++
hello and congratulations for this integration will allow TopLink to enjoy a "infinite" cache size . I did not understand why the relationships btween objects was not supported because it will force users to not map the relations which is not natural in JPA and ORM ? Using coherence implies a change in the object model. For example, Toplink cache supports this object : Person (long id, String Name, Address address) While Cohernce cache requires refactoring Person object like this : Person (long id, String Name, long addressId) ==>> replace the "Address address" attribute with "long adressId" attribute ! Hibernate support Coherence without this constraint ! Regards
TopLink Grid is a rich integration storing JPA entities directly in the Coherence grid whereas Hibernate uses Coherence as a basic read-only row cache. The deeper TopLink integration leverages the power of Coherence to provide a much more powerful solution: - TopLink Grid can write exclusively to the Coherence grid making Coherence the 'source of truth' resolving potential conflicts with the database while leveraging Coherence performance functionality like asynchronous "write-behind". Hibernate must always write to the database reducing throughput and limiting Coherence 's scalability potential. - Storing entities is more efficient as it avoids the rebuilding of instances from row data. - Native Coherence applications have access to the JPA entities stored by TopLink Grid. Hibernate stores a native format making the caches practically unusable by other applications. - Beyond caching TopLink Grid can translate JPQL queries into Coherence filters for transparent parallel grid execution. - TopLink Grid provides fine grain configuration for controlling where writes occur and where queries are executed (ie database or Coherence). With TopLink Grid configuration exists from the Entity Level right down to the level of individual queries. TopLink Grid with Coherence provides JPA users with a unique, high performance computing experience. Support for transparent JPA relationships did not make this release but we will continue to enhance the integration to leverage more of the power of Coherence for JPA users including adding relationship support.
Can you explain how to make my "Toplink" application compatible with "TopLinkGrid." I'll take a very simple example: Object Model: Employee (long id, String name, List address) Address (long id, String street, Employee employee) We have 2 mapped relations: OneToMany : from Employee to Address ManyToOne : from Address to Employee Our BusinnesService layer is like this : // find Address with id=22 Address address22 = em.find (Address.class, 22); // get Employee from address Employee emp address22.getEmployee = (); System.out.println (address22 + "is affected to:" + emp); // find Employee with id=22 Employee emp22 = em.find (Employee.class, 22); // use transaction to set address22 to employee22 em.beginTransaction (); address22.setEmployee (emp22); em.commit; System.out.println (address22 + "is now affected to:" + emp22); // get addressList from emp22 List emp22Address = emp22.getAddress(); em.close (); Thank you explain to me what I need to edit my current application to use TopLinkGrid I believe it takes at least 1 / change mapping to remove relations OneToMany and ManyToOne 2 / Change my businessLayer to no longer seek .getAddress() and .setEmployee() But perhaps you will show me that things are much simpler than I think ;-) Tabi
Thank you explain to me what I need to edit my current application to use TopLinkGridHi Tabi, You're right. In this first release of TopLink Grid the lack of relationship support means that for Entities you want to cache in Coherence you're going to have to replace the references between objects with ids. For existing JPA applications, I'd recommend using TopLink Grid to Coherence cache only those Entities that you need to be highly available--not necessarily your entire domain model. Fortunately mixing TopLink Grid enabled Entities with plain old JPA Entities is fully supported so you can leverage Coherence as much as makes sense in a particular application. Existing Coherence applications can benefit from TopLink Grid without changes to their domain model. TopLink Grid adds the Java Persistence API as a means of interacting with their domain model along with JP QL support for querying. As Gordon said in his posting, we'll be working diligently to add relationship support to TopLink Grid so that existing JPA applications can easily leverage the power of Coherence. --Shaun Oracle TopLink: TopLink Grid, EclipseLink
I believe it takes at least
1 / change mapping to remove relations OneToMany and ManyToOne
2 / Change my businessLayer to no longer seek .getAddress() and .setEmployee()