-
1. Re: Where to specify the IP Address and Cluster Name for JBoss Instance ?
jaikiran Apr 12, 2010 9:41 AM (in response to saswata)You can set them in run.bat or run.sh.
-
2. Re: Where to specify the IP Address and Cluster Name for JBoss Instance ?
saswata Apr 12, 2010 9:50 AM (in response to jaikiran)So , how can I do that ?
Please provide a more detailed information as i am new in JBoss .
Please help me out .
Thanks & Regards
ssawata mandal.
-
3. Re: Where to specify the IP Address and Cluster Name for JBoss Instance ?
peterj Apr 12, 2010 10:16 AM (in response to saswata)It would help it you told us whether you are running on Linux or on Winodws, and if you were starting JBoss AS manually from the command line or starting it automatically as a service/daemon.
If running from a command line, I recommedn creating a new .bat or .sh script and use it to start the app server. For example, start_server1.bat might contain:
call run.bat -b 99.99.99.99 -g xxxx
-
4. Re: Where to specify the IP Address and Cluster Name for JBoss Instance ?
saswata Apr 12, 2010 11:20 AM (in response to peterj)Hi Peter,
Thanks for the reply.
Yes, we are using Windows and creating the JBoss Instances from the command prompt by the run command :-
run -c node -g partitionname -b ipaddress
But , I would like to specify the PartionName and the IPAddress in some configuration file , so that when we say ,
run -c node
the instance will be initiated by retrieving the IPAddress and PartionName from the config file.
Thanks & Regards
saswata Mandal.
-
5. Re: Where to specify the IP Address and Cluster Name for JBoss Instance ?
peterj Apr 12, 2010 12:00 PM (in response to saswata)First, let me again suggest very strongly that you create a run_node.bat file containing:
call run.bat -c node -g partitionname -b ipaddress
This is the easiest way to accomplish what you want.
If you absolutely insist on changing *.xml files, then you will have to first understand that the -b and -g setting on the command line in turn set one or more system properties, and those system properties can be referenced in multiple XML configuration. Here are the system properties set for the two options:
-b : jboss.bind.address, bind.address, jgroups.bind_addr, java.rmi.server.hostname
-g : jboss.partition.name
In some cases, the system properties are set from -b only if they were not set independently.
Now that you know this, you need to find every XML file that references these system properties and replace them with your desired value. For example, in server/all/conf/standardjboss.xml you will see:
<cluster-config>
<partition-name>${jboss.partition.name:DefaultPartition}</partition-name>You will want to change it to:
<cluster-config>
<partition-name>partitionname</partition-name>or perhaps to:
<cluster-config>
<partition-name>${jboss.partition.name:partitionname}</partition-name>By the way, I count around 20-30 instances of jboss.partition.name located in several XML files in the 'all' configuration. I did not serach for the system properties for -b but I now that there are a lot of them.
-
6. Re: Where to specify the IP Address and Cluster Name for JBoss Instance ?
saswata Apr 12, 2010 12:42 PM (in response to peterj)Hi peter ,
Thanks for that detailed reply.
I think , I should create the run_node.bat file , as you have suggested.
After, reading your post , I am afraid to touch the config .xml files.
Thanks Again.
Thanks & Regards
saswata Mandal.
-
7. Re: Where to specify the IP Address and Cluster Name for JBoss Instance ?
pasumarthivijaykumar Sep 30, 2011 7:49 AM (in response to peterj)Hi Peter,
That's great Information.
Can you please let me know with an example? for this call run.bat -c node -g partitionname -b ipaddress
and what is node refers to?
Since i am unable to and change when i tryed. For your information my ipaddress is : 10:68:168:56 and hard disk partition is: D:
If i am wrong kindly request you to correct me.
Thanks & Regards,
Vijay
-
8. Re: Where to specify the IP Address and Cluster Name for JBoss Instance ?
wdfink Sep 30, 2011 8:34 AM (in response to pasumarthivijaykumar)Hi Vijay,
here a short overview ofparameters
-c mean the server configuration which is represented by the directory in JBOSS_HOME/server/
-b mean bindaddress, this is the IP where all connections bind 0.0.0.0 (all interfaces) 127.0.0.1(only local)
you might use 10.68.168.56 in your case
-g is a cluster option (only if you use all or a copy of it) to separate different JBoss instances see [1] or [2]
[1] http://community.jboss.org/wiki/TwoClustersontheSameNetwork
-
9. Re: Where to specify the IP Address and Cluster Name for JBoss Instance ?
pasumarthivijaykumar Oct 1, 2011 6:29 AM (in response to wdfink)Hi,
Thank you very much.
Warm Regards,
Vijay