SlideShare una empresa de Scribd logo
1 de 29
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

Destacado

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
 

Destacado (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
 

Similar a 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
 

Similar a 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
 

Último

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
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
 
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
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 

Último (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 
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...
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 

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