Recent Posts
Archives

Posts Tagged ‘DavidDelabassee’

PostHeaderIcon [DevoxxFR2013] Java EE 7 in Detail

Lecturer

David Delabassee is a Principal Product Manager in Oracle’s GlassFish team. Previously at Sun for a decade, he focused on end-to-end Java, related technologies, and tools. Based in Belgium, he contributes to Devoxx Belgium’s steering committee.

Abstract

David Delabassee’s overview details Java EE 7’s innovations, emphasizing developer simplicity and HTML5 support. Covering WebSockets, JSON-P, JAX-RS 2, JMS 2, concurrency, caching, and batch processing, he demonstrates features via GlassFish. The analysis explores alignments with modern needs like cloud and modularity, implications for productivity, and forward compatibility.

Evolution and Key Themes: Simplifying Development and Embracing Modern Web

Delabassee notes Java EE 6’s (2009) popularity, with widespread server adoption. Java EE 7, nearing finalization, builds on this via JCP, comprising 13 updated, 4 new specs.

Themes: ease of development (defaults, pruning), web enhancements (HTML5 via WebSockets), alignment with trends (cloud, multi-tenancy). Pruning removes outdated techs like EJB CMP; new APIs address gaps.

GlassFish 4, the reference implementation, enables early testing. Delabassee demos features, stressing community feedback.

Core API Enhancements: WebSockets, JSON, and REST Improvements

WebSocket (JSR 356): Enables full-duplex, bidirectional communication over single TCP. Annotate endpoints (@ServerEndpoint), handle messages (@OnMessage).

@ServerEndpoint("/echo")
public class EchoEndpoint {
    @OnMessage
    public void echo(String message, Session session) {
        session.getBasicRemote().sendText(message);
    }
}

JSON-P (JSR 353): Parsing/processing API with streaming, object models. Complements JAX-RS for RESTful services.

JAX-RS 2 (JSR 339): Client API, filters/interceptors, async support. Client example:

Client client = ClientBuilder.newClient();
WebTarget target = client.target("http://example.com");
Response response = target.request().get();

These foster efficient, modern web apps.

Messaging and Concurrency: JMS 2 and Utilities for EE

JMS 2 simplifies: annotation-based injection (@JMSConnectionFactory), simplified API for sending/receiving.

@Inject
JMSContext context;

@Resource(lookup="myQueue")
Queue queue;

context.send(queue, "message");

Concurrency Utilities (JSR 236): Managed executors, scheduled tasks in EE context. Propagate context to threads, avoiding direct Thread creation.

Batch Applications (JSR 352): Framework for chunk/step processing, job management. XML-defined jobs with readers, processors, writers.

Additional Features and Future Outlook: Caching, CDI, and Java EE 8

Though JCache (JSR 107) deferred, it enables standardized distributed caching, usable on EE 7.

CDI 1.1 enhances: @Vetoed for exclusions, alternatives activation.

Java EE 8 plans: modularity, cloud (PaaS/SaaS), further HTML5. Community shapes via surveys.

Delabassee urges Adopt-a-JSR participation for influence.

Implications for Enterprise Development: Productivity and Adaptability

Java EE 7 boosts productivity via simplifications, aligns with web/cloud via new APIs. Demos show practical integration, like WebSocket chats or batch jobs.

Challenges: Learning curve for new features; benefits outweigh via robust, scalable apps.

Forward, EE 7 paves for EE 8’s evolutions, ensuring Java’s enterprise relevance.

Links:

PostHeaderIcon [DevoxxFR2012] 55 Lesser-Known Features of Java 7: Unveiling Hidden Enhancements Across the Platform

Lecturer

David Delabassee serves as a Director of Developer Relations in the Java Platform Group at Oracle, where he champions Java technologies worldwide through presentations, technical articles, and open-source engagements. Previously at Sun Microsystems for a decade, he focused on end-to-end Java implementations, from smart cards to high-end servers. A member of the Devoxx Belgium steering committee, David co-hosts the Inside Java Podcast and maintains a blog at delabassee.com. He holds Belgian nationality and has spoken at numerous conferences and Java User Groups.

Abstract

This article investigates David Delabassee’s rapid-fire presentation on 55 underappreciated features of Java 7, released in 2011, extending beyond well-known additions like Project Coin, Fork/Join, NIO.2, and invokedynamic. It categorizes enhancements across core libraries, security, internationalization, graphics, and more, analyzing their practical utilities and implementation details. Positioned as a post-Sun acquisition milestone under Oracle, the discussion evaluates how these refinements bolster platform stability, performance, and developer productivity. Through code demonstrations and comparisons to prior versions, it assesses implications for migration, legacy code maintenance, and modern application design, emphasizing Java 7’s role in bridging to future iterations like Java 8.

Core Language and Library Improvements

Java 7 introduced subtle yet impactful tweaks to foundational elements, addressing longstanding pain points. David highlights enhanced exception handling: multi-catch clauses consolidate try-catch blocks for related exceptions, reducing redundancy:

try {
    // Code
} catch (IOException | SQLException e) {
    // Handle
}

String switches leverage interned strings for efficient comparisons, useful in parsing:

switch (input) {
    case "start": // Action
        break;
    // ...
}

Underscores in numeric literals improve readability for large numbers: long creditCard = 1234_5678_9012_3456L;.

Library updates include Objects class utilities like requireNonNull() for null checks, and BitSet enhancements with valueOf() for byte/long array conversions. These foster cleaner, more maintainable code, mitigating common errors in enterprise applications.

Security and Cryptography Advancements

Security received substantial bolstering, crucial amid rising threats. David details elliptic curve cryptography integration, offering stronger keys with smaller sizes for SSL/TLS. Algorithm disabling via jdk.security.provider.disabledAlgorithms property enhances compliance.

SChannel provider on Windows improves native integration, while JSSE updates support SNI for virtual hosting. These fortify networked applications, essential for cloud and web services, reducing vulnerability exposure without external libraries.

Internationalization and Locale Refinements

Java 7 refined locale handling for global apps. Unicode 6.0 support adds scripts like Batak, enhancing text processing. Locale enhancements include script, variant, and extension keys:

Locale loc = new Locale.Builder().setLanguage("fr").setRegion("FR").setScript("Latn").build();

Currency updates reflect ISO 4217 changes, with getAvailableCurrencies() listing supported ones. NumberFormat improvements allow custom symbols, aiding financial software. These ensure accurate, culturally sensitive representations, vital for international markets.

Graphics and UI Toolkit Upgrades

Swing and AWT saw usability boosts. Translucent/shaped windows via GraphicsDevice enable modern UIs:

window.setOpacity(0.5f);

Nimbus look-and-feel, now default in some contexts, provides scalable, themeable components. JLayer adds decoration layers for effects like blurring. These empower richer desktop apps, aligning Java with contemporary design trends.

Performance and JVM Optimizations

JVM internals evolved for efficiency. Tiered compilation combines client/server compilers for faster startups and peak performance. G1 garbage collector, experimental in Java 7, targets low-pause collections for large heaps.

Compressed oops extend 32-bit addressing to 64-bit, reducing memory footprint. These optimizations benefit server-side applications, improving throughput and responsiveness in high-load scenarios.

Migration Considerations and Ecosystem Impact

Adopting Java 7 involves assessing compatibility, given end-of-life for Java 6. David notes seamless transitions for most code, but highlights needs like updating deprecated APIs. Tools like javac -Xlint warn of issues.

Ecosystem-wise, Java 7 paved for Java 8’s lambdas, solidifying Java’s enterprise dominance. Implications include smoother upgrades, enhanced security postures, and broader internationalization, encouraging developers to leverage these for robust, future-proof systems.

Links: