JRockit on Solaris and WebCenter

While JRockit is generally the preferred JDK for WebLogic Server, I ran across an environment where WebCenter had poor performance for no discernible reason recently. I could make this post long by boring you with the details of how I decided to try switching to the Sun JDK, but instead I will just mention that it was WLS 10.3.4 on Solaris 10U6 with JRockit 6U28 and that switch to Sun JDK 6U24 resulted in a significant improvement.

There may be other factors involved in this (I have requested that a Solaris SME look at the environment), but wanted to add this as a debugging option for those who may run into a similar issue where none of the usual suspects of poor performance are present and it happens to be JRockit on Solaris.

© Scott S. Nelson

Remember: Examples are Just Examples

For example, the documentation at Using the WebLogic Server JMX Timer Service gives a very straight-forward and standards-compliant example of how to run a task at intervals.  I used this example almost in its entirety to create a module to poll a database for a specific change every 2o minutes. I then noticed that the timer would stop for no apparent reason at no obvious interval.

After many hours of digging through logs looking for some cause, I was ready to give in and post a plea for help on a mailing list. It just so happened used a text editor to grab the code to post, and noticed in the text editor that there was one place where unregister would be called on the bean: under contextDestroyed in the servlet to at registered the timer.  In the clarity of hind-sight I realized that the timer was stopping more often in environments that were accessed less often because the efficient WebLogic Server was garbage collecting the unused servlet handle, resulting in contextDestroyed being invoked, thus killing my timer. As it normally should, except in the case where the timer should continue running as long as the server was running.

Lesson learned: Think it all the way through between copy and paste.

For those who like links and confessions:  There is an example of using a timer in my JavaBoutique article that contains precisely the same flaw in logic.

© Scott S. Nelson

WebLogic Server Session Affinity and Serialization

I’ve had on my to-do list for awhile now to post about a recent investigation into a WLS  stuck thread issue I fixed. And I still will, as the way I got there is probably more useful to some than the end result. But, someone sent me a question that led straight to the solution today, so I thought I would post the email thread here to benefit my reader:

Q: Can we configure a cluster of WLS that is behind a F5 to use jdbc based persistence without the server affinity defined by load balancer?

A: By persistence, I would assume you mean user session. The limitation is on the applications deployed rather than WLS itself. All objects in session must be serializeable in order for WLS to properly manage persistence, regardless of whether it is database or file or in-memory persistence.

If your client has an issue where session data is lost unless server affinity is maintained it is because persistence has been manually turned off for the application. This is almost always done be developers or vendors when their application does not support serialization.

I’ve run across this situation twice this year. The first time was a sloppy, dishonest vendor (they clearly stated both that their product supported serialization and that they had never tested it…so I did, and it did not) that did not make their session objects serializable. The second time they had issues with a third party application that serialized PDF reports that were generated for a request and they had to turn off persistence to keep the disks from filling up every quarter.

© Scott S. Nelson

Example of Creating a User in Oracle DB for WebLogic

One of those things I ran across recently that I always forget between projects so I thought I would share here:

1 Set the Oracle Home

export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/

2 SQL Plus – Idle Instance $ORACLE_HOME/bin/sqlplus /nolog

3 Connect as SYS User

connect sys/welcome1@xe as sysdba;



5 Grant Roles and Permissions


6 The WLS install seems to expect a table named SYSTABLES, so you will need to create it:


© Scott S. Nelson

Creating a Local WLS 10.3.2 Domain

While setting up a new project this morning I was reminded of a somewhat counter-intuitive sequence when setting up a local environment (even with the simple Pointbase install). When you get to this screen:

Clicking Next will give you this warning:

Just click OK. The database isn’t running at this time.

And, for those who haven’t upgraded in a while and don’t read the manual, you will want to click Run Scripts when you see this screen:

After the wizard completes, look for the create_db.cmd in the domain root and run it before starting the server. The first start, the server will have problems starting. Let it run until nothing is spit into the console anymore, then kill it and start it again. This time it should come up.

© Scott S. Nelson