users@glassfish.java.net

setting node-specific properties

From: Dick Davies <rasputnik_at_gmail.com>
Date: Sat, 26 Jul 2008 14:03:39 +0100

Hi, we're running a 2 node GFv2 cluster, and we've got the Roller
weblogger running
on both nodes.

I've been debugging some weird issues the past day or two and think I
found the problem;
the webapp needs a property

   # client identifier. should be unique for each instance in a cluster.
    tasks.clientId=defaultClientId

(in a bundled properties file) to uniquely identify each
instance (to handle concurrent access to parts of the database).

Since both glassfish instances are running the same WAR file, they
both have the same clientid.

I really don't want to have to write 2 different WARfiles, so I'm
wondering if there's a way to set
a system property at glassfish instance startup (-Dclientid=$HOSTNAME),
that I could somehow inject into that properties file?


-- 
Rasputnik :: Jack of All Trades - Master of Nuns
http://number9.hellooperator.net/