SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Downloaden Sie, um offline zu lesen
** 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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Ähnlich wie 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 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
 
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
 
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
 

Ähnlich wie 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 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...
 
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
 
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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 

Kürzlich hochgeladen (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 

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