Jonathan Gallimore | Tomitribe Cluster your application with JCache and CDI.

Slides:



Advertisements
Similar presentations
Java EE - Introduction -
Advertisements

Apache Maven: J2EE Front to Back Jesse McConnell -
Question examples. Session 1 Objectives Why certify? Positioning of the non-technical version What is Java? Key advantages of Java Java Applications vs.
Apache TomEE Tomcat Web Profile certified TomEE gesprochen Tommy.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 1.
@mnriem#DV14 #MVC MVC 1.0 in JavaEE 8 A long time coming, or like some would say “finally!” Why are we doing it now? Survey input Customer input JavaEE.
 Java EE 7 The new features of the upcoming Enterprise Edition.
Sergio Ferreira MoreData I16 Thursday, October 12, :30 a.m. – 11:30 a.m. Platform: Informix How to call Informix 4gl code from J2EE.
1 Dive into Apache Geronimo 3.0 Xu Haihong Apache Geronimo PMC
JBoss Seam: Contextual Components Jason Bechtel
Application Servers What is it? General A set of software frameworks, components, utilities, functionality that enables you to develop and deliver n-tiered.
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of The Eclipse Web Tools Platform.
MC365 Application Servers: Tomcat. Today We Will: Discuss what application servers are Introduce Tomcat Download and install Tomcat Break up into teams.
© 2005, Cornell University. Rapid Application Development using the Kuali Architecture (Struts, Spring and OJB) A Case Study Bryan Hutchinson
Current Topics in Programming Languages Lecture 15_1 George Koutsogiannakis SUMMER
1.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.Public 1 Testing Java EE Applications using Arquillian Reza Rahman Java EE/GlassFish.
Introduction to EJB INFORMATICS ENGINEERING – UNIVERSITY OF BRAWIJAYA Eriq Muhammad Adams J
© Internna Technologies 1 IWebMvc Features, Possibilities & Goals.
Understanding and Managing WebSphere V5
J AVA SE, EE, AND ME Compiled (with permission) from Sang Shin’s Introduction to Java EE Online Course Introduction to Java EE Online Course.
Java Frameworks Indy Java Users Group January 29, 2003.
MAVEN-BLUEMARTINI Yannick Robin. What is maven-bluemartini?  maven-bluemartini is Maven archetypes for Blue Martini projects  Open source project on.
JRun 4 & Macromedia MX Tommy Reilly JRun Engineer.
Kuali Rice at Indiana University Rice Setup Options July 29-30, 2008 Eric Westfall.
4/1/2003Application Server Standards Application Server Standards for ITSS Bruce Vincent, ITSS Technology Strategist.
What’s new in Stack 3.2 Michael Youngstrom. Disclaimer This IS a presentation – So sit back and relax Please ask questions.
An Introduction to Seam 3 Reza Rahman Expert Group Member, Java EE 6 and EJB 3.1 Resin EJB 3.1 Lite Container Lead Author, EJB 3 in Action
Entity Java Beans Jorg Janke Open Source ERP & CRM.
Application Servers: Tomcat. What is an application server? Servlets are Java’s answer to server-side programming. Servlets are a special type of Java.
Bologna, September 2003 Giorgia Lodi Department of Computer Science University of Bologna V.Ghini, F. Panzieri.
Spring core v3.x Prepared by: Nhan Le. History v3.0 Spring Expression Language Java based bean metadata v3.1 Cache Abstraction Bean Definition Profile.
© 2006 IBM Corporation IBM WebSphere Portlet Factory Architecture.
 Embeds Java code  In HTML tags  When used well  Simple way to generate dynamic web-pages  When misused (complex embedded Java)  Terribly messy.
Enterprise Java v120131Intro to JavaEE1 Java EE 5 TM Introduction.
Message Driven Beans & Web Services INFORMATICS ENGINEERING – UNIVERSITY OF BRAWIJAYA Eriq Muhammad Adams J
CHEF II / Sakai Architecture. CHEF II Changes uPortal replaces Jetspeed –jsr 168 portlet, servlet compliant Spring replaces Turbine component framework.
Struts: An Insiders View October Abstract Struts is the de facto standard framework for Java web applications, but where did it come from, and where.
JBoss Overview J2EE Sig Presenter: Steve Davidson Stephen Davidson & Associates, INC.
Introduction to Web Dimitar Nenchev Ivan Nakov
1 Apache TomEE // JavaEE Web Profile on Tomcat Jonathan #TomEE.
Introductions  Two decades in software development  Software Engineering Solutions, Inc.  Technical Reviewer: Core.
Apache DS 2.0 Emmanuel Lécharny Nextury What's new ?
Chính phủ điện tử TS. Phạm Văn Tính Khoa CNTT, ĐH Nông Lâm TP.HCM
Web dialogs as drop-in components Håkan Dahl, Callista Enterprise AB Killing the monolithic webapp.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Spring MVC Essentials Getting started.
Spring and DWR Frameworks for Rich Web Enterprise Application Thomas Wiradikusuma Presentation to the 20 th.
JAVA EE 6 Best Practices for Migrating Spring to WTF ?!?
SCA and Java n SCA provides support for multiple Java-based component implementation types l Java POJOs (implementation.java) l Spring Beans (implementation.spring)
Impala A dynamic module framework for Java web development Phil Zoio Realsolve Solutions Devoxx 12 December, 2008.
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
Test Java EE applications with Arquillian Ivan St. Ivanov.
What is J2EE?  Java J2ee developers on top of this provide the various kinds of services that are essential to develop large scale, allocated, component.
1.Education Overview JAVA EE 6 Technologies
Lecture Transforming Data: Using Apache Xalan to apply XSLT transformations Marc Dumontier Blueprint Initiative Samuel Lunenfeld Research Institute.
Apache Geronimo Open Source J2EE Application Server Getting up to speed with Apache Geronimo - Copyright 2005 Tom McQueeney 1 Getting up to speed with.
Deploying Elastic Java EE Microservices in the Cloud with Docker
Apache TomEE Tomcat with a kick. Apache TomEE: Overview ● Java EE 6 Web Profile certification in progress ● Apache TomEE Includes support for: ● Servlet.
Enterprise Java Beans. Contents  Understanding EJBs  Practice Section.
J2EE Lecture 10: EJB 3.0 Overview
Portals: Background, Development & Conversion
Java EE, Microservices, Microprofile and Playing a little mix & match
Technical Sessions Scripting/Groovy Simple App Framework Portlet Rest
Enterprise Java Bean. Overview of EJB View of EJB Conversation Roles in EJB, Types of Enterprise Beans Lifecycle of Beans Developing Applications using.
ISE 390 Dynamic Web Development
ESIS Consulting LLC (C) ESIS Consulting LLC. All rights reserved
Component Technology Bina Ramamurthy 2/25/2019 B.Ramamurthy.
The JSF Tools Project – WTP (internal) release review
Testing your DAO’s with Java
Plug-In Architecture Pattern
Presentation transcript:

Jonathan Gallimore | Tomitribe Cluster your application with JCache and CDI

CDI and JCache What is CDI? What is JCache? Demo - using Hazelcast to add caching to a Java EE application Other approaches Questions

What is CDI Contexts and Dependency Injection Introduced in Java EE 6 (both Web & Full Profile) Integrated with other specifications in Java EE (EJB, JAX-RS, Servlets, JSF…) Provides the bean lifecycle management and typesafe injection Largely annotation-based Uses –Injection (with scoping, names, qualifiers, stereotypes and alternatives) –Producers (factory methods) –Interceptors –Observers Can be extended with portable extensions

JCache JSR Hazelcast implements the JCache specification as of version (released October ‘14) Basic concepts –Caching provider –CacheManager –Cache –Entry CachingProvider cachingProvider = Caching.getCachingProvider(); CacheManager cacheManager = cachingProvider.getCacheManager(); Cache cache = cacheManager.getCache( "default", Object.class, Object.class ); cache.put( “world”, “Hello, world” );

JCache and Java EE Can be included in Java EE applications Add javax.cache api and implementation jars in WEB-INF/lib You can use JCache in the same way a Java SE application would use it JSR-107 provides standard annotations for caching, but these are not yet implemented by containers. Hopefully this will be part of Java EE 8 CDI can provide dependency injection and interceptors for JCache

Hazelcast Hazelcast is a fully compliant implementation of JCache Very easy to add to your Java EE application –Add com.hazelcast:hazelcast:3.5.3 and javax.cache:cache-api:1.0.0 to your POM.xml Add hazelcast.xml to the classpath Or use JCache / Hazelcast API directly true final MutableConfiguration config = new MutableConfiguration ().setTypes(Object.class, Object.class).setExpiryPolicyFactory(AccessedExpiryPolicy.factoryOf(Duration.ONE_HOUR)).setStatisticsEnabled(true); cache = mgr.createCache("mycache", config);

What is TomEE? Tomcat + Java EE = TomEE Pronounced “Tommy” Java EE 6 Web Profile certified Java EE 7 in progress Built from All-Apache Components What we’ve all been building ourselves –... for years

TomEE Goals Be simple Avoid complexity and making users work Be Tomcat Should work with Tomcat tools and apps Be Certified Drop-in replacement for any Java EE Web Profile server

Show me the code!

Alternative Approaches? Use Hazelcast directly as opposed to using the JCache API –Non-portable, but, exposes a lot more functionality in Hazelcast –Can still use CDI Producers and create your @Hazelcast public HazelcastInstance createHazelcastInstance() { final String configFile = "META-INF/hazelcast.xml"; ClassLoader loader = Thread.currentThread().getContextClassLoader(); URL location = loader.getResource(configFile); final Config config = new Config(); config.setConfigurationUrl(location); config.setInstanceName("ExampleInstance"); return Hazelcast.newHazelcastInstance(config); }

Alternative Approaches? Session replication filter – session-replication/ session-replication/ –Native version for Tomcat / Jetty for Enterprise users

Questions?

Thank you!