SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
** Copyright © 2012, Oracle and/or its affiliates. All rights reserved.*
Red Hat and Oracle:
Delivering on the Promise of
Interoperability in Java EE 7
Petr Jiricka, Oracle
Max Andersen, Red Hat
* Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
The following is intended to outline our general product direction. It is intended
for information purposes only, and may not be incorporated into any contract.
It is not a commitment to deliver any material, code, or functionality, and
should not be relied upon in making purchasing decisions. The development,
release, and timing of any features or functionality described for Oracle’s
products remains at the sole discretion of Oracle.
* Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Program Agenda
■ History of vendor-specific J2EE/Java EE
■ Java EE 6
■ Java EE 7
■ JBoss and GlassFish interoperability
* Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Remember this?
* Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Maven
● Unifies dependency management
● Functional Java EE 7 API’s are now available in Maven Central
● Unified build
● Unified Examples
The thing to love or hate...
* Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
JBoss Way - JavaEE Examples (and more)
http://www.jboss.org/developer/
* Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Oracle JavaEE 7 Examples
https://github.com/arun-gupta/javaee7-samples
* Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
The Example
KitchenSink - Java EE
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Java EE 7
WebSocket
JSON
Simplified JMS
Batch
Concurrency Utilities
CDI
JAX-RS
JPA
...and more
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
JPA - Persistence.xml
<persistence version="2.1"
xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="primary">
<!-- If you are running in a production environment, add a managed
data source, this example data source is just for development and testing! -->
<properties>
<!-- Property for schema generation based on model -->
<property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/>
<!-- Property for batch loading data into database -->
<property name="javax.persistence.sql-load-script-source" value="import.sql"/>
</properties>
</persistence-unit>
</persistence>
● Default datasource
● Standard schema generation configuration
● sql-load scripting
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
JSON - Parsing
URLConnection connection = new URL("https://api.github.com/search/users?q=" + member.getName()).
openConnection();
try(InputStream stream = connection.getInputStream()) {
JsonReader reader = Json.createReader(stream);
JsonObject jsonObject=reader.readObject();
if(jsonObject.containsKey("items")) {
JsonArray items = jsonObject.getJsonArray("items");
if(items.size()>0) {
avatar = items.getJsonObject(0).getString("avatar_url");
}
}
}
● Parsing of JSON
● Navigation of JSonObjects
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
JSON - Writing
final JsonObjectBuilder builder = Json.createObjectBuilder();
builder.add("name", m.getName());
builder.add("email", m.getEmail());
builder.add("phoneNumber", m.getPhoneNumber());
try (JsonWriter jw = factory.createWriter(writer)) {
jw.writeObject(builder.build());
}
● Easily write out JSON structures
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Batch - Background Jobs
● Long running background jobs
● Fine vs Coarse grained setup
● Can be suspended by the Container
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Batch - Background Jobs
● On member registered
○ Start background job
○ Pull github for avatar images
○ Store image in map from id to avatar used in table
META-INF/batch-jobs/lookupgithub.xml:
<job id="lookupgithub" xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="1.0">
<step id="findgithub" >
<batchlet ref="githubBatchlet"/>
</step>
</job>
@Named
public class GithubBatchlet extends AbstractBatchlet {
@Inject
private MemberRepository repository;
@Override
public String process() throws Exception {
...
}
}
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Batch - Background Jobs on Steroids...
● Long running background jobs
● Fine vs Coarse grained setup
● Can be suspended by the Container
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
WebSocket
■ Bi-directional communication over HTTP port
‒ Handshake to ensure both sides support WebSocket
‒ “Protocol upgrade” from HTTP
‒ Simple bidirectional messages, no headers
■ Server-side API for WebSocket in Java EE 7
‒ Server endpoint: @javax.websocket.server.ServerEndpoint
‒ Message encoders and decoders
■ Client-side API in JavaScript supported by modern browsers
■ In the KitchenSink example
‒ When a new member is registered, the server sends a WebSocket
notification about it to all clients who follow the “live log”
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
WebSocket - Server
@ServerEndpoint(
value = "/registration",
encoders = {MemberEncoder.class})
public class RegistrationEndpoint {
@OnMessage
public String onMessage(String message, Session s) {
System.out.println("received: " + message);
handleLoginRequest(s);
return "received!";
}
}
● ServerEndPoints registered via annotations
● Methods for close, open, message etc.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
WebSocket - Client
self.websocket = new WebSocket("ws://localhost/app/registration");
self.websocket.onopen = function (evt) {
console.log ('open');
window.mm.websocket.send("sending");
console.log('sent');
};
self.websocket.onmessage = function (evt) {
console.log(evt);
var m = new Member();
var dataobj = JSON.parse(evt.data);
m.name(dataobj.name);
m.email(dataobj.email);
m.phoneNumber(dataobj.phoneNumber);
window.mm.addItem(m);
};
● On Member created
○ receive message
○ refresh table livelog
*
Technology GlassFish implementation
JBoss (Wildfly)
implementation
JAX-RS Jersey RESTEasy
JPA EclipseLink Hibernate
Bundled database Derby H2
JSF Mojarra Mojarra
HTTP stack Grizzly Undertow
WebSocket Tyrus Undertow
Batch JBatch (IBM) JBaret
Implementation may be different...
… but both behave according to the specification
*
IDE support for Java EE 7 servers
Server Eclipse IDE NetBeans IDE
GlassFish GlassFish 4 (Java EE 7)
plugin by Oracle
GlassFish 4 (Java EE 7)
integration built in
JBoss JBoss Tools by RedHat
● JBoss 7 (Java EE 6)
supported now
● Wildfly 8 (Java EE 7)
early access
JBoss integration built in
● JBoss 7 (Java EE 6)
supported now
● Wildfly 8 (Java EE 7)
not supported yet
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Are we there yet ?
Java EE 7 makes it easier than ever, but…
Everything isn’t covered by spec
Software are written by humans
Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Q & A
Example: https://github.com/maxandersen/jboss-as-
quickstart/tree/j1ee7
Arun Java EE 7 examples:
https://github.com/arun-gupta/javaee7-samples
JBoss Way Quickstarts:
http://www.jboss.org/developer/quickstarts.html
https://github.com/jboss-developer/jboss-eap-quickstarts

Contenu connexe

Tendances

Web application development using Play Framework (with Java)
Web application development using Play Framework (with Java)Web application development using Play Framework (with Java)
Web application development using Play Framework (with Java)Saeed Zarinfam
 
RESTful web apps with Apache Sling - 2013 version
RESTful web apps with Apache Sling - 2013 versionRESTful web apps with Apache Sling - 2013 version
RESTful web apps with Apache Sling - 2013 versionBertrand Delacretaz
 
Migraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sitesMigraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sitesdrupalindia
 
CodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkCodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkBo-Yi Wu
 
Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?
Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?
Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?Julian Robichaux
 
Play framework And Google Cloud Platform GCP.
Play framework And Google Cloud Platform GCP.Play framework And Google Cloud Platform GCP.
Play framework And Google Cloud Platform GCP.Eng Chrispinus Onyancha
 
Microservices with Spring Boot
Microservices with Spring BootMicroservices with Spring Boot
Microservices with Spring BootJoshua Long
 
Choosing a Javascript Framework
Choosing a Javascript FrameworkChoosing a Javascript Framework
Choosing a Javascript FrameworkAll Things Open
 
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
[1D1]신개념 N스크린 웹 앱 프레임워크 PARSNAVER D2
 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API07.pallav
 
Using VueJS in front of Drupal 8
Using VueJS in front of Drupal 8Using VueJS in front of Drupal 8
Using VueJS in front of Drupal 8Brian Ward
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introductionRasheed Waraich
 
Node JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web AppNode JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web AppEdureka!
 
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST APIWordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST APIBrian Hogg
 
Spring Boot and Microservices
Spring Boot and MicroservicesSpring Boot and Microservices
Spring Boot and Microservicesseges
 
React Native in Production
React Native in ProductionReact Native in Production
React Native in ProductionSeokjun Kim
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpackNodeXperts
 
Spring Boot & WebSocket
Spring Boot & WebSocketSpring Boot & WebSocket
Spring Boot & WebSocketMing-Ying Wu
 

Tendances (20)

Web application development using Play Framework (with Java)
Web application development using Play Framework (with Java)Web application development using Play Framework (with Java)
Web application development using Play Framework (with Java)
 
RESTful web apps with Apache Sling - 2013 version
RESTful web apps with Apache Sling - 2013 versionRESTful web apps with Apache Sling - 2013 version
RESTful web apps with Apache Sling - 2013 version
 
Migraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sitesMigraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sites
 
CodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkCodeIgniter PHP MVC Framework
CodeIgniter PHP MVC Framework
 
Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?
Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?
Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?
 
Play framework And Google Cloud Platform GCP.
Play framework And Google Cloud Platform GCP.Play framework And Google Cloud Platform GCP.
Play framework And Google Cloud Platform GCP.
 
Microservices with Spring Boot
Microservices with Spring BootMicroservices with Spring Boot
Microservices with Spring Boot
 
Choosing a Javascript Framework
Choosing a Javascript FrameworkChoosing a Javascript Framework
Choosing a Javascript Framework
 
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
[1D1]신개념 N스크린 웹 앱 프레임워크 PARS
 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API
 
Using VueJS in front of Drupal 8
Using VueJS in front of Drupal 8Using VueJS in front of Drupal 8
Using VueJS in front of Drupal 8
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introduction
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
 
Maven
Maven Maven
Maven
 
Node JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web AppNode JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web App
 
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST APIWordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
WordCamp Ann Arbor 2015 Introduction to Backbone + WP REST API
 
Spring Boot and Microservices
Spring Boot and MicroservicesSpring Boot and Microservices
Spring Boot and Microservices
 
React Native in Production
React Native in ProductionReact Native in Production
React Native in Production
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpack
 
Spring Boot & WebSocket
Spring Boot & WebSocketSpring Boot & WebSocket
Spring Boot & WebSocket
 

Similaire à Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7

Batch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFishBatch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFishArun Gupta
 
GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012Arun Gupta
 
How Scala, Wicket, and Java EE Can Improve Web Development
How Scala, Wicket, and Java EE Can Improve Web DevelopmentHow Scala, Wicket, and Java EE Can Improve Web Development
How Scala, Wicket, and Java EE Can Improve Web DevelopmentBruno Borges
 
Java EE7
Java EE7Java EE7
Java EE7Jay Lee
 
GlassFish REST Administration Backend
GlassFish REST Administration BackendGlassFish REST Administration Backend
GlassFish REST Administration BackendArun Gupta
 
Batch Applications for the Java Platform
Batch Applications for the Java PlatformBatch Applications for the Java Platform
Batch Applications for the Java PlatformSivakumar Thyagarajan
 
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!Masoud Kalali
 
Java EE 7 in practise - OTN Hyderabad 2014
Java EE 7 in practise - OTN Hyderabad 2014Java EE 7 in practise - OTN Hyderabad 2014
Java EE 7 in practise - OTN Hyderabad 2014Jagadish Prasath
 
20151010 my sq-landjavav2a
20151010 my sq-landjavav2a20151010 my sq-landjavav2a
20151010 my sq-landjavav2aIvan Ma
 
Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5Arun Gupta
 
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...jaxLondonConference
 
Have You Seen Java EE Lately?
Have You Seen Java EE Lately?Have You Seen Java EE Lately?
Have You Seen Java EE Lately?Reza Rahman
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Tuna Tore
 
springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892Tuna Tore
 
JAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesJAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesArun Gupta
 
Java EE7 Demystified
Java EE7 DemystifiedJava EE7 Demystified
Java EE7 DemystifiedAnkara JUG
 
What's new in Java EE 7? From HTML5 to JMS 2.0
What's new in Java EE 7? From HTML5 to JMS 2.0What's new in Java EE 7? From HTML5 to JMS 2.0
What's new in Java EE 7? From HTML5 to JMS 2.0Bruno Borges
 

Similaire à Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7 (20)

Batch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFishBatch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFish
 
GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012
 
How Scala, Wicket, and Java EE Can Improve Web Development
How Scala, Wicket, and Java EE Can Improve Web DevelopmentHow Scala, Wicket, and Java EE Can Improve Web Development
How Scala, Wicket, and Java EE Can Improve Web Development
 
Java EE7
Java EE7Java EE7
Java EE7
 
Java ee7 1hour
Java ee7 1hourJava ee7 1hour
Java ee7 1hour
 
GlassFish REST Administration Backend
GlassFish REST Administration BackendGlassFish REST Administration Backend
GlassFish REST Administration Backend
 
Batch Applications for the Java Platform
Batch Applications for the Java PlatformBatch Applications for the Java Platform
Batch Applications for the Java Platform
 
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
 
Java EE 7 in practise - OTN Hyderabad 2014
Java EE 7 in practise - OTN Hyderabad 2014Java EE 7 in practise - OTN Hyderabad 2014
Java EE 7 in practise - OTN Hyderabad 2014
 
20151010 my sq-landjavav2a
20151010 my sq-landjavav2a20151010 my sq-landjavav2a
20151010 my sq-landjavav2a
 
Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5
 
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
 
Have You Seen Java EE Lately?
Have You Seen Java EE Lately?Have You Seen Java EE Lately?
Have You Seen Java EE Lately?
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5
 
springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892
 
JAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesJAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web Services
 
Jsp and jstl
Jsp and jstlJsp and jstl
Jsp and jstl
 
Java EE7 Demystified
Java EE7 DemystifiedJava EE7 Demystified
Java EE7 Demystified
 
What's new in Java EE 7? From HTML5 to JMS 2.0
What's new in Java EE 7? From HTML5 to JMS 2.0What's new in Java EE 7? From HTML5 to JMS 2.0
What's new in Java EE 7? From HTML5 to JMS 2.0
 
Marcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL WorkbenchMarcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL Workbench
 

Plus de Max Andersen

Quarkus Denmark 2019
Quarkus Denmark 2019Quarkus Denmark 2019
Quarkus Denmark 2019Max Andersen
 
Docker Tooling for Eclipse
Docker Tooling for EclipseDocker Tooling for Eclipse
Docker Tooling for EclipseMax Andersen
 
OpenShift: Java EE in the clouds
OpenShift: Java EE in the cloudsOpenShift: Java EE in the clouds
OpenShift: Java EE in the cloudsMax Andersen
 
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...Max Andersen
 
Enterprise Maven Repository BOF
Enterprise Maven Repository BOFEnterprise Maven Repository BOF
Enterprise Maven Repository BOFMax Andersen
 
Google analytics for Eclipse Plugins
Google analytics for Eclipse PluginsGoogle analytics for Eclipse Plugins
Google analytics for Eclipse PluginsMax Andersen
 
JBoss Enterprise Maven Repository
JBoss Enterprise Maven RepositoryJBoss Enterprise Maven Repository
JBoss Enterprise Maven RepositoryMax Andersen
 
Ceylon - the language and its tools
Ceylon - the language and its toolsCeylon - the language and its tools
Ceylon - the language and its toolsMax Andersen
 
Tycho - good, bad or ugly ?
Tycho - good, bad or ugly ?Tycho - good, bad or ugly ?
Tycho - good, bad or ugly ?Max Andersen
 
Making Examples Accessible
Making Examples AccessibleMaking Examples Accessible
Making Examples AccessibleMax Andersen
 
OpenShift Express Intro
OpenShift Express IntroOpenShift Express Intro
OpenShift Express IntroMax Andersen
 
JBoss AS 7 from a user perspective
JBoss AS 7 from a user perspectiveJBoss AS 7 from a user perspective
JBoss AS 7 from a user perspectiveMax Andersen
 
How to be effective with JBoss Developer Studio
How to be effective with JBoss Developer StudioHow to be effective with JBoss Developer Studio
How to be effective with JBoss Developer StudioMax Andersen
 
JBoss Asylum Podcast Live from JUDCon 2010
JBoss Asylum Podcast Live from JUDCon 2010JBoss Asylum Podcast Live from JUDCon 2010
JBoss Asylum Podcast Live from JUDCon 2010Max Andersen
 
How To Make A Framework Plugin That Does Not Suck
How To Make A Framework Plugin That Does Not SuckHow To Make A Framework Plugin That Does Not Suck
How To Make A Framework Plugin That Does Not SuckMax Andersen
 

Plus de Max Andersen (16)

Quarkus Denmark 2019
Quarkus Denmark 2019Quarkus Denmark 2019
Quarkus Denmark 2019
 
Docker Tooling for Eclipse
Docker Tooling for EclipseDocker Tooling for Eclipse
Docker Tooling for Eclipse
 
OpenShift: Java EE in the clouds
OpenShift: Java EE in the cloudsOpenShift: Java EE in the clouds
OpenShift: Java EE in the clouds
 
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
Case study: JBoss Developer Studio, an IDE for Web, Mobile and Cloud applicat...
 
Enterprise Maven Repository BOF
Enterprise Maven Repository BOFEnterprise Maven Repository BOF
Enterprise Maven Repository BOF
 
Google analytics for Eclipse Plugins
Google analytics for Eclipse PluginsGoogle analytics for Eclipse Plugins
Google analytics for Eclipse Plugins
 
JBoss Enterprise Maven Repository
JBoss Enterprise Maven RepositoryJBoss Enterprise Maven Repository
JBoss Enterprise Maven Repository
 
Ceylon - the language and its tools
Ceylon - the language and its toolsCeylon - the language and its tools
Ceylon - the language and its tools
 
Tycho - good, bad or ugly ?
Tycho - good, bad or ugly ?Tycho - good, bad or ugly ?
Tycho - good, bad or ugly ?
 
Making Examples Accessible
Making Examples AccessibleMaking Examples Accessible
Making Examples Accessible
 
OpenShift Express Intro
OpenShift Express IntroOpenShift Express Intro
OpenShift Express Intro
 
JBoss AS 7 from a user perspective
JBoss AS 7 from a user perspectiveJBoss AS 7 from a user perspective
JBoss AS 7 from a user perspective
 
How to be effective with JBoss Developer Studio
How to be effective with JBoss Developer StudioHow to be effective with JBoss Developer Studio
How to be effective with JBoss Developer Studio
 
JBoss Asylum Podcast Live from JUDCon 2010
JBoss Asylum Podcast Live from JUDCon 2010JBoss Asylum Podcast Live from JUDCon 2010
JBoss Asylum Podcast Live from JUDCon 2010
 
How To Make A Framework Plugin That Does Not Suck
How To Make A Framework Plugin That Does Not SuckHow To Make A Framework Plugin That Does Not Suck
How To Make A Framework Plugin That Does Not Suck
 
Kickstart Jpa
Kickstart JpaKickstart Jpa
Kickstart Jpa
 

Dernier

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 

Dernier (20)

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 

Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7

  • 1. ** Copyright © 2012, Oracle and/or its affiliates. All rights reserved.*
  • 2. Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7 Petr Jiricka, Oracle Max Andersen, Red Hat
  • 3. * Copyright © 2012, Oracle and/or its affiliates. All rights reserved. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
  • 4. * Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Program Agenda ■ History of vendor-specific J2EE/Java EE ■ Java EE 6 ■ Java EE 7 ■ JBoss and GlassFish interoperability
  • 5. * Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Remember this?
  • 6. * Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Maven ● Unifies dependency management ● Functional Java EE 7 API’s are now available in Maven Central ● Unified build ● Unified Examples The thing to love or hate...
  • 7. * Copyright © 2012, Oracle and/or its affiliates. All rights reserved. JBoss Way - JavaEE Examples (and more) http://www.jboss.org/developer/
  • 8. * Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Oracle JavaEE 7 Examples https://github.com/arun-gupta/javaee7-samples
  • 9. * Copyright © 2012, Oracle and/or its affiliates. All rights reserved. The Example KitchenSink - Java EE
  • 10. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Java EE 7 WebSocket JSON Simplified JMS Batch Concurrency Utilities CDI JAX-RS JPA ...and more
  • 11. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. JPA - Persistence.xml <persistence version="2.1" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_1.xsd"> <persistence-unit name="primary"> <!-- If you are running in a production environment, add a managed data source, this example data source is just for development and testing! --> <properties> <!-- Property for schema generation based on model --> <property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/> <!-- Property for batch loading data into database --> <property name="javax.persistence.sql-load-script-source" value="import.sql"/> </properties> </persistence-unit> </persistence> ● Default datasource ● Standard schema generation configuration ● sql-load scripting
  • 12. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. JSON - Parsing URLConnection connection = new URL("https://api.github.com/search/users?q=" + member.getName()). openConnection(); try(InputStream stream = connection.getInputStream()) { JsonReader reader = Json.createReader(stream); JsonObject jsonObject=reader.readObject(); if(jsonObject.containsKey("items")) { JsonArray items = jsonObject.getJsonArray("items"); if(items.size()>0) { avatar = items.getJsonObject(0).getString("avatar_url"); } } } ● Parsing of JSON ● Navigation of JSonObjects
  • 13. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. JSON - Writing final JsonObjectBuilder builder = Json.createObjectBuilder(); builder.add("name", m.getName()); builder.add("email", m.getEmail()); builder.add("phoneNumber", m.getPhoneNumber()); try (JsonWriter jw = factory.createWriter(writer)) { jw.writeObject(builder.build()); } ● Easily write out JSON structures
  • 14. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Batch - Background Jobs ● Long running background jobs ● Fine vs Coarse grained setup ● Can be suspended by the Container
  • 15. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Batch - Background Jobs ● On member registered ○ Start background job ○ Pull github for avatar images ○ Store image in map from id to avatar used in table META-INF/batch-jobs/lookupgithub.xml: <job id="lookupgithub" xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="1.0"> <step id="findgithub" > <batchlet ref="githubBatchlet"/> </step> </job> @Named public class GithubBatchlet extends AbstractBatchlet { @Inject private MemberRepository repository; @Override public String process() throws Exception { ... } }
  • 16. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Batch - Background Jobs on Steroids... ● Long running background jobs ● Fine vs Coarse grained setup ● Can be suspended by the Container
  • 17. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. WebSocket ■ Bi-directional communication over HTTP port ‒ Handshake to ensure both sides support WebSocket ‒ “Protocol upgrade” from HTTP ‒ Simple bidirectional messages, no headers ■ Server-side API for WebSocket in Java EE 7 ‒ Server endpoint: @javax.websocket.server.ServerEndpoint ‒ Message encoders and decoders ■ Client-side API in JavaScript supported by modern browsers ■ In the KitchenSink example ‒ When a new member is registered, the server sends a WebSocket notification about it to all clients who follow the “live log”
  • 18. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. WebSocket - Server @ServerEndpoint( value = "/registration", encoders = {MemberEncoder.class}) public class RegistrationEndpoint { @OnMessage public String onMessage(String message, Session s) { System.out.println("received: " + message); handleLoginRequest(s); return "received!"; } } ● ServerEndPoints registered via annotations ● Methods for close, open, message etc.
  • 19. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. WebSocket - Client self.websocket = new WebSocket("ws://localhost/app/registration"); self.websocket.onopen = function (evt) { console.log ('open'); window.mm.websocket.send("sending"); console.log('sent'); }; self.websocket.onmessage = function (evt) { console.log(evt); var m = new Member(); var dataobj = JSON.parse(evt.data); m.name(dataobj.name); m.email(dataobj.email); m.phoneNumber(dataobj.phoneNumber); window.mm.addItem(m); }; ● On Member created ○ receive message ○ refresh table livelog
  • 20. * Technology GlassFish implementation JBoss (Wildfly) implementation JAX-RS Jersey RESTEasy JPA EclipseLink Hibernate Bundled database Derby H2 JSF Mojarra Mojarra HTTP stack Grizzly Undertow WebSocket Tyrus Undertow Batch JBatch (IBM) JBaret Implementation may be different... … but both behave according to the specification
  • 21. * IDE support for Java EE 7 servers Server Eclipse IDE NetBeans IDE GlassFish GlassFish 4 (Java EE 7) plugin by Oracle GlassFish 4 (Java EE 7) integration built in JBoss JBoss Tools by RedHat ● JBoss 7 (Java EE 6) supported now ● Wildfly 8 (Java EE 7) early access JBoss integration built in ● JBoss 7 (Java EE 6) supported now ● Wildfly 8 (Java EE 7) not supported yet
  • 22. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Are we there yet ? Java EE 7 makes it easier than ever, but… Everything isn’t covered by spec Software are written by humans
  • 23. Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Q & A Example: https://github.com/maxandersen/jboss-as- quickstart/tree/j1ee7 Arun Java EE 7 examples: https://github.com/arun-gupta/javaee7-samples JBoss Way Quickstarts: http://www.jboss.org/developer/quickstarts.html https://github.com/jboss-developer/jboss-eap-quickstarts