SlideShare une entreprise Scribd logo
1  sur  29
Télécharger pour lire hors ligne
Chicago, October 19 - 22,
2010
New Persistence Features in
Spring Roo 1.1
Stefan Schmidt
Agenda
•  Spring Roo’s Approach to Persistence
•  Incremental Database Reverse Engineering
•  Apache Solr / Lucene Integration
•  Alternative Persistence Technologies
Spring Roo’s Approach to
Persistence
Peristence Choices
•  JPA2 for ORM
–  4 choices of ORM providers
•  Hibernate
•  EclipseLink
•  OpenJPA
•  DataNucleus (DN1 supported for GAE, DN2 used by VMforce)
•  12+ Database choices
–  constantly growning list of DBs to choose from
–  popular ones: MySQL, Postgres, HSQLDB (for dev)
•  Switch out ORM and / or DB with a single command
–  persistence setup --provider HIBERNATE --database MYSQL
No DAOs?
•  No DAO layer by default
–  Objections:
•  testing
•  separation of concern
•  pluggable implementations
•  non JPA persistence
•  security authorizations
•  security auditing
•  finders
•  architectural reasons
Feature Extension Points
•  Add-ons can contribute persistence feature extensions via
ITDs
–  Finder add-on is a good example
•  Every @RooEntity exposes the JPA entity manager
–  use for creating custom type-safe queries via Criteria API
–  getting access to the underlying ORM
Incremental Database
Reverse Engineering
Alternatives to Roo’s Incremental DBRE
•  Eclipse “JPA Entities from tables” wizard
–  Generates entities from a JDBC connection
–  Can be tailored to change generated type and field names
–  Does not handle tables with no primary keys
•  JPA Implementation Tools
Limitations of Existing DBRE Tools
•  Lack of incremental reverse engineering
•  Complex and long-winded wizard style interactions
•  Missing entity lifecycle management
–  Application requires manual adjustment if the datamodel
changes
Introducing Roo’s Incremental Database
Reverse Engineering
•  DBRE was the most requested feature for Spring Roo
•  Introspect relational databases such as Oracle, MySQL,
PostgreSQL and Microsoft SQL Server
•  Reverse engineer complex schemas into Java entities in
seconds
•  Creates and maintains relationships with JPA 2.0
annotations
•  Incrementally updates your domain model as your DB
schema changes
How does DBRE work?
•  Uses the standard java.sql.DatabaseMetaData
implementation of your JDK
•  Connects to a live database using JDBC and creates
entities from the database metadata obtained
•  Similar to the output generated by the Eclipse wizard with
all accepted defaults
Spring Roo DBRE Commands
•  database introspect --schema <name> [--file <name>]
–  Displays database metadata in XML format in the Roo shell
–  Optional --file <file name> saves metadata to specified file
–  Provides a preview of the mappings used in the final model
Spring Roo DBRE Commands
•  database reverse engineer [--schema <name>] [--
package <name>]
–  Creates entities in the specified package
–  --schema and --package options required only for first time
run of command
–  Automatically generates type and field names from table
and column names
–  JPA-annotated fields and getters/setters saved in AspectJ
ITDs, eg Person_Roo_DbManaged.aj
Primary Keys
•  Supports single and composite primary keys
–  Creates a separate primary key class for tables having more
than one primary key or no primary key (uses all fields for
key)
–  Annotates the primary key class with @Embeddable and the
entity's id with @EmbeddedId
Entity Relationships
•  Automatically creates and maintains bi-directional
relationships:
–  @ManyToMany, many-valued associations with many-to-
many multiplicity
–  @OneToOne, single-valued associations to other entities
that have one-to-one multiplicity
–  @OneToMany, many-valued associations with one-to-many
multiplicity
–  @ManyToOne, single-valued associations to other entities
that have many-to-one multiplicity
DEMO
Database Reverse Engineering Demo
Apache Solr / Lucene
Integration
What is Apache Solr?
•  Search server
•  Built upon Apache Lucene (Java)
•  Fast, very
•  Scalable, query load and collection size
•  Distributed search and index replication
•  Interoperable
•  Extensible
Solr Features
•  Powerful full-text search
•  Hit highlighting
•  Faceted search
•  Spell checking
•  Dynamic clustering
•  Database integration
•  Rich document (e.g., Word, PDF) handling.
Interacting with Solr
•  HTTP GET / POST
•  JSON / XML
•  SolrJ (embedded over HTTP)
•  Ruby: solr-ruby, RSolr
•  many others: python, PHP, solrsharp, XSLT
•  JMX monitoring available
•  Admin interface available
Configuring Solr
•  schema.xml
–  Defines field types
–  Can drive more intelligent processing
–  Dynamic Fields enable on-the-fly addition of new fields
–  CopyField
•  indexing a single field multiple ways
•  combining multiple fields into a single searchable field
–  Many additional text analysis components
•  word splitting,
•  regex filters
•  sounds-like filters
Roo Solr Integration
•  Roo Shell
–  solr setup  install SolrJ driver in project pom.xml
–  solr add  make individual type searchable
–  solr all  make all JPA entities searchable
•  @RooSolrSearchable type annotation
•  Hooks into JPA lifecycle
–  @PostPersist
–  @PostUpdate
–  @PreDelete
•  Uses SolrJ client
Entity Methods Introduced via Roo
•  QueryResponse search(String queryString)
•  QueryResponse search(SolrQuery query)
•  @Async void indexPerson(Person person)
•  @Async void indexPeople(Collection<Person> people)
•  @Async deleteIndex(Owner owner)
•  solrServer is also accessible on target type.
DEMO
Apache Solr
Alternative Persistence
Technologies
Demand for Choice
•  ROO-301: Choose between data access patterns
–  demand for repository and DAO pattern support
•  70+ votes in Spring Roo Jira, second most popular issue
–  Spring JDBC template
–  demand for iBatis support (ROO-452)
–  demand for NoSQL integration
–  demand for polyglot persistence
Hades Add-On
•  Have you heard of Hades project?
–  Utility library to work with Data Access Objects
•  implemented with Spring and JPA
–  Main goal is to ease the development and operation of a
data access layer in applications
•  Installation in the Roo shell with a single command:
–  addon install --bundleSymbolicName org.synyx.hades.roo.addon
–  hades setup
–  hades repository --entity ~.domain.Person
–  more features planned (finders, DDD, etc)
DEMO
Hades Add-On
Summary
•  Roo has deep and rich persistence support
•  Roo’s Incremental DBRE feature is the next generation in
DBRE capabilities
•  Solr and Incremental DBRE offer devs a major
productivity boost
•  Alternative persistence technologies supported and
expanding

Contenu connexe

Tendances

Apache Solr/Lucene Internals by Anatoliy Sokolenko
Apache Solr/Lucene Internals  by Anatoliy SokolenkoApache Solr/Lucene Internals  by Anatoliy Sokolenko
Apache Solr/Lucene Internals by Anatoliy SokolenkoProvectus
 
Oracle to Postgres Migration - part 1
Oracle to Postgres Migration - part 1Oracle to Postgres Migration - part 1
Oracle to Postgres Migration - part 1PgTraining
 
ORM, JPA, & Hibernate Overview
ORM, JPA, & Hibernate OverviewORM, JPA, & Hibernate Overview
ORM, JPA, & Hibernate OverviewBrett Meyer
 
Lucene for Solr Developers
Lucene for Solr DevelopersLucene for Solr Developers
Lucene for Solr DevelopersErik Hatcher
 
High Performance JSON Search and Relational Faceted Browsing with Lucene
High Performance JSON Search and Relational Faceted Browsing with LuceneHigh Performance JSON Search and Relational Faceted Browsing with Lucene
High Performance JSON Search and Relational Faceted Browsing with Lucenelucenerevolution
 
[EPPG] Oracle to PostgreSQL, Challenges to Opportunity
[EPPG] Oracle to PostgreSQL, Challenges to Opportunity[EPPG] Oracle to PostgreSQL, Challenges to Opportunity
[EPPG] Oracle to PostgreSQL, Challenges to OpportunityEqunix Business Solutions
 
Apache Solr: Upgrading Your Upgrade Experience - Hrishikesh Gadre, Lucidworks
Apache Solr: Upgrading Your Upgrade Experience - Hrishikesh Gadre, LucidworksApache Solr: Upgrading Your Upgrade Experience - Hrishikesh Gadre, Lucidworks
Apache Solr: Upgrading Your Upgrade Experience - Hrishikesh Gadre, LucidworksLucidworks
 
Introduction to Apache Solr
Introduction to Apache SolrIntroduction to Apache Solr
Introduction to Apache SolrAndy Jackson
 
Large Scale ETL for Hadoop and Cloudera Search using Morphlines
Large Scale ETL for Hadoop and Cloudera Search using MorphlinesLarge Scale ETL for Hadoop and Cloudera Search using Morphlines
Large Scale ETL for Hadoop and Cloudera Search using Morphlineswhoschek
 
Data Science with Solr and Spark
Data Science with Solr and SparkData Science with Solr and Spark
Data Science with Solr and SparkLucidworks
 
Introduction to Lucene and Solr - 1
Introduction to Lucene and Solr - 1Introduction to Lucene and Solr - 1
Introduction to Lucene and Solr - 1YI-CHING WU
 
Best practices on Building a Big Data Analytics Solution (SQLBits 2018 Traini...
Best practices on Building a Big Data Analytics Solution (SQLBits 2018 Traini...Best practices on Building a Big Data Analytics Solution (SQLBits 2018 Traini...
Best practices on Building a Big Data Analytics Solution (SQLBits 2018 Traini...Michael Rys
 
Webinar: What's New in Solr 7
Webinar: What's New in Solr 7 Webinar: What's New in Solr 7
Webinar: What's New in Solr 7 Lucidworks
 
Oracle to Postgres Migration - part 2
Oracle to Postgres Migration - part 2Oracle to Postgres Migration - part 2
Oracle to Postgres Migration - part 2PgTraining
 
Integrating the Solr search engine
Integrating the Solr search engineIntegrating the Solr search engine
Integrating the Solr search engineth0masr
 
Solr Indexing and Analysis Tricks
Solr Indexing and Analysis TricksSolr Indexing and Analysis Tricks
Solr Indexing and Analysis TricksErik Hatcher
 

Tendances (20)

How Solr Search Works
How Solr Search WorksHow Solr Search Works
How Solr Search Works
 
Apache Solr/Lucene Internals by Anatoliy Sokolenko
Apache Solr/Lucene Internals  by Anatoliy SokolenkoApache Solr/Lucene Internals  by Anatoliy Sokolenko
Apache Solr/Lucene Internals by Anatoliy Sokolenko
 
Oracle to Postgres Migration - part 1
Oracle to Postgres Migration - part 1Oracle to Postgres Migration - part 1
Oracle to Postgres Migration - part 1
 
Solr 4
Solr 4Solr 4
Solr 4
 
ORM, JPA, & Hibernate Overview
ORM, JPA, & Hibernate OverviewORM, JPA, & Hibernate Overview
ORM, JPA, & Hibernate Overview
 
Lucene for Solr Developers
Lucene for Solr DevelopersLucene for Solr Developers
Lucene for Solr Developers
 
High Performance JSON Search and Relational Faceted Browsing with Lucene
High Performance JSON Search and Relational Faceted Browsing with LuceneHigh Performance JSON Search and Relational Faceted Browsing with Lucene
High Performance JSON Search and Relational Faceted Browsing with Lucene
 
[EPPG] Oracle to PostgreSQL, Challenges to Opportunity
[EPPG] Oracle to PostgreSQL, Challenges to Opportunity[EPPG] Oracle to PostgreSQL, Challenges to Opportunity
[EPPG] Oracle to PostgreSQL, Challenges to Opportunity
 
Apache Solr: Upgrading Your Upgrade Experience - Hrishikesh Gadre, Lucidworks
Apache Solr: Upgrading Your Upgrade Experience - Hrishikesh Gadre, LucidworksApache Solr: Upgrading Your Upgrade Experience - Hrishikesh Gadre, Lucidworks
Apache Solr: Upgrading Your Upgrade Experience - Hrishikesh Gadre, Lucidworks
 
Introduction to Apache Solr
Introduction to Apache SolrIntroduction to Apache Solr
Introduction to Apache Solr
 
Oracle by Muhammad Iqbal
Oracle by Muhammad IqbalOracle by Muhammad Iqbal
Oracle by Muhammad Iqbal
 
Large Scale ETL for Hadoop and Cloudera Search using Morphlines
Large Scale ETL for Hadoop and Cloudera Search using MorphlinesLarge Scale ETL for Hadoop and Cloudera Search using Morphlines
Large Scale ETL for Hadoop and Cloudera Search using Morphlines
 
Data Science with Solr and Spark
Data Science with Solr and SparkData Science with Solr and Spark
Data Science with Solr and Spark
 
Search at Twitter
Search at TwitterSearch at Twitter
Search at Twitter
 
Introduction to Lucene and Solr - 1
Introduction to Lucene and Solr - 1Introduction to Lucene and Solr - 1
Introduction to Lucene and Solr - 1
 
Best practices on Building a Big Data Analytics Solution (SQLBits 2018 Traini...
Best practices on Building a Big Data Analytics Solution (SQLBits 2018 Traini...Best practices on Building a Big Data Analytics Solution (SQLBits 2018 Traini...
Best practices on Building a Big Data Analytics Solution (SQLBits 2018 Traini...
 
Webinar: What's New in Solr 7
Webinar: What's New in Solr 7 Webinar: What's New in Solr 7
Webinar: What's New in Solr 7
 
Oracle to Postgres Migration - part 2
Oracle to Postgres Migration - part 2Oracle to Postgres Migration - part 2
Oracle to Postgres Migration - part 2
 
Integrating the Solr search engine
Integrating the Solr search engineIntegrating the Solr search engine
Integrating the Solr search engine
 
Solr Indexing and Analysis Tricks
Solr Indexing and Analysis TricksSolr Indexing and Analysis Tricks
Solr Indexing and Analysis Tricks
 

En vedette

Pandemics Week 3 Presentation Summary 1 D
Pandemics Week 3 Presentation Summary 1 DPandemics Week 3 Presentation Summary 1 D
Pandemics Week 3 Presentation Summary 1 Dguest7a4f92
 
Next Generation Spring MVC with Spring Roo
Next Generation Spring MVC with Spring RooNext Generation Spring MVC with Spring Roo
Next Generation Spring MVC with Spring RooStefan Schmidt
 
Powerpoint version of question two
Powerpoint version of question twoPowerpoint version of question two
Powerpoint version of question twoLeon Thomas
 
World Music Week 3 Presentation
World Music Week 3 PresentationWorld Music Week 3 Presentation
World Music Week 3 Presentationguest7a4f92
 
Java Enterprise Applications in the Cloud: Fast, Fun and Easier than Ever
Java Enterprise Applications in the Cloud: Fast, Fun and Easier than EverJava Enterprise Applications in the Cloud: Fast, Fun and Easier than Ever
Java Enterprise Applications in the Cloud: Fast, Fun and Easier than EverStefan Schmidt
 
At home-animated.ppt
At home-animated.pptAt home-animated.ppt
At home-animated.pptmbosch59
 
World cup week 4 presentation
World cup week 4 presentationWorld cup week 4 presentation
World cup week 4 presentationguest7a4f92
 

En vedette (20)

Mr. Alan Cowen
Mr. Alan CowenMr. Alan Cowen
Mr. Alan Cowen
 
Pandemics Week 3 Presentation Summary 1 D
Pandemics Week 3 Presentation Summary 1 DPandemics Week 3 Presentation Summary 1 D
Pandemics Week 3 Presentation Summary 1 D
 
Next Generation Spring MVC with Spring Roo
Next Generation Spring MVC with Spring RooNext Generation Spring MVC with Spring Roo
Next Generation Spring MVC with Spring Roo
 
C:\fakepath\ch 1 intro_to_ob
C:\fakepath\ch 1 intro_to_obC:\fakepath\ch 1 intro_to_ob
C:\fakepath\ch 1 intro_to_ob
 
Creative commons folkbildning
Creative commons folkbildningCreative commons folkbildning
Creative commons folkbildning
 
Cckth
CckthCckth
Cckth
 
Powerpoint version of question two
Powerpoint version of question twoPowerpoint version of question two
Powerpoint version of question two
 
Arima i Hais
Arima i HaisArima i Hais
Arima i Hais
 
Openspace isoc
Openspace isocOpenspace isoc
Openspace isoc
 
World Music Week 3 Presentation
World Music Week 3 PresentationWorld Music Week 3 Presentation
World Music Week 3 Presentation
 
Java Enterprise Applications in the Cloud: Fast, Fun and Easier than Ever
Java Enterprise Applications in the Cloud: Fast, Fun and Easier than EverJava Enterprise Applications in the Cloud: Fast, Fun and Easier than Ever
Java Enterprise Applications in the Cloud: Fast, Fun and Easier than Ever
 
Sociala medier läromedel
Sociala medier läromedelSociala medier läromedel
Sociala medier läromedel
 
Ung företagande och Webbstjärnan
Ung företagande och WebbstjärnanUng företagande och Webbstjärnan
Ung företagande och Webbstjärnan
 
Ms. Nolwenn Bertrand
Ms. Nolwenn BertrandMs. Nolwenn Bertrand
Ms. Nolwenn Bertrand
 
Internetiskolan Webbstjarnan
Internetiskolan WebbstjarnanInternetiskolan Webbstjarnan
Internetiskolan Webbstjarnan
 
At home-animated.ppt
At home-animated.pptAt home-animated.ppt
At home-animated.ppt
 
Upphovsrätt och Källkritik Åva
Upphovsrätt och Källkritik ÅvaUpphovsrätt och Källkritik Åva
Upphovsrätt och Källkritik Åva
 
Twitter för oss #smp10 Boras
Twitter för oss #smp10 BorasTwitter för oss #smp10 Boras
Twitter för oss #smp10 Boras
 
World cup week 4 presentation
World cup week 4 presentationWorld cup week 4 presentation
World cup week 4 presentation
 
digitalaverktyg-skolan
digitalaverktyg-skolandigitalaverktyg-skolan
digitalaverktyg-skolan
 

Similaire à New Persistence Features in Spring Roo 1.1

hibernateormfeatures-140223193044-phpapp02.pdf
hibernateormfeatures-140223193044-phpapp02.pdfhibernateormfeatures-140223193044-phpapp02.pdf
hibernateormfeatures-140223193044-phpapp02.pdfPatiento Del Mar
 
Not Just ORM: Powerful Hibernate ORM Features and Capabilities
Not Just ORM: Powerful Hibernate ORM Features and CapabilitiesNot Just ORM: Powerful Hibernate ORM Features and Capabilities
Not Just ORM: Powerful Hibernate ORM Features and CapabilitiesBrett Meyer
 
Hibernate in XPages
Hibernate in XPagesHibernate in XPages
Hibernate in XPagesToby Samples
 
NoSQL, Apache SOLR and Apache Hadoop
NoSQL, Apache SOLR and Apache HadoopNoSQL, Apache SOLR and Apache Hadoop
NoSQL, Apache SOLR and Apache HadoopDmitry Kan
 
Infinum Android Talks #09 - DBFlow ORM
Infinum Android Talks #09 - DBFlow ORMInfinum Android Talks #09 - DBFlow ORM
Infinum Android Talks #09 - DBFlow ORMInfinum
 
Apache Solr - Enterprise search platform
Apache Solr - Enterprise search platformApache Solr - Enterprise search platform
Apache Solr - Enterprise search platformTommaso Teofili
 
Introduction to Solr
Introduction to SolrIntroduction to Solr
Introduction to SolrErik Hatcher
 
No sql and sql - open analytics summit
No sql and sql - open analytics summitNo sql and sql - open analytics summit
No sql and sql - open analytics summitOpen Analytics
 
BigData Faceted Search Comparison between Apache Solr vs. ElasticSearch
BigData Faceted Search Comparison between Apache Solr vs. ElasticSearchBigData Faceted Search Comparison between Apache Solr vs. ElasticSearch
BigData Faceted Search Comparison between Apache Solr vs. ElasticSearchNetConstructor, Inc.
 
Keynote Yonik Seeley & Steve Rowe lucene solr roadmap
Keynote   Yonik Seeley & Steve Rowe lucene solr roadmapKeynote   Yonik Seeley & Steve Rowe lucene solr roadmap
Keynote Yonik Seeley & Steve Rowe lucene solr roadmaplucenerevolution
 
KEYNOTE: Lucene / Solr road map
KEYNOTE: Lucene / Solr road mapKEYNOTE: Lucene / Solr road map
KEYNOTE: Lucene / Solr road maplucenerevolution
 
From Lucene to Solr 4 Trunk
From Lucene to Solr 4 TrunkFrom Lucene to Solr 4 Trunk
From Lucene to Solr 4 Trunktdthomassld
 
Introducing Hibernate OGM: porting JPA applications to NoSQL, Sanne Grinovero...
Introducing Hibernate OGM: porting JPA applications to NoSQL, Sanne Grinovero...Introducing Hibernate OGM: porting JPA applications to NoSQL, Sanne Grinovero...
Introducing Hibernate OGM: porting JPA applications to NoSQL, Sanne Grinovero...OpenBlend society
 
Spark Summit EU talk by Shay Nativ and Dvir Volk
Spark Summit EU talk by Shay Nativ and Dvir VolkSpark Summit EU talk by Shay Nativ and Dvir Volk
Spark Summit EU talk by Shay Nativ and Dvir VolkSpark Summit
 
Solr search engine with multiple table relation
Solr search engine with multiple table relationSolr search engine with multiple table relation
Solr search engine with multiple table relationJay Bharat
 
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...44CON
 

Similaire à New Persistence Features in Spring Roo 1.1 (20)

hibernateormfeatures-140223193044-phpapp02.pdf
hibernateormfeatures-140223193044-phpapp02.pdfhibernateormfeatures-140223193044-phpapp02.pdf
hibernateormfeatures-140223193044-phpapp02.pdf
 
Not Just ORM: Powerful Hibernate ORM Features and Capabilities
Not Just ORM: Powerful Hibernate ORM Features and CapabilitiesNot Just ORM: Powerful Hibernate ORM Features and Capabilities
Not Just ORM: Powerful Hibernate ORM Features and Capabilities
 
Hibernate in XPages
Hibernate in XPagesHibernate in XPages
Hibernate in XPages
 
NoSQL, Apache SOLR and Apache Hadoop
NoSQL, Apache SOLR and Apache HadoopNoSQL, Apache SOLR and Apache Hadoop
NoSQL, Apache SOLR and Apache Hadoop
 
Oracle OpenWo2014 review part 03 three_paa_s_database
Oracle OpenWo2014 review part 03 three_paa_s_databaseOracle OpenWo2014 review part 03 three_paa_s_database
Oracle OpenWo2014 review part 03 three_paa_s_database
 
Infinum Android Talks #09 - DBFlow ORM
Infinum Android Talks #09 - DBFlow ORMInfinum Android Talks #09 - DBFlow ORM
Infinum Android Talks #09 - DBFlow ORM
 
Apache Solr - Enterprise search platform
Apache Solr - Enterprise search platformApache Solr - Enterprise search platform
Apache Solr - Enterprise search platform
 
Introduction to Solr
Introduction to SolrIntroduction to Solr
Introduction to Solr
 
No sql and sql - open analytics summit
No sql and sql - open analytics summitNo sql and sql - open analytics summit
No sql and sql - open analytics summit
 
BigData Faceted Search Comparison between Apache Solr vs. ElasticSearch
BigData Faceted Search Comparison between Apache Solr vs. ElasticSearchBigData Faceted Search Comparison between Apache Solr vs. ElasticSearch
BigData Faceted Search Comparison between Apache Solr vs. ElasticSearch
 
Keynote Yonik Seeley & Steve Rowe lucene solr roadmap
Keynote   Yonik Seeley & Steve Rowe lucene solr roadmapKeynote   Yonik Seeley & Steve Rowe lucene solr roadmap
Keynote Yonik Seeley & Steve Rowe lucene solr roadmap
 
KEYNOTE: Lucene / Solr road map
KEYNOTE: Lucene / Solr road mapKEYNOTE: Lucene / Solr road map
KEYNOTE: Lucene / Solr road map
 
From Lucene to Solr 4 Trunk
From Lucene to Solr 4 TrunkFrom Lucene to Solr 4 Trunk
From Lucene to Solr 4 Trunk
 
Introducing Hibernate OGM: porting JPA applications to NoSQL, Sanne Grinovero...
Introducing Hibernate OGM: porting JPA applications to NoSQL, Sanne Grinovero...Introducing Hibernate OGM: porting JPA applications to NoSQL, Sanne Grinovero...
Introducing Hibernate OGM: porting JPA applications to NoSQL, Sanne Grinovero...
 
Apache drill
Apache drillApache drill
Apache drill
 
Spark Summit EU talk by Shay Nativ and Dvir Volk
Spark Summit EU talk by Shay Nativ and Dvir VolkSpark Summit EU talk by Shay Nativ and Dvir Volk
Spark Summit EU talk by Shay Nativ and Dvir Volk
 
Solr search engine with multiple table relation
Solr search engine with multiple table relationSolr search engine with multiple table relation
Solr search engine with multiple table relation
 
Sql Server2008
Sql Server2008Sql Server2008
Sql Server2008
 
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
 
Solr
SolrSolr
Solr
 

Dernier

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 

Dernier (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

New Persistence Features in Spring Roo 1.1

  • 1. Chicago, October 19 - 22, 2010 New Persistence Features in Spring Roo 1.1 Stefan Schmidt
  • 2. Agenda •  Spring Roo’s Approach to Persistence •  Incremental Database Reverse Engineering •  Apache Solr / Lucene Integration •  Alternative Persistence Technologies
  • 3. Spring Roo’s Approach to Persistence
  • 4. Peristence Choices •  JPA2 for ORM –  4 choices of ORM providers •  Hibernate •  EclipseLink •  OpenJPA •  DataNucleus (DN1 supported for GAE, DN2 used by VMforce) •  12+ Database choices –  constantly growning list of DBs to choose from –  popular ones: MySQL, Postgres, HSQLDB (for dev) •  Switch out ORM and / or DB with a single command –  persistence setup --provider HIBERNATE --database MYSQL
  • 5. No DAOs? •  No DAO layer by default –  Objections: •  testing •  separation of concern •  pluggable implementations •  non JPA persistence •  security authorizations •  security auditing •  finders •  architectural reasons
  • 6. Feature Extension Points •  Add-ons can contribute persistence feature extensions via ITDs –  Finder add-on is a good example •  Every @RooEntity exposes the JPA entity manager –  use for creating custom type-safe queries via Criteria API –  getting access to the underlying ORM
  • 8. Alternatives to Roo’s Incremental DBRE •  Eclipse “JPA Entities from tables” wizard –  Generates entities from a JDBC connection –  Can be tailored to change generated type and field names –  Does not handle tables with no primary keys •  JPA Implementation Tools
  • 9. Limitations of Existing DBRE Tools •  Lack of incremental reverse engineering •  Complex and long-winded wizard style interactions •  Missing entity lifecycle management –  Application requires manual adjustment if the datamodel changes
  • 10. Introducing Roo’s Incremental Database Reverse Engineering •  DBRE was the most requested feature for Spring Roo •  Introspect relational databases such as Oracle, MySQL, PostgreSQL and Microsoft SQL Server •  Reverse engineer complex schemas into Java entities in seconds •  Creates and maintains relationships with JPA 2.0 annotations •  Incrementally updates your domain model as your DB schema changes
  • 11. How does DBRE work? •  Uses the standard java.sql.DatabaseMetaData implementation of your JDK •  Connects to a live database using JDBC and creates entities from the database metadata obtained •  Similar to the output generated by the Eclipse wizard with all accepted defaults
  • 12. Spring Roo DBRE Commands •  database introspect --schema <name> [--file <name>] –  Displays database metadata in XML format in the Roo shell –  Optional --file <file name> saves metadata to specified file –  Provides a preview of the mappings used in the final model
  • 13. Spring Roo DBRE Commands •  database reverse engineer [--schema <name>] [-- package <name>] –  Creates entities in the specified package –  --schema and --package options required only for first time run of command –  Automatically generates type and field names from table and column names –  JPA-annotated fields and getters/setters saved in AspectJ ITDs, eg Person_Roo_DbManaged.aj
  • 14. Primary Keys •  Supports single and composite primary keys –  Creates a separate primary key class for tables having more than one primary key or no primary key (uses all fields for key) –  Annotates the primary key class with @Embeddable and the entity's id with @EmbeddedId
  • 15. Entity Relationships •  Automatically creates and maintains bi-directional relationships: –  @ManyToMany, many-valued associations with many-to- many multiplicity –  @OneToOne, single-valued associations to other entities that have one-to-one multiplicity –  @OneToMany, many-valued associations with one-to-many multiplicity –  @ManyToOne, single-valued associations to other entities that have many-to-one multiplicity
  • 17. Apache Solr / Lucene Integration
  • 18. What is Apache Solr? •  Search server •  Built upon Apache Lucene (Java) •  Fast, very •  Scalable, query load and collection size •  Distributed search and index replication •  Interoperable •  Extensible
  • 19. Solr Features •  Powerful full-text search •  Hit highlighting •  Faceted search •  Spell checking •  Dynamic clustering •  Database integration •  Rich document (e.g., Word, PDF) handling.
  • 20. Interacting with Solr •  HTTP GET / POST •  JSON / XML •  SolrJ (embedded over HTTP) •  Ruby: solr-ruby, RSolr •  many others: python, PHP, solrsharp, XSLT •  JMX monitoring available •  Admin interface available
  • 21. Configuring Solr •  schema.xml –  Defines field types –  Can drive more intelligent processing –  Dynamic Fields enable on-the-fly addition of new fields –  CopyField •  indexing a single field multiple ways •  combining multiple fields into a single searchable field –  Many additional text analysis components •  word splitting, •  regex filters •  sounds-like filters
  • 22. Roo Solr Integration •  Roo Shell –  solr setup  install SolrJ driver in project pom.xml –  solr add  make individual type searchable –  solr all  make all JPA entities searchable •  @RooSolrSearchable type annotation •  Hooks into JPA lifecycle –  @PostPersist –  @PostUpdate –  @PreDelete •  Uses SolrJ client
  • 23. Entity Methods Introduced via Roo •  QueryResponse search(String queryString) •  QueryResponse search(SolrQuery query) •  @Async void indexPerson(Person person) •  @Async void indexPeople(Collection<Person> people) •  @Async deleteIndex(Owner owner) •  solrServer is also accessible on target type.
  • 26. Demand for Choice •  ROO-301: Choose between data access patterns –  demand for repository and DAO pattern support •  70+ votes in Spring Roo Jira, second most popular issue –  Spring JDBC template –  demand for iBatis support (ROO-452) –  demand for NoSQL integration –  demand for polyglot persistence
  • 27. Hades Add-On •  Have you heard of Hades project? –  Utility library to work with Data Access Objects •  implemented with Spring and JPA –  Main goal is to ease the development and operation of a data access layer in applications •  Installation in the Roo shell with a single command: –  addon install --bundleSymbolicName org.synyx.hades.roo.addon –  hades setup –  hades repository --entity ~.domain.Person –  more features planned (finders, DDD, etc)
  • 29. Summary •  Roo has deep and rich persistence support •  Roo’s Incremental DBRE feature is the next generation in DBRE capabilities •  Solr and Incremental DBRE offer devs a major productivity boost •  Alternative persistence technologies supported and expanding