2. 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
2
6. JDK 8
• WebLogic 12.2.1 supports JDK 8 only as runtime
• Startup scripts work out of the box
(permspace is removed in JDK 8)
• JDK 8u40 introduces resource management
used by WebLogic multitenancy with G1 GC
java -XX:+UnlockCommercialFeatures
-XX:+ResourceManagement
munz & more #6
12. IDE Support
munz & more #12
NetBeans 8.1 RC
/Dev Build works
with WebLogic
12.2.1
Eclipse net
(and package)
installer
-> easy OEPE
download &
install
JDeveloper
12.2.1
available for
OFM 12.2.1
NEW! wlserver/server/bin/eclipse.sh
16. Parallel Deployment
WebLogic 12.2.1 provides parallel deployment
• Multiple applications
• Single application with multiple modules
• Applications across
multiple partitions
munz & more
Across Modules in
Applications
Across
Applications
Parallel
Prepare
Available in
WebLogic 11g
New in
WebLogic 12.2.1
Parallel
Activate
New in
WebLogic 12.2.1
New in
WebLogic 12.2.1
20. 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 #20
22. New Command for Scaling
WLST command to scale dynamic cluster:
scaleUp/Down (
clusterName,
numServers,
[updateConfiguration],
[block],
[timeoutSeconds],
)
munz & more #22
How many servers to
add or remove
24. 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 with
configurable parameters
munz & more #24
25. munz & more #25
Smart
rules:
Predefined
policies
with open
parameters
27. Why REST?
• Simplicity
• Language agnostic
• No JVM on client side, no WebLogic <->JMX
• Easy to tunnel through firewalls: HTTP
• Current tech trend (eg. mobile dev)
munz & more #27
28. RESTful Management
• New generic WebLogic 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)
• Used throughout WebLogic documentation
munz & more #28
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 #30
32. 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 #32
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 #33
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 #34
35. Update
Update server surf7, with curl
curl ...
-d "{ listenPort: '9999' } "
-X POST
http://localhost:7001/management/weblogic/la
test/edit/surf7
munz & more #35
37. Query
Single bulk request
queries to select and
return specific subsets
of tree.
POST
http://localhost:7001
/management/weblogic/
latest/domainRuntime/
searchmunz & more #37
40. Virtualization vs. Isolation
munz & more #40
Linux + Docker
Hardware
a.war
Docker container in Linux
with own FS, network stack /
IP address, process space and
resource limits
Hardware
OVM / VmWare ESX / Xen
Appl 1
Solaris
Appl 1
Linux
Appl 1
Win
Server Virtualization
type 1 hypervisor
= on bare metal
Hardware
VirtualBox
Mac OS / Win
App
Linux
Desktop Virtualization:
type 2 hypervisor
= with host OS
App
Win
App
Win
ejb.jar
y.jar
x.py
JDK
WebLogic
tools
Jython
41. Docker
munz & more #41
Linux + Docker
Hardware
a.war
ejb.jar
y.jar
x.py
JDK
WebLogic
tools
Jython
Docker is not a
lightweight VirtualBox
- it's about isolation.
Containers run on
Linux kernel of host
-> Containers are
visible on host
42. Docker Container
• Isolated runtime of Docker image
• Starts up in milliseconds
• Sandboxing uses Linux namespaces and cgroups
-> isolated part of your Linux
• Open Container Standard / Linux Foundation
docker run -d –p 8080:9999 fmunz/micro
munz & more #42
43. solves the “Worked For Me!” issue
munz & more #43
OS tools, JDK,
patches, database
driver, libs,
appserver, domain,
deployment, tools,
scripts
Docker
OS utils, JDK, patches, database
driver, libs, appserver, domain,
deployment, tools, scripts
Integration,
Performance,
Acceptance
Testing
Production
dockerize it!
You can pass environment
variables for specific
settings e.g. in prod
Docker Registry
44. what should be your
biggest nightmare:
unknown and
unofficial images
(>14000)
Docker Registry
45. What Do You Get?
• NOT WebLogic from Docker registry
• NO automatic build via github
• Github repo with scripts
to set up WebLogic on
Oracle Linux in Docker
• Dev or generic distribution
• Docker is a supported
environment for
WebLogic 12.2.1 / 12.1.3
munz & more #45
46. Oracle Product in Docker Official Support
GlassFish
MySQL yes
NoSQL
OpenJDK
Oracle Linux yes
OracleCoherence yes
OracleDatabase (dev)
OracleHTTPServer yes
OracleJDK yes #46^
Oracle support
does not require
you to use the
provided Docker
files
47. Docker Style
• Independent, standalone WLS domain
• Microservices style architecture
• Just add your favorite Docker
cluster
manager
munz & more #47
OS tools, JDK,
database driver, libs,
appserver, single
domain (admin server
only), deployment,
tools, scripts
48. Docker in the Cloud?
Supported by every major cloud provider:
munz & more #48
On premise -> all clouds
Docker
Registry
Docker Container Service
EC2 Container Service
Google Container Engine
Azure Container Service
Bluemix Containers
49. munz & more #49
Docker book
by J. Turnbull (Docker 1.8)
Oracle Whitepaper
WebLogic on Docker Containers
50. Facts to Know
• Oracle supports WebLogic on Docker
• Docker networking is final now
• Docker cluster managers are still evolving:
Docker Swarm, Kubernetes, Apache Mesos with Marathon,
AWS ECS, CloudFoundry, etc.
munz & more #50
52. Domain Partitions
• Admin and runtime slice of domain
• Partition has its own apps, security, JDBC
config etc.
• Partitions can be started and stopped
individually
• Partition can be exported / imported
• Shared on same JVM, but separated
54. Benefit: Isolation
Tenants within one domain have isolation
• Runtime: JDK, heap, CPU
• Security: realm, user
• Admin: life cycle, roles
• Data / traffic: JNDI, JDBC, Coherence,
requests
munz & more / globalcollect 2016
55. Separation
• HR and Finance can be separate partitions
in one domain
• Mercedes and BMW are probably not
suitable for one domain
Technically partitions are not 100%
isolated <-> Docker container, VMs
63. How Does it Work?
JKD Upgrades changes the following files:
bin/setNMJavaHome.sh
bin/setDomainEnv.sh
init-info/startscript.xml
init-info/domain-info.xml
65. Java Cloud Service
Java Cloud Service = JCS
• Oracle cloud offering for WebLogic
• Talk to your partner manager for trial
account
• If you never tried it, give it a go now
and evaluate your use case
munz & more #65
69. JCS Summary
• Saves you install time
• Nicely integrated with DB, ID etc.
• Clone environments
• ZDT patching
• Automated Lifecycle
– For Java and DB cloud
• Continuous Integration / Deliver
– Integration with Developer Cloud Service
-> speed up and modernize environments
munz & more #69
70. Summary
1. JDK 8
2. Java EE 7
3. IDE
4. Console
5. Deployment
6. JMS
7. Cluster
8. WLST
9. WLDF
10. REST
11. Docker
12. Multi Tenancy
13. ZDT
14. Java CloudService
munz & more #70
MTE10083 - Twelve Things You Should Know About Oracle WebLogic Server 12c
Oracle marketing likes to emphasize that there are over 200 new features in WebLogic 12c. In this session I will take a very different approach and present only 12 reasons that make it worth using the latest WebLogic Server 12c.
The features presented in this session are technical, derived from attendees’ questions in several hands-on workshops, without any sales pitch and somehow subjective. Also wherever limitations exist I will mention them.
Everything worth to upgrade to the latest WebLogic Server 12c from core features, important changes, to WebLogic running in a Docker container will be covered.
Question best at the end
surprising things
improved things
fixed bugs
cool features
thing you have to careful about
No more start script issues as in 12.1.3
JVM dependencies– Track resource usage per partition– Requires Hotspot JDK 8u40 with commercial features – Requires G1 garbage collection
EJB 3.2
*disable passivation of stateful EJB
*local async calls, non persistent timer EJBs
Servlet 3.1
Deny uncovered HTTP requests
WebSockets @ServerEndpoint, @onMessage
+life cycle @onOpen Close Error
JSON Builder and Parser
Managed executors instead of starting threads on
http://www.heise.de/developer/artikel/Die-wichtigsten-Neuerungen-in-der-Java-Enterprise-Edition-7-1886333.html
Netbeans dev is very stable. A lot of devs use it all the time!
Jdev is not yet supporting MT, but works with 12.2.1
OEPEOracle
Enterprise Plugin for
Eclipse
SOA deployments have up to 30% speedup
You can turn it off if you must.
scale up cluster and start servers and call scripts before / after scaling ops
8 node cluster with 8 JMSscaling down:-> 6 node cluster with 8 JMS (keep running, because of Unit of Order)
7 & 8 migrate automatically
Limitted previously,
All JMS Artifacts can be targettted to cluster, including
SAF Agents,
Path Service
Msg Bridge
For all kind of clusters configured, dynamic, mixed
updateConfig = increase cluster size in conifg
timeout: secs waiting to start before cancelling operation
policies can have a schedule
Tom Mareau: HTTP Options removed?
lest look at the CRUD pattern
authentication would happen by browser
READ is safe (wont change anything) and idempotent (you can call it as many times as you like with same effekt)
what if you are not sure what –d JSON to send here?
If you want to create but don’t know how to
Lets talk about Docker first, forget about Oracle for 7 minutes.
Docker containers are isolated, not having different OSes, actually not having a real OS at all.
Shared fs layers!
running Linux shows Docker processes!
Docker containers are isolated but share the kernel
more like a camel hump
not dockerized:Apps that load kernel modules
Low level OS stuff dealing with namespaces
rough idea: 1 process per container.
container -> microservice
one domain per container
Major Cloud vendors
*Microsoft Azure Container Service
*Amazon EC2 Container Service
*IBM Bluemix Containers
Google Container Engine
* partners with Docker Inc.
Kubernetes is 1.03 (14.000 commits from 400 contributors)
Mesos 0.2, Marathon 0.9
AWS EC2 Container Scheduler,
Oracle: Partitions = microcontainers (?)
Start with the central platform – WebLogic running with two partitions
A domain partition is an administrative portion of a domain that can be managed independently and can share the runtime capacity in a domain – the managed servers and clusters, AKA JVMs.
Each domain partition has a Virtual Target, applications, and required resources
(click)
From the Web tier (Traffic Director or plug-ins) traffic is routed to the address defined by the Virtual Target.
Once a request enters into a partition, it stays in that partition.
Each partition has its own JNDI tree, so any use of resources is within the partition.
That also means data segregation.
For JMS, each JMS server has its own set of queues and its own persistence.
(click)
And each partition can have its own datasources that connect to dedicated PDBs. (PDBs are not required, but they are a natural fit)
(click)
And, of course, we have Coherence integration. Applications can use a dedicated Service in Coherence, or they can use a shared Service, depending on application needs.
OLD:
No (minimal) code change to the application – WebLogic manages the tenant identification/isolation
At deployment, apps and resources in the template are deployed/replicated for each partition (tenant) specified
JNDI isolation and scoping for each partition
Runtime traffic is isolated end to end:
The user accesses the application via the virtual host – http://baylandurgentcare.com:7011
Separate application instances have their own JNDI tree, resources
Work Manager per partition to manage threads
Data is segregated with PDBs
WebLogic infrastructure is shared among tenants
Do you trust partitions?
What if one affects the other? Define resource consumption manager
Shut down resources if everything goes wrong
Shutdown managed servers
Move OH to backup location
Move patched OH to original location
Start servers again
Repeat for remaining nodes