Upload
oracle-isv-migration-center
View
235
Download
3
Tags:
Embed Size (px)
DESCRIPTION
Cloud Application Foundation is the innovator’s complete and integrated modern cloud application infrastructure, built using best of breed components such as Oracle WebLogic Server 12c, the industry's best application server for building and deploying enterprise Java EE applications. Oracle WebLogic Server 12.1.3 provides features that directly support and enable the development of modern applications across conventional and cloud environments, both on-premise and third-party cloud, lowering cost of operations, improving performance and enhancing scalability. The latest release of WebLogic Server is integrated with other Oracle Fusion Middleware 12.1.3 products, and provides support for selected new or updated APIs from Java EE 7. [Read More @ https://blogs.oracle.com/imc/entry/weblogic_12c_development_websocket_maven]
Citation preview
Stay Connected
BLOGS.ORACLE.COM/IMC
TWITTER.COM/ORACLEIMC
YOUTUBE.COM/ORACLEIMCTEAM
FACEBOOK.COM/ORACLEIMC
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
Safe Harbor Statement
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.
3
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
WebLogic 12c Enabling Development of Modern Applications WebSocket and Apache Maven Support
Tshepo Madigage ISV Migration Consultant Oracle Partner Hub Migration Center, South Africa September 18, 2014
Presented by
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
Program Agenda
1
2
3
4
5
WebLogic 12c New Features
Developing with WebLogic Server
Maven Support (inc. Demo)
WebSocket (inc. Demo)
Summary – Q & A
5
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
WebLogic 12c New Features
6
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
WebLogic Server 12.1.3 Mobile, Developer Productivity
WLS12.1.3 Clients
HTM
L5
clien
ts
ADF Mobile
Proxies
OTD
Apache
OHS
Web Sockets (JSR 356)
TopLink Data Services
Server-Sent Events
JAX-RS 2.0
WebSocket Emulation
We
bSo
cket Em
ulatio
n
JAX-RS 2.0, WebSocket 1.0
JSON Programming API
JPA 2.1
Server-Sent Events
WebSocket Emulation
JPA-RS
JPA
Change Notification
Database
JSON Programming API
HTTP/S, JSON/XML WebSocket, Server-Sent
Events, Long polling
Java EE 7 APIs
Additional WebLogic Value-Add
7 7
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
WebLogic Server 12.1.3 and JAX-RS 2.0 (from Java EE 7)
• Defaults with JAX-RS 1.1 – Annotation-based API for RESTful web services, Java EE 6 standard
• Supplied as jax-rs-2.0.war shared-library – Overrides default JAX-RS API, supplies Jersey 2.5.1 implementation
– Referenced by applications to use JAX-RS 2.0
• New Features in JAX-RS 2.0 – Standard Client API
– Filters/interceptors
– Server-side content negotiation
– Asynchronous processing
8
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
Server-Sent Events – A Jersey 2.5 Bonus • RESTful Approach to SSE
• Stream asynchronous events from Server to Client using JAX-RS/Jersey runtime
– Uni-directional, server-send model using simple data protocol
– Part of HTML5 Standard by W3C with EventSource JavaScript Object
– Many HTTP messages on a single connection
– Enables reconnection and replay capability with Last-Event-ID HTTP header tracking
• Automatically included and registered by the WLS JAX-RS 2.0 shared-library
9
Server Client
HTTP / SSE
HTTP / Res
Tim
e
data available
data available
data available
open
received
received
received
received
payload
payload
payload
payload
data available payloa
d
reconnect
HTTP / SSE + <Last-Data ID>
HTTP / Res
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
WebLogic Server 12.1.3 WebSocket Support – JSR-356 • WebLogic 12.1.2 WebSocket implementation
– Supports protocol standard
– Adoption by PeopleTools 8.54 (H2CY2014)
• WebLogic 12.1.3 – Java EE 7 API for WebSocket
– Included in GlassFish 4.0
• Allows defining WebSocket Endpoints
– Handle onOpen, onClose, onError, onMessage events
– Bi-directional communication between peers
– Endpoints used by Servers and Clients
• Support encoders/decoders
– Map message content to/from Java objects
10
Server Client
HTTP
Tim
e
upgrade open
receive
receive
Handshake Request Handshake Response
WebSocket Connection
send
send
receive
send
send receive
send receive
payload
payload
payload
payload
payload
receive send payload
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
WebLogic Server 12.1.3 WebSocket Emulation • Browsers and firewalls may not support/permit WebSocket protocol
• WebLogic provides a fallback mechanism to emulate the WebSocket transport behavior
• Client side with JavaScript library - OraSocket.js
• Server side with an adapter to handle HTTP Long Polling
● Developers
● Use the WebSocket API for Java to write your application
● Use the WebSocket JavaScript Object on the client
● Same codebase
● Looks and smells just like a WebSocket application
● Whatever happens behind the scene is not your concern
11
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
WebLogic Server 12.1.3 - Java API for JSON Processing
• WebLogic Server implementation based on Java EE7 RI
• Standard Java API to generate and parse JSON – Included in Java EE 7
– Included as module with WebLogic Server 12.1.3
• Has an Object model API to represent JSON – Similar to DOM API in XML world
• Has a Streaming API to produce/consume JSON – Similar to StAX API in XML world
12
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
Repository
Product JARs POMs <project> <groupId>com.oracle.weblogic</groupId> <artifactId>webservices</artifactId> <version>12.1.2</version> <packaging>jar</packaging> </project>
Archetypes
Sync plugin
WebLogic plugin
weblogic-maven-plugin
wlst file <script>
wlst-client T3
We
bLo
gic
Serv
er
A
dm
inSe
rver
WebLogic Server 12.1.3 Maven Updates
13
• Same set of 12.1.2 goals
• New wlst-client goal to run WLST scripts from fully remote environment
• WLST remote library included in Maven artifact set
• No longer require local installation of WebLogic to execute WLST from Maven
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
Developing with WebLogic Server
14
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
Oracle Cloud Application Foundation
Oracle WebLogic Server 12c
Release 12.1.3
Oracle Coherence 12c
Release 12.1.3
Oracle Enterprise Manager 12c
Oracle Development Tools 12c
Deployment
Productivity & Management
Oracle Tuxedo 12c
Cloud Application Foundation
WebLogic Server
Application Services
Exalogic Private & Public IaaS
Coherence Tuxedo
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 15
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
WebLogic Server 12.1.3
16
Server 1 Server 2
Server 3 Server 3
JMS JMS
JMS JMS
Oracle
RAC
Dynamic Cluster
Fusion Middleware 12.1.3 Release
– SOA, OSB, BPM, ADF, JDEV, CAF
Mobile, Developer Productivity
– JSON, REST, WebSocket, SSE
High Availability and Performance
– DB 12c integration improvements
– High availability enhancements
– Exalogic optimizations
Cloud-Scale Management and Operations
– Additional REST support, FMWC
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
WebLogic Server Support for Trends
• JSON Binding using JAXB
• JSON Processing
• REST API with Client Support
• 100% Declarative REST for JPA
• WebSocket Protocol
• WebSocket Emulation
• Server-Sent Events
• Thin Server Architecture
• Standard Libraries, Deploy/Test
17
• EclipseLink MOXy
• JSON Processing for Java
• JAX RS 2.0 and Jersey 2.x
• TopLink Data Service
• Project Tyrus
• OraSocket for JavaScript, HTTP Long Polling
• Jersey + Jersey Media Support
• Project Avatar
• Maven Artifacts, Plugins for Push and Ops
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
Tools and Technologies
18
Java Cloud Service
Classloader Analysis Tool
12c Update Coming
Smaller 12c Download
Updated in 12.1.3
Java 7 Jave EE 6+
New in 12c
All Updated
in 12c Updated in
12.1.3
New in 12.1.1
Full-featured support in
12.1.3
REST, SSE, WebSocket, JSON-P in
12.1.3
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
WebLogic Server 12.1.3 - Making it Easier to Develop
• Developer zip updates – Recognize the need to update OTN distributions to address developer issues
– Will “refresh” zip distributions with key fixes and align with PSUs
• OTN Developer license – Makes WebLogic free for development on developer desktops
– Refining language in license agreement to address issues raised in the field
• Updated Spring Framework Integration Support – Spring 3.0.X
– Spring 3.1.X
– Spring 4.0.X
19
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
Seamless Upgrade
Prior WebLogic
Server Versions
JBoss
WebSphere
Migration Services
GlassFish
Simple Upgrade Redeployment
Internet
Application Server
Automated Tooling
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
Maven Support
21
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
History of WebLogic Server and Maven
22
• weblogic-maven-plugin:10.3.x
• Basic deployment support
• Full WLS client with a Maven plugin wrapper
WLS 10.3.x
• wls-maven-plugin:12.1.1
• Added server operation goals
• Install, create-domain, start-server, WLST
• Required local installation for libraries
WLS 12.1.1 • weblogic-maven-plugin:12.1.2-0-0
• Refactored plugin to run with artifacts from Maven repository, better use Maven plugin conventions
• Multiple goals can run without a local installation
• Added Web Services goals
WLS 12.1.2
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
History of WebLogic Server and Maven
23
WLS 12.1.3
•weblogic-maven-plugin:12.1.3-0-0
•Same set of goals as provided in WLS 12.1.2
•Added wlst-client goal to execute remote WLST scripts for online operations
•Added remove-domain goal to physically delete a domain directory
•Support uninstall of installation performed from generic jar installer
12.1.3
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
Maven Support in WebLogic Server 12c
24
• Use Maven
– Maven 3.0.5 installed with product for convenience
• Run Sync Plugin
– Populates a local or shared repository with WebLogic jars, POMs, archetypes
– Patch and execute a resync to maintain repository
• Use WebLogic Maven Plugin
– All 12.1.1 goals, plus Web Services goals
– New wlst-client goal for remote WLST execution
– Leverage repository(s) where possible
– Archetypes provided for common app types
• Use standard Maven approaches
– Enable Maven to be used as designed
– Oracle defined artifacts for consistency across Fusion Middleware environments
Shared Private Repository
Product JARs POMs <project> <groupId>com.oracle.weblogic</groupId> <artifactId>webservices</artifactId> <version>12.1.2</version> <packaging>jar</packaging> </project>
Archetypes
Local Repository
Product JARs POMs <project> <groupId>com.oracle.weblogic</groupId> <artifactId>webservices</artifactId> <version>12.1.2</version> <packaging>jar</packaging> </project>
Archetypes
Sync plugin
WebLogic plugin
Sync plugin
12.1.3
12.1.3
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
Populating a Maven Respository with Oracle Artifacts • Install Oracle-Maven-Sync plugin using
maven install goal
• Execute goal oracle-maven-sync:push specifying which Oracle Home to use
• The push goal searches Oracle Home seeking .pom and matching .location files
• Performs an artifact install using .pom with the physical jar file specified in matching .location pointer
• Can install to local repository or Maven repository manager such as Archiva, Nexus, Artifactory
25
Build
Manager
Repository
Product JAR POM File <project> <groupId>com.oracle.weblogic</groupId> <artifactId>webservices</artifactId> <version>12.1.2</version> <packaging>jar</packaging> </project>
Location File
Maven Deploy
com.oracle.weblogic.weblogic-server-pom:12.1.3-0-0
$ORACLE_HOME
Sync plugin
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
Oracle Maven Archetypes
• Archetypes provide starting points for developers to start building their project
• WebLogic Server 12c provides five archetypes
26
• The Oracle archetypes are installed into the repository when the oracle-maven-sync plugin is executed
• Execute maven archetype:crawl to discover and add to the local catalog
basic-web JSF, CDI with weblogic-maven-plugin
basic-webapp-ejb JSF, CDI, JPA with weblogic-maven-plugin
basic-mdb JSF, CDI, MDB with weblogic-maven-plugin + WLST
basic-webservice Web Service with weblogic-maven-plugin JWSC goals
maven-gar-archetype Skeleton project and configuration files for a GAR
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
Deployed Project from Archetype
27
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
Maven Support (Demo)
28
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
WebSockets
29
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
WebSocket Overview What are WebSockets?
• WebSockets are an emerging web technology that provides full-duplex, bi-directional communication channels using TCP connections over the Internet
• Backed by industry standards – The WebSocket Protocol (IETF RFC 6455)
– The WebSocket API defined in W3C HTML5
– (JSR-356) Java API for WebSocket 1.0 and included in Java EE 7
30
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
History of WebSocket Support
• Adds support for Java API for WebSocket 1.0 (JSR-356) and JSON Programming API (JSR-353)
• Integrates Project Tyrus as WebSocket implementation
• Uses WebLogic core and networking services
• Deprecate weblogic.websocket.* API
12.1.3
• First ever release with WebSocket support
• Custom implementation of WebSocket protocol RFC 6455
• Uses Async features of web container
• Provides WebLogic Server specific API with annotations for development
12.1.2
31
WebLogic Server
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
WebLogic Server 12.1.2 WebSocket Support
• Custom implementation of the WebSocket Protocol (RFC 6455) – Tested for compatibility using popular open-source compatibility test suite
– Internal benchmark showed high performance and reliability
• Provided a proprietary programming API to develop applications for use with the WebSocket Protocol – Server only, no Java client support
• Deploy as WAR file containing a WebSocketListener implementation
• Client applications access server applications typically using JavaScript from the browser
32
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
WebLogic Server 12.1.3 Standards Based WebSocket Support with JSR-356
• Java community developed a standard for using WebSocket with Java – Java API for WebSocket 1.0, JSR-356
– Included in Java EE 7 as a core platform API
– Package javax.websocket.*
– Provides both an annotation based and programmatic API
– API supports Client and Server use
• WebLogic Server 12.1.3 supports JSR-356 for WebSocket use – Enables development and deployment of applications using standard WebSocket API
– Applications portable across containers supporting JSR-356
33
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
WebLogic Server 12.1.3 Bonus JSR-353: Java API for JSON Programming
• Java community developed a standard generating and parsing JSON – Java API for JSON Programming 1.0, JSR-353
– Included in Java EE 7 as core platform API
– Package javax.json.*
– Enables developers to create and parse JSON using an Object Model or Streaming API
– Conceptually similar to XML-P and DOM v StAX XML parsers
• WebLogic Server 12.1.3 also include JSR-353 for developers to use – Inbuilt WLS module, any deployed application can make use of it
– Particularly useful for WebSocket encoders/decoders working with JSON payloads
34
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
WebLogic Server 12.1.2/12.1.3 WebSocket Differences
WebLogic Server 12.1.2 WebLogic Server 12.1.3
Proprietary API and annotations weblogic.websocket.*
JSR-356 Java API for WebSocket 1.0 javax.websocket.* with annotation and programmatic options
No Java Client API Full JSR-356 Client Support
Custom implementation of WebSocket Protocol listener and runtime implementation
Integrates JSR-356 reference implementation (Tyrus) for high degree of specification compliance and portability
Uses internal Servlet to handle WebSocket handshake and protocol upgrade, binds URI to HTTP or WS explicitly
Tyrus integrated using ServletContainerInitializer and ServletFilter to handle WebSocket handshake with co-existing URI support
Uses Async Web container features of WLS to handle WebSocket messages
WebSocket Messages handled by Tyrus using WebLogic Server network and threading services
35
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
Happy HTML5 WebSockets
● HTML5 and the Java API for WebSocket ● Enables lots of new opportunities for developing highly
interactive applications and rich user experiences
• Lightweight, fast, easy to program
• Standardizing across the industry
● But ...
● WebSockets are not universally supported across all current environments
● Most browsers support HTML5 and WebSockets - but - not all of them
● Firewalls or proxy servers may block the required frames and protocol
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
WebSocket Fallback • Provides a behind-the-scenes fallback mechanism to
emulate the WebSocket transport behavior • Server side with an adapter to handle HTTP Long Polling for
WebSocket messages when required
• Client side with JavaScript library - OraSocket.js
● Developers ● Use the Java API for WebSocket to developer your application,
enable fallback via web.xml context-param
● Use the HTML5 JavaScript WebSocket API on the client, Include OraSocket.js on client pages
● Same codebase for native WebSocket Protocol and fallback
● Transparent runtime behavior
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
WebLogic WebSocket Protocol Performance Scalability, Performance
• Message Echo Benchmark
– WebSocket Clients connect and send messages every second
– Server broadcasts messages back to clients
• Single WLS Server
– Reliably support 60,000 connections
– Throughput measured at ~20,000 messages/second with a 512 byte payload
• Now observing significant increases in message receive rate with 12.1.3 and Tyrus
38
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
WebSockets Demo
39
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
Summary
40
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
WebLogic Server Roadmap
41
2009-2010 2011 2012 2013 2014 2015
WebLogic 11gR1 (10.3.1-6)
Oracle FMW 11g & Apps
Manageability, Active GridLink, Messaging, Coherence, OVAB
Engineered Systems, Cloud
JDK 6 and JDK 7 (WLS 10.3.6)
WebLogic 12c (12.1.2)
FMW 12c Infrastructure
Mission Critical Cloud Platform
Native Cloud Management
Modern Development Platform
JDK 7
WebLogic 12c (12.1.1)
Java EE 6
Developer Productivity, Oracle Traffic Director, Disaster Recovery
JDK 6 and JDK 7
WebLogic 12c (12.1.3) – June 2014
FMW 12c Infra, SOA, BPM, ODI
Mobile and Rich Client Support
Mission Critical Cloud Platform
Native Cloud Management
JDK 7 (post-GA JDK 8, WLS only)
WebLogic 12cR2 (12.2.1) – CY2015
FMW 12c Platform
Multitenancy
Elastic Clusters and REST Mgmt
Java EE 7 and Development
Exalogic, HA and MAA
JDK 8
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
Summary: Why Standardize on WebLogic Server? Reason #5: Powers Cloud
Reason #2: Best Performance Ever Reason #4: Drive Innovation and
Developer Productivity
Reason #3: Application Aware Virtualization
WLS WLS SOA Svc
Web
RAC RAC
Web Web
Cache
Reason #1: WebLogic Momentum with Customers
40104,00
16646,00
,00 4000,00 8000,00
12000,00 16000,00 20000,00 24000,00 28000,00 32000,00 36000,00 40000,00
Oracle
IBM
42
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
Resources & Links
• Using the WebLogic Maven Plug-in – http://docs.oracle.com/middleware/1213/wls/WLPRG/maven.htm#sthref58
• Oracle WebLogic Server 12.1.3 White Paper – http://www.oracle.com/technetwork/middleware/weblogic/overview/weblogic-
server-12-1-3-whitepaper-2227074.pdf
43
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
Q&A
44
Tshepo Madigage Oracle ISV Migration Center Consultant [email protected] ISV Migration Center blog: http://blogs.oracle.com/imc ISV Migration Center email: [email protected]
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub
• Oracle.com Partner Hub oracle.com/partners/goto/hub-ecemea
• Migration Center Team Blog blogs.oracle.com/imc
feeds.feedburner.com/oracleIMC
• Partner Webcast Recordings youtube.com/OracleIMCteam
• Partner Webcast Presentations slideshare.net/Oracle_IMC_team
Oracle Partner Hub ISV Migration Center • twitter.com/OracleIMC
• plus.google.com/+OracleIMC
• facebook.com/OracleIMC
• linkedin.com/groups/Oracle-Partner-Hub-Migration-Center-4535240
45
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle ECEMEA Partner Hub 46