241 likes | 590 Views
JavaEE Server. Query. Cache. TX. JDBC. JCA. JAXB. File, Document. EIS. XDB. EclipseLink Runtime Architecture. Presentation Interface (JSP,Servlet,Struts,Web Service, Custom). Application Logic (EJB Session Beans, Java Classes). Business Entities (EJB Entity Beans, Java Classes).
E N D
JavaEE Server Query Cache TX JDBC JCA JAXB File, Document EIS XDB EclipseLink Runtime Architecture Presentation Interface (JSP,Servlet,Struts,Web Service, Custom) Application Logic (EJB Session Beans, Java Classes) Business Entities (EJB Entity Beans, Java Classes) Persistence Manager Container Services Object Data Conversion CMP/BMP JTA EclipseLink Mappings O-R Connection Pools O-X JDBC Data Source
Caching Architecture EntityManager EntityManager Factory UnitOfWork Session Server TX Cache Isolated Cache Cache Coordination Shared Cache JMS (MDB) RMI CORBA IIOP
Spring ADF Java SE Java EE OSGi EclipseLink Domain Model Application Interface Meta Data Persistence Manager @ Annotations Mapping Metadata Java API Data Source Accessor and Platform XML Data Legacy Systems Databases
Original API & Metadata: oracle.toplink.* ORM ORM/OXM, JAXB, EIS TopLink EssentialsJPA(oracle.toplink.essentials.*) 10.1.3.1 Oracle TopLink Roadmap Oracle Toplink EclipseLinkJPA, MOXy, SDO, DBWS, EIS(org.eclipse.persistence.*) 9.0.4 10.1.3 11g Future
EclipseLink Roadmap GlassFish v3JavaEE 6 (2.0) EclipseGalileo (1.1.2) EclipseHelios (2.1) EclipseLink 1.0 1.1 1.2 2.0 2.1 1.0.1 1.0.2 1.1.1 11g 11gR1 OracleTopLink
Spring ADF Eclipse Persistence Services “EclipseLink” Java SE Java EE OSGi Eclipse Persistence Services Project (EclipseLink) JPA MOXy EIS SDO DBWS XML Data Legacy Systems Databases
EclipseLink: Distributions • Eclipse.org • www.eclipse.org/eclipselink/downloads • http://download.eclipse.org/rt/eclipselink/updates • Oracle • TopLink 11g • WebLogic Server 10.3.1 • GlassFish v3 • Replaces TopLink Essentials • JPA 2.0 Reference Implementation • Spring Source • Spring Framework • Spring OSGi Bundle Repository
EclipseLink Developer Tool Support • EclipseLink is a Runtime Project but supported by IDEs • Eclipse IDE • EclipseLink support included by Dali in Eclipse 3.4 (Ganymede) • EclipseLink included in Eclipse 3.5 (Galileo) – JavaEE • Enhanced Dali support for use of EclipseLink • Oracle Enterprise Pack for Eclipse (OEPE) • MyEclipse • JDeveloper 11g • JPA, Native ORM, OXM, and EIS mapping • NetBeans • Standalone Workbench • Native ORM, OXM, EIS
EclipseLink Java Persistence CUST ID NAME C_RATING JPA Relational Customer id: int name: String creditRating: int DBWS MOXy SDO <customer id=“…”> <name>…</name> … </contact-info> </customer> Java XML
Where does EclipseLink JPA fit? Java SE/EE/OSGi Java Classes JPA Persistence Provider Mapping Metadata RelationalDatabase Database Schema Design Time Runtime
L2 Cache Coordination Messaging JMS, RMI, IIOP, CORBA Type specific configuration Modes: Invalidate, Sync, Sync+New, None @Entity @Cache( coordinationType = INVALIDATE_CHANGED_OBJECTS) Cache Coordination Application EntityManager L1 Cache EntityManagerFactory Cache Coordination L2 Cache …
L2 and L1 Caching Client-2 Client-1 EntityManager -2 L1 Cache EntityManager -1 EntityManagerFactory L2 Cache Read Pool Write Pool Read Write Read Write Read Write
MOXy Binding Layer Java App document unmarshallingproduces objects object creation and updates through object-level API Objects Objects EclipseLink OXM results are returned as raw xml XPath is used tospecify mapping XPathquery elements/attributes
SDO runtime combines: Java SDO Classes XML Schema Java SDO Classes SDO Runtime—“Static SDO” Java SE/EE SDO Implementation(EclipseLink MOXy) XML Schema XML Document
SDO runtime using: XML Schema SDO Runtime—“Dynamic SDO” Java SE/EE SDO Implementation(EclipseLink MOXy) XML Schema XML Document
EclipseLink JDBC SQL Stored Procedure JP QL Expressions SQL Query Query By Example Cache Hit? Mappings Cache Database Application Rows Cache Result? Objects Object Builder EclipseLink Query Execution Query Framework
Caching EntityManagerFactory EntityManager UnitOfWork Client Session TX Cache Isolated Cache Server Session SharedCache RDBMS
Client-Server Session Client (1) reading Client (2) reading Server Application Client Session (1) Client Session (2) Server Session Shared Cache
Client Write Access Client (1) reading Client (2) editing Unit of Work Cache Server Application Client Session (1) Client Session (2) Server Session Shared Cache
Native Meta Model DatabasePlatform Session Project (Map) ServerPlatform * ClassDescriptor Class javaClass Policies InstantiationClone/CopyInheritanceLockingSequencing… * Mapping attributeName
Default Cache Behavior 2. SQL Query QueryFramework 1. OO Query 3. Results 4. Does PK for row exist in cache? 5. NO: Build bean/object from results Cache 6. Return object results 5. YES: Get from cache
Identity Map Identity map for person Person1 1 Session Person2 2 PersonN N Identity mapfor address Identity map is indexed by primary key