My application runs on IBM WebSphere 6.1 Network Deployment. The application have several JSP files and Java classes. Today each host have only one JVM instance but my intention is to start another instance on each host. How can I configure log4j to log to different files for each JVM instance in the same host? I thought of using variable substitution on log4j XML configuration file but it only works with system properties. So, it is safe and recommended to set a custom system property just to store the JVM name? Anyone knows another strategy to achieve this in a 'elegant' way?
views:
119answers:
1
A:
I've find out a system property that already exists (IBM WAS ND 6.1) and provides the JVM name (am.appserver). But I'm open to alternative suggestions.
Renan Vinícius Mozone
2010-06-11 17:33:12
Please update your post, do not add answers to expand on your post
Romain Hippeau
2010-06-11 18:00:00
My intention is to answer my own question. Shouldn't I do this?
Renan Vinícius Mozone
2010-06-11 20:45:00
@Renan Vinícius Mozone If that is what you want to do, that's fine.
Romain Hippeau
2010-06-13 02:58:59
A customer for one of my projects used a similar approach to ease deployment on test, integration and production environment: Each WAS instance defined a system property containing "test", "int" or "prod", which was used by the application to choose a configuration file.
Christian Semrau
2010-06-13 10:37:05