-
1. Re: JBoss instance name
periklis_douvitsas Jul 3, 2012 10:23 AM (in response to tamizharasi.periyasamy)Maybe i don't understand exactly what you are asking but is it possible to slightly change an image in the web application and see from the image which application is running.
-
2. Re: JBoss instance name
periklis_douvitsas Jul 3, 2012 10:24 AM (in response to tamizharasi.periyasamy)Also, can you have a look at the logs of each instance?
-
3. Re: JBoss instance name
peterj Jul 3, 2012 10:35 AM (in response to tamizharasi.periyasamy)Look at the URL? Each instance will have its own URL. Are you using different ports or different IPD addresses? Whichever is different, that should identify which one you are using at the time.
-
4. Re: JBoss instance name
tamizharasi.periyasamy Jul 3, 2012 11:10 AM (in response to peterj)Actually if the form is submitted, one java class is invoked. In the java class i want to get through which instance the form is submitted...
-
5. Re: JBoss instance name
peterj Jul 3, 2012 11:23 AM (in response to tamizharasi.periyasamy)Which version of JBoss AS? If 6.x or earlier, you can obtain the server's configuration name (e.g. default, all, etc.) via JMX from the ServerName attribute of the jboss.system:type=ServerConfig MBean. Or even easier, you could look at the "jboss.server.name" system property.
You could also use the HttpServletRequest object to obtain the URI, or the ServletContext to get the real path. Either of those should help you decide which instance.
-
-
7. Re: JBoss instance name
shonkylogic Aug 1, 2013 8:17 PM (in response to tamizharasi.periyasamy)Have you tried the jboss.node.name System Property
String instance = System.getProperty("jboss.node.name");
Other properties that may be useful are jboss.server.name and jboss.host.name