Click here to load reader
Upload
neil-brown
View
379
Download
1
Embed Size (px)
DESCRIPTION
Overview of new features in Java 7, including code examples, and suggested outline migration (upgrade) strategy.
Citation preview
New Features and Migration Strategy
Neil Brown, 04/2013
- Brown Bag, Part 1 -
Java Standard Edition (JSE) - Today
JSE, Today
● J6 end-of-life'd by Oracle 02-2013, but...
...there's life after J6:
● J7 mature - first GA (prod. ready) 07-2011 ● J8 descoped (Jigsaw) and slipped (end
2012, 09-2013). Latest plan GA 03-2014
The Business Case
J7 - The Business Case
● Maintenance & security updates from Oracle until at least 07-2014
● Performance improvements, translating to better response times & throughput○ HotSpot JVM enhancements○ Improved concurrency support
● New features to keep dev team :-) and more productive○ Prerequisite / enabler for JEE7
New & Changed Features - Highlights
J7 - HighlightsTargets improved performance & readability● Java language enhancements (Project Coin)● Concurrency enhancements (Fork/Join)● New File I/O (NIO.2)● XML APIs (JAXP, JAXB, JAX-WS) updated● Platform (JVM) enhancements
○ HotSpot JVM performance improvements○ Better support for dynamic lang. (invokedynamic)○ New 'G1' garbage collector for certain server apps
...and more. See Oracle JDK 7 Adoption Guide
Migration - How do we get there?
J7 - How do we get there?
In two phases:1. Prove runtime compatibility & stability for
existing services on J7 runtime (JVM) before...
2. Recompiling services to take advantage of new language features; (at which point we're committed to J7)
Phase 1 Migration Plan - Overview
1. Prove binary backwards compatibility for JEE container & all Java services○ Local dev. environment○ Existing JEE container running on J7 JVM○ Services deployed to J7+container○ Unit and cursory integration tests pass
2. Prove behavioural compatibility for all Java services○ Install JDK 7 (JRE) in CI environment○ Execute integration test suites
Phase 1 Migration Plan - Overview
3. Soak testing● Prove reliability over extended period
4. Performance testing● Confirm performance at least as good
5. Phased rollout J7 across remaining envs● Upgrade JDK / JRE (still J6 javac only)
6. Prove in production○ Services to run on J7 for agreed period before
declaring success and moving to phase 2 (J7 javac)
Phase 1 Migration Status 04/2013
1. Prove binary backwards compatibility for JEE container & all Java services○ Local dev. environment ................................ ✔○ JEE container running on J7 JVM ............... ✔○ Services deployed to J7+container .............. ✔○ Unit and cursory integration tests pass ........ ✔
2. Prove behavioural compatibility for all Java services○ Install JDK 7 (JRE) in CI environment ........ ✍○ Execute integration test suites .................... ✍
Language Enhancements(Project Coin)
New Language Features● Diamond operator
○ Type inference for generic types● Multi-catch blocks
○ Improved exception handling● Automatic resource management
○ aka try-with-resources● Switch on strings
○ Enhanced switch statement● Binary literals
○ Integer types expressed in binary
New Language Features
● Underscores in integer and binary literals○ Increased code readability
Java 7 code examples● https://bitbucket.org/neilbrown/java7-examples
Thanks for attendingNeil Brown