Jadira Usertype Integrating Hibernate with Joda Time and JSR 310

Slides:



Advertisements
Similar presentations
Vincent Massol, 1 st December 2006 Quality with Maven2.
Advertisements

COUNTER: improving usage statistics Peter Shepherd Director COUNTER December 2006.
DynaTrace Platform.
Introduction to Maven 2.0 An open source build tool for Enterprise Java projects Mahen Goonewardene.
Test Automation Success: Choosing the Right People & Process
Spring, Hibernate and Web Services 13 th September 2014.
Introduction to the Spring Framework University of Kansas January 2009 This presentation and example application are available at
1 The IIPC Web Curator Tool: Steve Knight The National Library of New Zealand Philip Beresford and Arun Persad The British Library An Open Source Solution.
Improving Process for Better Software. Who We Are An experiential learning program that provides technology solutions for our partners, and real- world.
Direct Congress Dan Skorupski Dan Vingo 15 October 2008.
© 2005, Cornell University. Rapid Application Development using the Kuali Architecture (Struts, Spring and OJB) A Case Study Bryan Hutchinson
WORKDAY TECHNOLOGY Stan Swete CTO - Workday 1.
Troy Eversen | 19 May 2015 Data Integrity Workshop.
Hibernatification! Roadmap for Migrating from Plain Old SQL on JDBC to JPA on Hibernate Duke Banerjee Senior Developer, DrillingInfo.com.
Towards Bboogle 3.0.0: a Technical Walkthrough Patricia Goldweic Sr. Software Engineer AR&T, Northwestern University Brian Nielsen Manager, Faculty Support.
UPortal 3 – What's New? JA-SIG Conference, Spring 2008 uPortal What's New? Eric Dalquist University of Wisconsin - Madison.
Ruby & rails by Nicholas Belotti. What is ruby Ruby is an object orientated scripting language. In Ruby...everything is an object! Ruby was released in.
PowerTier EJB in High-Performance Applications John Killoran European Technical Services Manager Persistence Software.
JSR Review Process April Patrick Curran, Mike Milinkovich, Heather Vancura, Bruno Souza.
M i SMob i S Mob i Store - Mobile i nternet File Storage Platform Chetna Kaur.
- 1 - Roadmap to Re-aligning the Customer Master with Oracle's TCA Northern California OAUG March 7, 2005.
CHAPTER 14 USING RELATIONAL DATABASES TO PROVIDE OBJECT PERSISTENCE (ONLINE) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database.
Fundamentals of Database Chapter 7 Database Technologies.
Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy
JDBC Java and Databases. RHS – SOC 2 JDBC JDBC – Java DataBase Connectivity An API (i.e. a set of classes and methods), for working with databases in.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 14 Using Relational Databases to Provide Object Persistence (Overview) Modern Database.
UPortal 3JA-SIG Summer Conference 2006 uPortal 3.
TAKE – A Derivation Rule Compiler for Java Jens Dietrich, Massey University Jochen Hiller, TopLogic Bastian Schenke, BTU Cottbus.
User-defined type checkers for error detection and prevention in Java Michael D. Ernst MIT Computer Science & AI Lab
NA-MIC National Alliance for Medical Image Computing UCSD: Engineering Core 2 Portal and Grid Infrastructure.
SiD Workshop October 2013, SLACDmitry Onoprienko SiD Workshop SLAC, October 2013 Dmitry Onoprienko SLAC, SCA FreeHEP based software status: Jas 3, WIRED,
What's New in Kinetic Calendar 2.0 Jack Boespflug Kinetic Data.
Ganymede Simultaneous Release | © 2008 by Springsite B.V., The Netherlands made available under the EPL v1.0 Teneo Ganymede Simultaneous Release.
AN ASPECT-ORIENTED ARCHITECTURE FOR HANDLING VARIATION ACROSS MOBILE PLATFORMS Proposed by: Chokchai Phatharamalai Advisor: Dr. Paul Janecek.
Ruby on Java Luc Castera
Sharing Objects  Synchronization  Atomicity  Specifying critical sections  Memory visibility  One thread’s modification seen by the other  Visibility.
Overview and update Pete Raymond. » Purpose of this presentation » Background » JSR Requirements » Key concepts » Relationship to other standards/approaches.
UPortal 3: Sneak PreviewJA-SIG Winter Conference 2005 uPortal 3 sneak preview Eric Dalquist, Peter Kharchenko Unicon Inc.
Darone Jones - Program Lead Aaron Sutula – Technical Lead Iris Application Framework.
Wiki Roadmap 4.1 This document is written to represent the thoughts behind the wiki roadmap 4.1 and to reflect on discussions in irc. It is also a representation.
Dispatching Java agents to user for data extraction from third party web sites Alex Roque F.I.U. HPDRC.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Introduction to Data Access with Spring.
Lecture 21: Component-Based Software Engineering
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Overview of the Spring Framework Introducing.
Copyright Vincent Massol 2006 – All rights reserved Panorama of Quality Features in Maven2 Vincent Massol, 11 July 2006
Fundamentals of MyBATIS
July 19, 2004Joint Techs – Columbus, OH Network Performance Advisor Tanya M. Brethour NLANR/DAST.
Preventing bugs with pluggable type-checking Michael Ernst MIT
Introduction to ORM Hibernate Hibernate vs JDBC. May 12, 2011 INTRODUCTION TO ORM ORM is a programming technique for converting data between relational.
Google Code Libraries Dima Ionut Daniel. Contents What is Google Code? LDAPBeans Object-ldap-mapping Ldap-ODM Bug4j jOOR Rapa jongo Conclusion Bibliography.
Briefing and Planning meeting on INSPIRE validator implementation – Discussion 16/12/2015.
Tutorial on Science Gateways, Roma, Catania Science Gateway Framework Motivations, architecture, features Riccardo Rotondo.
Overview of Basic 3D Experience (Enovia V6) Concepts
Hibernate Java Persistence API. What is Persistence Persistence: The continued or prolonged existence of something. Most Applications Achieve Persistence.
A SCRIPT FOR ARCHIVING DIGITAL RESEARCH DATA IMPROVING ACCURACY AND EFFICIENCY IN THE DATAVERSE NETWORK ABSTRACT SUMMARY Rachel Carriere, Thu-Mai Christian,
XML and Distributed Applications By Quddus Chong Presentation for CS551 – Fall 2001.
Review for Eclipse Release Review | © 2012 by Review for Eclipse Committers, made available under the EPL v1.0 1 Review for Eclipse (R4E) 0.11 Release.
Get testing with tSQLt Practical examples and automation Steve Jones SQLServerCentral Red Gate Software.
B.6 Roadmap 2013 – 2014 SDMX RI User Group Luxembourg, September 2013.
Savannah to Jira Migration
POOL persistency framework for LHC
CS170 ygao JAVA, C7.
Building an Integrable XBRL Portal Daniel Hamm German Central Bank
SDMX: Enabling World Bank to automate data ingestion
Lunch & Learn: Are you letting your users be your testers?
What Time Is It? Martin Phillips Ladybridge Systems.
Teneo Ganymede Simultaneous Release Graduation Review
Developing and testing enterprise Java applications
Release definition & scheduling
Overview Activities from additional UP disciplines are needed to bring a system into being Implementation Testing Deployment Configuration and change management.
Presentation transcript:

Jadira Usertype Integrating Hibernate with Joda Time and JSR 310

Background Hibernate: Object Relational Mapping Framework for Java. At one time a defacto standard, Hibernate is now also the leading implementation of JPA (Java Persistence API) Joda Time: Widely used API for Date and Time. Superior to java.util.Date and Calendar for many reasons… thread safety, immutable, distinguishes Date, Time, DateTime and Time Zones effectively JSR310: Overhaul of core Java’s date and time APIs based on Joda Time. Scheduled for Java 7

Why Jadira Usertype JSR310 does not (yet) integrate with JPA so alternative mechanism is required. Hibernate provides APIs for implementing Usertypes or User-Defined Types Existing contributed user type support for Joda Time has not been updated for some time JDBC, Hibernate and Joda Time Contrib all (somewhat unexpectedly) modify dates and times when JVM and Database have different timezones – no good at all for correctly storing a Local Date or DateTime with specific zone.

Project Structure JSR 310 support’s module structure is similar but tests utilise Hibernate 3.6 and JPA2

Timeline VersionDateDescription Bugfix (NullPointerException when using Hibernate 3.5) Hibernate 3.6 compatibility UTC DateTime Behaviour Tweak Fix Java 5 Support Published to Maven Central New Types (including Joda Time) Initial Release (supports JSR 310)

Design Problems Various representations of types available (String, milliseconds since 1970, SQL Date, Timestamp etc) Representations can be qualified with and without zones and mapped to single or multiple columns Addressing the JDBC offsetting problem ( Maintenance and testing New challenges – supporting Hibernate 3.6

Mapping Columns: Column Mapper Most behaviour is consolidated into abstract classes that are parameterized by the type they map to…

Mapping Columns: Column Mapper (2) … yielding lightweight column mapping implementations

Bringing it all together The type that uses this column-mapper to persist a Joda LocalTime to the database is even more lightweight. Uses Super Type Tokens ( ost.jsp?thread=206350) ost.jsp?thread=206350

Bringing it all together (2) Multi-column types use n column mappers Can reuse mappers written for single column mappings For example: OffsetDateTime is stored as an offset and a LocalDateTime to two columns

Quality PMD, Findbugs, JDepend used for automated metrics capture Cobertura provides code coverage information… Unit Tests use DBUnit, embedded H2Database and JPA: Tests verify that the types actually stored in the database are written, stored and read correctly. JodaTime Contrib unit tests never verified what was stored… the value was offset incorrectly when written and again when read During testing uncovered and reported some issues in other open source projects: JSR 310 Public Draft (relating to formatting of sub-seconds in the Period type) DBUnit (formatting of milliseconds and nanoseconds in Timestamp types)

Hibernate 3.6 Support Problem: Hibernate 3.6 changed its Type API, but its not synced to Maven central Solution: Check for presence of Hibernate 3.6 API and use reflection if available; plan to revisit when JBoss start synchronising their releases to Maven Central

Who Uses Jadira Usertype? Releases 1.0 and 1.1 totalled 100s of downloads; Since 1.2 distribution is via Maven Central, statistics are not available; Since April, Joda Time project has recommended Usertype; Two community reported bugs and fixes received; Project used by my employer to support business domains in global sales, operations, financing, integration and web channels; Project supports equivalents to all Joda Time Contrib types providing ease of migration; Wherever possible Usertype’s JodaTime and JSR 310 modules provide equivalent user types

Questions?