12 Things about Oracle WebLogic Server 12.2.1

Dr. Frank Munz munz & more with Dave Cabelus Oracle WebLogic Server Product Management

October/November 2015

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted 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.

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted Who’s that guy?

• Dr. Frank Munz • Founded munz & more in 2007 • 15 years Oracle WebLogic and Middleware • Consulting and High-End Training • Three Oracle / Cloud books • @frankmunz on Twitter 3 Who’s That Other Guy? Dave Cabelus • WebLogic Server Product Manager since 2005 • Expertise in many areas of WebLogic Server • 8th consecutive year at OpenWorld • Follow Dave on Twitter at @dave_cabelus, videos at www.youtube.com/user/OracleWebLogic

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 4 12 new things, no agenda J #0 ... download today! #1 JDK 8 JDK 8

• WebLogic 12.2.1 supports JDK 8 as runtime • Startup scripts work out of the box (permspace is removed in JDK 8) • Coherence 12.2.1uses JDK 8 language features in a distributed, lazy way • JDK 8u40 introduced resource management used by WebLogic multitenancy with G1 GC -XX:+UnlockCommercialFeatures -XX:+ResourceManagement munz & more #8 #2 Java EE 7 Java EE 7

Every developer wants to use it! Improved or new standards in Java EE 7: • EJB 3.2 • Servlet 3.1 • JDBC 4.0 • WebSockets, JAX-RS 2.0, JSON-P 1.0 • Batch 1.0 • JMS 2.0 Tip: Learn about Java EE 7 • Concurrency Utilities 1.0 http://de.slideshare.net/glassfish/fifty-feature-of munz & more #10 Recommendation

munz & more #11 #3 IDE Integration NEW! wlserver/server/bin/.sh IDE Support NetBeans 8.1 RC /Dev Build works with WebLogic Eclipse net 12.2.1 (and package) installer -> easy OEPE JDeveloper download & 12.2.1 install available for munz & more OFM 12.2.1 #13 #4 Console changes J Production Mode

You can revert production mode from console

munz & more #15 #5 Deployment Parallel Deployment

WebLogic 12.2.1 provides parallel deployment

• Multiple applications -> OFM • Single application with multiple modules

Across Modules in Across • Applications across Applications Applications multiple partitions Parallel Available in New in Prepare WebLogic 11g WebLogic 12.2.1

Parallel New in New in munz & more Activate WebLogic 12.2.1 WebLogic 12.2.1 #6 Elastic Cluster Elastic Cluster

WebLogic 12.1.2: Dynamic Cluster config WebLogic 12.2.1: Elastic Cluster runtime + pre / post scaling callout to scripts

How to scale? • Console • WLST • REST • Policy/Action • Calendar based munz & more #19 #7 JMS JMS

• JMS 2.0 support • Elastic JMS scales with elastic cluster • Simplified HA Configuration: WebLogic 12.2.1 JMS restrictions are removed • Default CX-factory required per Java EE 7: java:comp/DefaultJMSConnectionFactory resolves to weblogic.jms.XAConnectionFactory munz & more #21 #8 WLST New Command for Scaling

WLST command to scale dynamic cluster: scaleUp/Down ( clusterName, How many servers to numServers, add or remove [updateConfiguration], [block], [timeoutSeconds], ) munz & more #23 #9 WLDF WLDF

• Watches and notifications are replaced by policies and actions • Additional 4 WLDF actions – scale up / down – REST – Script • Diagnostic image files are .txt or .xml • Prepackaged smart rules (policies) with configurable parameters munz & more #25 Smart rules:

Predefined policies with open parameters

munz & more #26 #10 RESTful Management Why REST?

• Simplicity • Language agnostic • No JVM, no WebLogic on client side <->JMX • Easy to tunnel through firewalls: HTTP • Current tech trend (eg. mobile dev)

munz & more #28 RESTful Management

• New generic REST implementation: Full support for all resources (also JMS etc.) • RESTful management is turned on per default • Available on admin and managed Servers • Modelled after WLST structure (real MBean names not required <-> Jolokia) • Used throughout WebLogic documentation munz & more #29 Tech Details 1

What you can access: • domain|serverConfig, domain|serverRuntime, edit • [exclude]fields=field1, field2 • [exclude]links=none, links=rel • interaction=async-polling|sync

munz & more #30 Tech Details 2

• URL format has changed: …/wls/… was WebLogic 12.1.3, now: /management/weblogic/latest/…

• Edit sessions implicit: POST in /edit Or create manually with /edit/changeManager/ startEdit|cancelEdit|activate munz & more #31 CRUDQ Read

Get server name and state of managed server with name surf1 via admin server GET (e.g. via web browser) http://localhost:7001/management/weblogic/late st /domainRuntime/serverLifeCycleRuntimes/ surf1?links=none&fields=name,state

Response: { "name": "surf1", "state": "RUNNING" } munz & more #33 Create

Short way to create server surf7, with UNIX curl curl –v --user weblogic:welcome1 \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -H Content-Type:application/json \ -d "{ name: 'surf7' } " -X POST \ http://localhost:7001/management/weblogic/latest /edit/servers

munz & more #34 Create Form

Request create form (note, WebLogic 12.1.3 used HTTP OPTION)

GET http://localhost:7001/management/weblogic/latest /edit/serverCreateForm

munz & more #35 Update

Update server surf7, with curl curl ... -d "{ listenPort: '9999' } " -X POST \ http://localhost:7001/management/weblogic/la test/edit/surf7

munz & more #36 Delete

Delete server surf7: curl –v --user weblogic:welcome1 \ -H X-Requested-By:MyClient \ -H Accept:application/json \ -H Content-Type:application/json \ –X DELETE http://localhost:7001/management/weblogic/late st/edit/servers/surf7 munz & more #37 Query

Single bulk request queries to select and return specific subsets of tree.

POST http://localhost:7001 /management/weblogic/ latest/domainRuntime/ search munz & more #38 Take Aways

• HTTP OPTION (WLS 12.1.2) is currently not used -> …RequestForm • Modifying a read-only value is silently ignored (per design) • CREATE requires X-Requested-By header, to prevent CSRF (cross-site request forgery) • Most other headers are not mandatory

munz & more #39 #11 Docker WebLogic in a Docker Container Adrian Cockroft Netflix

“Docker wasn’t on anyone’s agenda for 2014. It’s on everyones roadmap for 2015.” Why Docker

• Because the whole world is talking about it J • Light-weight isolation technique • Solves "Worked for me" issue: Dev to prod, and on-premise to cloud • Supported by Oracle for WebLogic 12.2.1

munz & more #43 Virtualization vs. Isolation

ejb.jar a.war x.py App App App tools y. jar Linux Win Win Appl 1 Appl 1 Appl 1 WebLog ic Solaris Linux Win JDK VirtualBox Mac OS / Win OVM / VmWare ESX / Xen Linux + Docker

Hardware Hardware Hardware

Desktop Virtualization: Server Virtualization Docker container in Linux type 2 hypervisor type 1 hypervisor with own FS, network stack / = with host OS = on bare metal IP address, process space and resource limits munz & more #44 Oracle Whitepaper Docker book WebLogic on Docker Containers by J. Turnbull (Docker 1.8)

munz & more #45 #12 Multi Tenancy WebLogic Multitenant: Solving Critical Business Challenges

Microcontainer 3X Consolidation Secure/Isolated Portability for Devops Ratio Multitenant Java

WebLogic MT Java Cloud Service Java Cloud Service

WebLogic MT WebLogic WebLogic WebLogic

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal 47 Key Technical Concepts

Partition 1 Partition 1 JNDI

Service Service 1 Service 2 … Virtual N Target JM Data App App S Source

Coherence Partition 2 Partition 2 JNDI

Virtual Target JM Data App App S Source

Traffic WebLogic Server (JVM) Director Database

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal 48 Isolation: 4 Areas

• Security: Security realm per partition • Life Cycle: Start / stop, debug flags • Data / Traffic: separate JNDI tree, data sources, (pluggable) DBs • Runtime: Ressource consumption manager

munz & more #49 Resource Consumption

Resources: You can Recourses: define multiple policies

munz & more #50 Use Cases

• Pack friendly domains together • Don't pack dev, test, and int together <-> one debug port per JVM etc. • How about: blue / green deployments using partitions and elasticity together?

munz & more Image Source: Fowler #51 Some more Take Aways

• MT best used with FMW Control (separate domain template) – Can you see the trend away from admin console? – FMW Control works with 'restricted JRF' -> No database needed (unlike OSB, SOA Suite etc.) • MT requires separate license, WebLogic Suite and EE allow 1 partition • No thread dumps per partition

munz & more #52 Summary

1. JDK 8 8. WLST 2. Java EE 7 9. WLDF 3. IDE 10. REST 4. Console 11. Docker 5. Deployment 12. Multi Tenancy 6. JMS 7. Cluster munz & more #53 Other WebLogic Server Session

Oracle Weblogic Server 12.2.1 Multitenancy: Efficiency, Agility, and Lower Cost [CON8630]

Multitenancy in Java: Innovation in the JDK and Oracle WebLogic Server 12.2.1 [CON8633] Get your OOW2015 Oracle WebLogic Server: Automated and Simplified slides! Management in a World of Clouds [CON8634]

Oracle WebLogic Server and Docker Containers [CON8629] munz & more #54 Tweet and grab the famous sticker!

munz & more #55 Oracle’s WebLogic blog www.munzandmore.com/blog https://blogs.oracle.com/weblogicserver facebook.com/cloudcomputingbook Facebook https://www.facebook.com/oracleweblogic facebook.com/weblogicbook

Twitter @frankmunz https://twitter.com/oracleweblogic

YouTube youtube.com/weblogicbook http://www.youtube.com/oracleweblogic -> more than 50 WLS web casts

Developer Webcast Series http://www.oracle.com/goto/weblogicdevcast iLearning Interactive WebLogic Server 12.1.3 new features: http://goo.gl/ESkvHj

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Internal/Restricted/Highly Restricted Oracle Confidential – Internal/Restricted/Highly Restricted 58