Another Myth Debunked: More than 200 Continuous Redeployments with WebLogic

The other day I overheard the myth that you simply cannot redeploy several times with WebLogic because inevitably you would end up having an out of memory error. Since I am currently writing on an WebLogic 12c book I decided to verify that.

Certainly this depends a lot on your heap settings and what your application is doing, eg. it is easier to get it wrong if you are writing your own classloaders etc. I certainly admit that these problems, if they occur, are particularly hard to sort out.

Hands-on Test

More important you should detect them early. So go and test it! It’s a simple 10 line WLST script. I have done it for you to verifiy if there is a general problem with redeployment in WebLogic.

I redeployed the MedRec application over 200 times. MedRec comes with the WebLogic 12c installation (only if you decide to install the samples). It consists of  over 20 EJBs, a web part and a few web services.

The sample domain can be found in the WL_HOME/samples/domains/medrec directory.

Download

A little WLST script that you can download does the trick (it’s a quick hack, you can certainly beautify and add error handling to it!). Download it (it comes zipped) and unzip it to the domain directory. It even contains comments about how to run it.

The script deploys the MedRec application (so undeploy it first!), waits for 30 seconds, undeploys, waits again and deploys again. At the same time it prints the number of loaded classes, heap and non-heap runtime values.

Results

I was running this experiment for 200 redeployments. Apart from the output of the program, I recorded some data plots with jconsole.

The non-heap usage after 200 redeployments is shown on the following screenshot.

Everything was fine. I guess I could also do 1000 redeployments. I just stopped it because I got bored. I believe it would go on forever and I needed to shut down my computer.

 

Also here is the heap usage:

 

So test your own application deployment! It’s an easy test. IMHO it should be run for every important application. Add it to your tests when load testing the application.

Also I recommend to create some load for the app while it’s deployed. You may want shorten the interval between the deployments to a few seconds to get more deployments done faster.

Let me know if it breaks in your case 😉

Also stay informed about other exciting topics covered in the my WebLogic 12c book. I just created a Youtube channel with many WebLogic 12c screencasts (more to come every week).

 

Review: WebLogic Server 11g Administration Handbook by S. Alapati and an Overview of other WLS 11g books

“So which WebLogic book do you recommend?

During the last couple of years I must have been delivering more than a dozen WebLogic server workshops for all kind of audience. Naturally the question that comes up at the end is: “So which WebLogic book do you recommend?”.

Only a few years ago…

To be honest, for a long time there wasn’t anything that I could recommend at all. This situation changed when Patrick and Nyberg published Professional Oracle WebLogic Server. And their book certainly doesn’t deserves the not so good reviews on Amazon. For quite a while it was the best book available about WebLogic server – certainly not because it was the only one. Written by Patrick, who was (or still is?) VP in Oracle’s Fusion Middleware Development, there is a least some additional content to be found beyond of what is covered in the offical Oracle documentation (the first technical description of cluster unicast, how to build singleton services in a cluster for developers). The book targets developers as well as admins and it’s useful for architects. But then, it was written when WebLogic 9/10 was hot.
Summary: Technically sound, but outdated now. Doesn’t deserve the bad reviews on Amazon.

… now

Nowadays, while all the world seems to be chit-chatting about clouds only (and I personally can’t wait for WebLogic 12c to be released) there are 2 new WebLogic 11g books out.

I have to admit that I only browsed Michel Schildmeijer’s book Oracle Weblogic Server 11gR1 PS2: Administration Essentials. Yet it seems an interesting book for those who are getting started with WebLogic server and those who are looking for a gentle step-by-step instruction to get most important aspects configured. On a first glance it does exactly what it says on the tin: administration essentials. Markus Eisele has written an insightful and detailed review about the book that I pretty much agree with.

Summary: Too many screenshots, not much content beyond that, outdated since it doesn’t cover WebLogic 12c.

 

WebLogic Server 11g Administration Handbook

However, there is a another book out now which caught my attention. Oracle WebLogic Server 11g Administration Handbook written by Sam Alapati and published in Sept 2011.

Content:

Myself I don’t like reviews that repeat the content of a book over and over again but for your convinience there is a TOC available at Amazon. Interesting enough, the book covers roughly the topics that you could learn about in a 5 day WebLogic admin training course. Actually it reads as if somebody knowlegeable enough took the content of the official Oracle WebLogic training course and converted it into a book. The book is up to date and mentions the unique features of WebLogic 11g such as the new dashboard that replaces the old console extension of WebLogic diagnostic framework.

Style:

From the way the book is written you can tell that Alapati has a deep understanding of the topics covered. There is no fluff, everything is technically sound. Still it is easy enough to read.

Recommendation:

Do I recommend it? Yes.

 

Summary

 

what I liked:

+ covers all the content of a 5 day WebLogic admin training in enough detail.

+ it makes a great companion book for the WebLogic administration certification or for somebody with a Fusion Application background.

+ precise writing style yet still easy to read. You can tell the author knows very well what he is writing about.

minor things I did not like:

– it only repeats the content of a basic 5 day WebLogic admin training, there is not much advanced content beyond that.

– it explains how to configure stuff but it does not deal with best practices if you are running hundreds or thousands of WebLogic servers (no, just scripting is not enough then!).

– reading a book written by an Oracle ACE I was expecting to learn about limitations and showstoppers as well. But maybe I am personally expecting too much here.

– there is a kindle version now. It’s stupidly more expensive than the printed version.

My summary summary condensed: 5* (on an Amazon scale from 1 to 5*)

 

The new kid on the block 😉

Just for completeness: I now published a book about WebLogic Server 12c. When I wrote this blog posting it didn’t even plan to write a WebLogic book. So no shameless plug intended. Sincerely! Please judge yourself, it contains all the stuff that Oracle doesn’t tell you about 😉

WebLogic 12c Book: Distinctive Reciopes (Architecture, Development and Administration)

WebLogic in the Cloud

I saved the real shameless plug for the end. So feel free to stop reading here! However, if you believe that cloud computing is purely a marketing hype you may want to check out the Oracle Middleware and Cloud Computing book for a critical review of what is possible today without vaporware. The book explains why the cloud is like a fully programmable data center at your finger tips and how to build up highly available, globally distributed, load balanced instances and deploy your applications. All this just for a few cents.

I am happy to report that I received the Oracle Technologist of the Year award for publishing this book.
 

Announcement: Winners of the Cloud Book Raffle

Yes, it took me a while for this announcement. Books are surprisingly time consuming even after they are written. Yet the two copies of my book

“Middleware and Cloud Computing”

are already on their way to the happy winners:
– T. K. from Xensio (DE)
– E. F. from Sunrise (CH)

Congratulations 🙂

And a Merry Christmas to all of you!

P.S. An official announcement of the book will follow. It’s available in the US and can be ordered in DE and UK.

PP.S. We are almost living in 2011. Marketing is changing. Show the world that you LIKE the book’s web site. Spread the word, invite your friends, tell your colleagues. There will be more stuff to be won… Cheers!