Nerd Notes

/dev/brain: no space left on device

Archive for the ‘Scripting’ Category

Configuring a BEA Weblogic 8.1 cluster address, more

with 3 comments

If you are lucky enough to start from scratch, the config wizard that comes with Weblogic 8.1 lets you specify a cluster address in one of its steps. If you instead happen to already have a configured Weblogic 8.1 cluster and you need to customize the cluster address, you’ll need to modify the config.xml file for your domain.

The default <Cluster … > element in the config.xml file looks like this:

<Cluster ClusterAddress="node1,node2" Name="myCluster"/>

but Weblogic really reads it as it would look like:

<Cluster ClusterAddress="node1,node2" Name="myCluster"
MulticastAddress="" MulticastPort="7001" />

because that is the default ip address and port combination if you don’t specify one.

It should be pretty evident how to customize the address now.

As a sidenote, I noticed the freshly installed runner shell scripts that come with the default configuration template, do not embed the username and password needed to access the server administration console (which is a good thing from a security standpoint). Sometimes, because you are in a stage environment and you don’t really care too much about security, you want to embed the credentials in the scripts so that, when launching the server instances, you’re not going to be prompted for them. This can be done in the script that you can find in the domain directory. The variables you need to set to avoid being prompted for passwords are:

  • WLS_PW

Another interesting variable you can tweak is MEM_ARGS in the $WL_HOME/common/bin/ file. What you specify here gets passed as an argument to the JVM interpreter which runs the server instances. Suppose you want to get a bigger heap size, say 1GB:

MEM_ARGS="-Xms1024m -Xmx1024m -XX:MaxPermSize=256m -XX:NewRatio=4 -XX:SurvivorRatio=4 -XX:TargetSurvivorRatio=80 -XX:+DisableExplicitGC"

The other VM options are pretty much ninja jargon to me right now so I’m not going to talk about them. But if you really need to dig in, do it here.

Written by Mirko Caserta

October 25, 2006 at 3:00 pm