Enterprise grade Java.
You'll read about Conferences, Java User Groups, Java, Integration, Reactive, Microservices and other technologies.

Wednesday, March 25, 2009

What can you administrate in 60 Minutes?

07:16 Wednesday, March 25, 2009 Posted by Markus Eisele
, ,
Inspired by Adam's Blogpost to his famous "What You Can Build In 50 Minutes With Java EE 5/6?" Session, I tried the other side of software development yesterday. My talk at the DOAG SIG Fusion Middleware was about clustering and scaling Oracle Weblogic server. After a (too long) slide oriented presentation about some basic concepts I tried to setup a Weblogic cluster in 60 minutes. Two nodes and one administrative server. Guess what? I did not finish. Maybe, I talked too much and clicked to less ;) But anyway .. it was quite an experience and the only two tasks missing were to define replication groups and start the cluster over to deploy the sample applications.



During the research for this session I examined the examples delivered with the Weblogic server. You can find them in your local installation at \wlserver_10.3\samples\server\examples\src\examples.
There are two cluster examples available. First one is about a statefull session bean and the second one about HTTP Session Failover.
If you run the statefull session bean example, you will notice that you don't see any message about a happening failover. I need to digg into this a bit deeper, cause the documentation states, that you should (!) see a message. Anyway: If you would like to find out, on which node you are running, you can simply use a weblogic server MBean to find out:


InitialContext ic = new InitialContext();
MBeanHome mbeanHome = (MBeanHome) ic.lookup("weblogic.management.home.localhome");
String nodeName = mbeanHome.getMBeanServer().getServerName();


And yes, I know, that the MBeanHome interface is deprecated since the 9.0.0.0 ;) But it's a quite short way to figure it out. It was replaced by standard JMX design patterns in which clients use the javax.management.MBeanServerConnection interface to discover MBeans, attributes, and attribute types at runtime.