SlideShare ist ein Scribd-Unternehmen logo
1 von 11
Ennovation – Behind the
       Products
     Anish Alex, CTO
Java Persistence Problem

    • Closest native language support
       – Serialization
    • Lifecycle
       – Begins and Ends with JVM
    • Identity
       – Equals / Hashcode / Memory Location
    • Data Types
       – Int/long/string..

    • RDBMS
       – Long term persistence / Primary Key
       – SQL
       – VARCHAR / NUMBER

2                      Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
Java Persistence Technologies

    • Object Relational Mappers – ORM’s
       – Map Java objects to Relational database
         table records e.g.
           – Top Link / Hibernate
    • Java Data Objects (JDO)
       – Apache jdo
    • JDBC
    • Java Persistence API (JPA)
       – Hibernate
       – Top Link
       – Open JPA
    • EJB
    • Custom

3                      Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
Java Persistence Technologies




4
              Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
Hibernate
Relational Persistence for Java
Hibernate - Relational Persistence for Java

    •   XML file to map POJO to Tables
    •   Configuration
    •   Classes to bootstrap the framework
    •   JPA Implementation




6                       Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
Sample Code
 ORM
Hibernate ORM

    • Generators
       –   native
       –   increment
       –   sequence
       –   assigned
       –   hilo / identify / uuid.hex / uuid.string / foreign
    • Version
       – Prevents invalid overwrites
    • Property
       – String – specify length
       – BigDecimal – specify precision/scale
       – Date / Timestamp / Long - nothing to specify




8                          Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
Hibernate ORM

    • References
       – http://www.mkyong.com/tutorials/hibernate-
         tutorials/
       – http://docs.jboss.org/hibernate/orm/3.3/refe
         rence/en/html/index.htmlPrevents invalid
         overwrites
       – Sample code - http://codeserver/demo-
         repository/svndemo/anisht/trunk/training/hib
         ernate




9                      Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
Hibernate ORM

     • To-Do
        –   One-to-Many using foreign keys
        –   Many-to-One
        –   Many-to-One using foreign keys
        –   One-to-One
        –   Run the same examples against SQL Server




10                        Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
THANK YOU !!
Questions / Contact

Weitere ähnliche Inhalte

Andere mochten auch

đA cộng tuyến star
đA cộng tuyến   starđA cộng tuyến   star
đA cộng tuyến starStar II
 
Learn SystemC Erotically part1
Learn SystemC Erotically part1Learn SystemC Erotically part1
Learn SystemC Erotically part1KSuzukiii
 
3-ий вебинар презентация - Дворик
3-ий вебинар презентация - Дворик 3-ий вебинар презентация - Дворик
3-ий вебинар презентация - Дворик Galina Perova
 
Factual layout analysis
Factual layout analysisFactual layout analysis
Factual layout analysisChloeandRachel
 
Working to a brief pro forma
Working to a brief pro formaWorking to a brief pro forma
Working to a brief pro formaChloeandRachel
 
May Unplugged Mobile Controls User Group
May Unplugged Mobile Controls User GroupMay Unplugged Mobile Controls User Group
May Unplugged Mobile Controls User GroupTeamstudio
 
Konsep Dasar Probabilitas
Konsep Dasar ProbabilitasKonsep Dasar Probabilitas
Konsep Dasar ProbabilitasIndra Gunawan
 

Andere mochten auch (10)

đA cộng tuyến star
đA cộng tuyến   starđA cộng tuyến   star
đA cộng tuyến star
 
Learn SystemC Erotically part1
Learn SystemC Erotically part1Learn SystemC Erotically part1
Learn SystemC Erotically part1
 
Mohideen Khader-122316
Mohideen Khader-122316Mohideen Khader-122316
Mohideen Khader-122316
 
3-ий вебинар презентация - Дворик
3-ий вебинар презентация - Дворик 3-ий вебинар презентация - Дворик
3-ий вебинар презентация - Дворик
 
Factual layout analysis
Factual layout analysisFactual layout analysis
Factual layout analysis
 
Working to a brief pro forma
Working to a brief pro formaWorking to a brief pro forma
Working to a brief pro forma
 
Zotero english-fev2017
Zotero english-fev2017Zotero english-fev2017
Zotero english-fev2017
 
May Unplugged Mobile Controls User Group
May Unplugged Mobile Controls User GroupMay Unplugged Mobile Controls User Group
May Unplugged Mobile Controls User Group
 
Gbidavid r andres r
Gbidavid r andres rGbidavid r andres r
Gbidavid r andres r
 
Konsep Dasar Probabilitas
Konsep Dasar ProbabilitasKonsep Dasar Probabilitas
Konsep Dasar Probabilitas
 

Ähnlich wie Persistence

Core java lessons
Core java lessonsCore java lessons
Core java lessonsvivek shah
 
OSOM - Open source catching solutions
OSOM - Open source catching solutionsOSOM - Open source catching solutions
OSOM - Open source catching solutionsMarcela Oniga
 
Code reviews
Code reviewsCode reviews
Code reviewsRoger Xia
 
Using JPA applications in the era of NoSQL: Introducing Hibernate OGM
Using JPA applications in the era of NoSQL: Introducing Hibernate OGMUsing JPA applications in the era of NoSQL: Introducing Hibernate OGM
Using JPA applications in the era of NoSQL: Introducing Hibernate OGMPT.JUG
 
Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)Martijn Verburg
 
JS for multidisciplinary teams
JS for multidisciplinary teamsJS for multidisciplinary teams
JS for multidisciplinary teamsFrancisco Ferreira
 
Introduction to Distributed Computing & Distributed Databases
Introduction to Distributed Computing & Distributed DatabasesIntroduction to Distributed Computing & Distributed Databases
Introduction to Distributed Computing & Distributed DatabasesShankar Iyer
 
TDD and the Legacy Code Black Hole
TDD and the Legacy Code Black HoleTDD and the Legacy Code Black Hole
TDD and the Legacy Code Black HoleNoam Kfir
 
Scala in practice
Scala in practiceScala in practice
Scala in practiceTomer Gabel
 
Java Community and Overview Track - March 2016
Java Community and Overview Track - March 2016Java Community and Overview Track - March 2016
Java Community and Overview Track - March 2016Yolande Poirier
 
Clojure in real life 17.10.2014
Clojure in real life 17.10.2014Clojure in real life 17.10.2014
Clojure in real life 17.10.2014Metosin Oy
 
Distributed applications using Hazelcast
Distributed applications using HazelcastDistributed applications using Hazelcast
Distributed applications using HazelcastTaras Matyashovsky
 
Alfresco 4: Scalability and Performance
Alfresco 4: Scalability and PerformanceAlfresco 4: Scalability and Performance
Alfresco 4: Scalability and PerformanceAlfresco Software
 
Alfresco scalability and performnce
Alfresco   scalability and performnceAlfresco   scalability and performnce
Alfresco scalability and performncePaul Hampton
 

Ähnlich wie Persistence (20)

Java and the JVM
Java and the JVMJava and the JVM
Java and the JVM
 
Core java lessons
Core java lessonsCore java lessons
Core java lessons
 
JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...
JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...
JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...
 
OSOM - Open source catching solutions
OSOM - Open source catching solutionsOSOM - Open source catching solutions
OSOM - Open source catching solutions
 
Code reviews
Code reviewsCode reviews
Code reviews
 
Using JPA applications in the era of NoSQL: Introducing Hibernate OGM
Using JPA applications in the era of NoSQL: Introducing Hibernate OGMUsing JPA applications in the era of NoSQL: Introducing Hibernate OGM
Using JPA applications in the era of NoSQL: Introducing Hibernate OGM
 
Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)
 
JS for multidisciplinary teams
JS for multidisciplinary teamsJS for multidisciplinary teams
JS for multidisciplinary teams
 
33rd degree
33rd degree33rd degree
33rd degree
 
Introduction to Distributed Computing & Distributed Databases
Introduction to Distributed Computing & Distributed DatabasesIntroduction to Distributed Computing & Distributed Databases
Introduction to Distributed Computing & Distributed Databases
 
TDD and the Legacy Code Black Hole
TDD and the Legacy Code Black HoleTDD and the Legacy Code Black Hole
TDD and the Legacy Code Black Hole
 
Scala in practice
Scala in practiceScala in practice
Scala in practice
 
Developer day v2
Developer day v2Developer day v2
Developer day v2
 
Java Community and Overview Track - March 2016
Java Community and Overview Track - March 2016Java Community and Overview Track - March 2016
Java Community and Overview Track - March 2016
 
Clojure in real life 17.10.2014
Clojure in real life 17.10.2014Clojure in real life 17.10.2014
Clojure in real life 17.10.2014
 
Distributed applications using Hazelcast
Distributed applications using HazelcastDistributed applications using Hazelcast
Distributed applications using Hazelcast
 
Alfresco 4: Scalability and Performance
Alfresco 4: Scalability and PerformanceAlfresco 4: Scalability and Performance
Alfresco 4: Scalability and Performance
 
Alfresco scalability and performnce
Alfresco   scalability and performnceAlfresco   scalability and performnce
Alfresco scalability and performnce
 
Bioinformatica p1-perl-introduction
Bioinformatica p1-perl-introductionBioinformatica p1-perl-introduction
Bioinformatica p1-perl-introduction
 
CS8392 OOP
CS8392 OOPCS8392 OOP
CS8392 OOP
 

Kürzlich hochgeladen

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Kürzlich hochgeladen (20)

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

Persistence

  • 1. Ennovation – Behind the Products Anish Alex, CTO
  • 2. Java Persistence Problem • Closest native language support – Serialization • Lifecycle – Begins and Ends with JVM • Identity – Equals / Hashcode / Memory Location • Data Types – Int/long/string.. • RDBMS – Long term persistence / Primary Key – SQL – VARCHAR / NUMBER 2 Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
  • 3. Java Persistence Technologies • Object Relational Mappers – ORM’s – Map Java objects to Relational database table records e.g. – Top Link / Hibernate • Java Data Objects (JDO) – Apache jdo • JDBC • Java Persistence API (JPA) – Hibernate – Top Link – Open JPA • EJB • Custom 3 Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
  • 4. Java Persistence Technologies 4 Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
  • 6. Hibernate - Relational Persistence for Java • XML file to map POJO to Tables • Configuration • Classes to bootstrap the framework • JPA Implementation 6 Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
  • 8. Hibernate ORM • Generators – native – increment – sequence – assigned – hilo / identify / uuid.hex / uuid.string / foreign • Version – Prevents invalid overwrites • Property – String – specify length – BigDecimal – specify precision/scale – Date / Timestamp / Long - nothing to specify 8 Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
  • 9. Hibernate ORM • References – http://www.mkyong.com/tutorials/hibernate- tutorials/ – http://docs.jboss.org/hibernate/orm/3.3/refe rence/en/html/index.htmlPrevents invalid overwrites – Sample code - http://codeserver/demo- repository/svndemo/anisht/trunk/training/hib ernate 9 Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.
  • 10. Hibernate ORM • To-Do – One-to-Many using foreign keys – Many-to-One – Many-to-One using foreign keys – One-to-One – Run the same examples against SQL Server 10 Evolvus Solutions. Proprietary and Confidential, do not copy, duplicate or distribute.

Hinweis der Redaktion

  1. 1. Behind the products 2. IT management peace of mind Freedom of choice Any relational database - oracle/mysql/mssql/db2 Any application server - JBoss, Websphere, Weblogic - even Tomcat! Any os - Windows, Linux, *nix Any hardware - well, almost :-) - no mainframes Good corporate citizen Integrates with monitoring systems - Integrates with various SSO systems - Siteminder, CAS, AD, Custom Solutions Easy test instance creation Built in purge/backup solution Test automation Minimal IT involvement 3. High performance/High Scalability 4. Industrial strength Cluster enabled - Application and database failover 5. Open Source No Vendor Lock-in Community Contribution 6. Device inclusive Tablets / Smart Phones / Desktop
  2. Closest to persistence in Java means Serialization Objects created and destroyed based on scope, GC frequency – eventually JVM Objects identified by Memory location by default, or by overriding the equals/hashcode methods No Mapping to Relational databases – Primary Key / Foreign Key / Data type constraints
  3. Several competition mechanisms to solve the problem of Java Object Persistence ORM -> Object to Relational Database JDO -> Object to File/XML/Relational database – Multiple targets, JDOQL, Annotations, XML Custom like iBatis -> Using SQL/Stored Procedures JPA -> Object to Relational Database, JQL, Annotations JDBC -> Using SQL’s EJB’s -> Entity Beans
  4. Configure which database you want to connect to / the dialect, driver etc.