Zero Downtime, REST, Domain Partitions / Multi Tenancy, Elasticity and WLDF. WebLogic 12.2.1 (12c)

I just finished a two week long hands-on consulting session for some pretty experienced application managers and architects at one of Europe’s premier financial services institution.

In 5 days we explored WebLogic 12.2.1 extensively:

  • Zero Downtime
  • REST
  • Domain Partitions / Multi Tenancy
  • Resource Group Management
  • Java Mission Control
  • WLST
  • Elasticity
  • JMS Clustering
  • WLDF

 

p1

Here is some feedback from the group. You can tell we had fun, although we worked very hard.

Screen Shot 2016-07-04 at 10.43.06

 

This is how a happy group looks like.

group2

 

People seemed to be happy, here is what they liked.

Screen Shot 2016-07-04 at 10.44.13

For more details download the flyer from the Oracle WebLogic Server 12.2.1 (12c) course site.

Deploy with Deployment Plan (WebLogic 12.2.1)

You cannot deploy an application to WebLogic 12.2.1 and specify an arbitrary location for the deployment plan when using the admin console, but you can update a deployed application and specify the location of a deployment plan.

However, you can deploy an open directory with a app directory (containing, well, your app) and plan subdirectory (containing your deployment plan).

mdbplan

Zero Downtime: Restart Admin Server from Admin Console / Rolling Restart of Servers or Cluster (WebLogic 12.2.1)

Before WebLogic 12.2.1 I was often asked if there is any OOTB restart of the admin server, especially from the admin console. Now with WLS 12.2.1 it can be done easily. Also of course you rolling restart a set of servers, a cluster or two, or whole domain!

  • Admin Server has to be assigned to a machine
  • Admin Server has to be started under nodemanager

Goto DOMAIN / ZDT Control / Domain | Cluster | Servers, chose what you would like to rolling restart, then click on Patch.

Select Rolling Restart.

rollingrestart

SQL to duplicate table structure with / without data rows

Just a note to myself.

How to duplicate a table structure with / without data. Drop the where 1=0 to copy over the data as well.

As an example the Oracle HR scheme with the employees table is used and replicated to employees2 (see bold SQL line below).

Note, that not null constraints are replicated but primary keys, foreign key, unique constraints and triggers aren’t.

 

SQL> describe employees;
 Name Null? Type
 ----------------------------------------- -------- ----------------------------
 EMPLOYEE_ID NOT NULL NUMBER(6)
 FIRST_NAME VARCHAR2(20)
 LAST_NAME NOT NULL VARCHAR2(25)
 EMAIL NOT NULL VARCHAR2(25)
 PHONE_NUMBER VARCHAR2(20)
 HIRE_DATE NOT NULL DATE
 JOB_ID NOT NULL VARCHAR2(10)
 SALARY NUMBER(8,2)
 COMMISSION_PCT NUMBER(2,2)
 MANAGER_ID NUMBER(6)
 DEPARTMENT_ID NUMBER(4)

SQL> 
SQL> create table employees2 as select * from employees where 1=0;

Table created.

SQL> describe employees2;
 Name Null? Type
 ----------------------------------------- -------- ----------------------------
 EMPLOYEE_ID NUMBER(6)
 FIRST_NAME VARCHAR2(20)
 LAST_NAME NOT NULL VARCHAR2(25)
 EMAIL NOT NULL VARCHAR2(25)
 PHONE_NUMBER VARCHAR2(20)
 HIRE_DATE NOT NULL DATE
 JOB_ID NOT NULL VARCHAR2(10)
 SALARY NUMBER(8,2)
 COMMISSION_PCT NUMBER(2,2)
 MANAGER_ID NUMBER(6)
 DEPARTMENT_ID NUMBER(4)

DevOps tools: http REST client httpie

Doing unplanned things adds fun to our lives. Last year at Open World when heading back to the Hilton I sneaked into a REST session at Java One that I never planned to attend. Honestly, I went there to finish my very late lunch. There I learned about a REST client tool that you should add to your toolbox: http (pronounced “HTTP Pie”, with the brave abbreviation: http).

In short http is more convenient version of curl, for the non-color blind folks. It includes heaps of features, like storing session data that can referenced for following requests, easy specification of JSON values, etc.

Here is an example of its usage with the the new WebLogic 12.2.1 REST interface for administration:

http -a weblogic:welcome1 \ "localhost:7001/management/weblogic/latest/domainRuntime/serverLifeCycleRuntimes/AdminServer?links=none&fields=name,state"

 

Screen Shot 2016-04-15 at 09.34.54

You read it here first. But also check out my other DevOps tools postings like lsof, high CPU threads, tunnel with ngrok.