[jboss-as7-dev] Providing server name on command line?

Heiko W.Rupp hrupp at redhat.com
Tue Mar 29 08:31:21 EDT 2011


Am 29.03.2011 um 14:25 schrieb Heiko Braun:
> Thats the server configuration name you see in the logs.
> You can get a list of names like this:
>    "result" => [
>        "server-one",
>        "server-two",
>        "server-three"
>    ],
> 

> Is this what you are looking for?

Not exactly.
When I do ps I get:

$ ps auxw|grep org.jboss.as.server
hrupp    10375   0,1  1,0  1329304  87832 s003  S+    1:20pm   0:07.26 /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -Xms64m -Xmx512m -Dorg.jboss.boot.log.file=domain/servers/server-one/log/boot.log -Dlogging.configuration=file:/devel/jbas7/jboss-as/build/target/jboss-7.0.0.Beta2/domain/configuration/logging.properties -jar jboss-modules.jar -mp modules -logmodule org.jboss.logmanager -jaxpmodule javax.xml.jaxp-provider org.jboss.as.server
hrupp    10376   0,0  0,9  1057880  79560 s003  S+    1:20pm   0:07.22 /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -Xms64m -Xmx256m -Dorg.jboss.boot.log.file=domain/servers/server-two/log/boot.log -Dlogging.configuration=file:/devel/jbas7/jboss-as/build/target/jboss-7.0.0.Beta2/domain/configuration/logging.properties -jar jboss-modules.jar -mp modules -logmodule org.jboss.logmanager -jaxpmodule javax.xml.jaxp-provider org.jboss.as.server

those two instances only differer in the value of -Dorg.jboss.boot.log.file ; RHQ is able to discover processes and then needs to give them a name.
Here the server name 'server-one' etc. comes to mind. This is helpful as it can be correlated to the information in the domain model that you
showed.
I just have the fear that the log file name is too fragile to be used to uniquely identify a single managed AS instance.

I was first thinking of having -Das.name=server-one , but when the user changes the server name, this property will not change until next process restart,
which is uncool.

Another option could be that the domain model is returning the pid of the running instance.

   Heiko

-- 
Reg. Adresse: Red Hat GmbH, Technopark II, Haus C, 
Werner-von-Siemens-Ring 14, D-85630 Grasbrunn
Handelsregister: Amtsgericht München HRB 153243
Geschaeftsführer: Brendan Lane, Charlie Peters, Michael Cunningham, Charles Cachera





More information about the jboss-as7-dev mailing list