Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a requirement, where I have context defined for three servers.
Server1-contextgroup1
Server2-contextgroup2
Server3- contextgroup3
How can I configure the job to run in such a way , that it selects the context group based on the server it is running. Or change the context group based on the server name after the job is started.
Thanks
hi,
you can check computer name with
java.net.InetAddress.getLocalHost().getHostName()
also you can check any OS variables with
System.getenv("env_name")
as variant you can check variable and run subjob with context group based on variable (host) name
but more simple - load context from file/database
in this case you will need only 1 context group for any number of servers, you can use same file name, or use variable name as part of context file or as part of sql query for extract and load proper context
hi,
you can check computer name with
java.net.InetAddress.getLocalHost().getHostName()
also you can check any OS variables with
System.getenv("env_name")
as variant you can check variable and run subjob with context group based on variable (host) name
but more simple - load context from file/database
in this case you will need only 1 context group for any number of servers, you can use same file name, or use variable name as part of context file or as part of sql query for extract and load proper context