/** Ensure the proper environment regardless of domain used to construct the app **/ component { // PUBLIC METHODS --------------------------------------------------------------- public void function configure(){ // You don't have to put this in the application scope. // I just like to keep it there. application.machine = createObject('java','java.net.InetAddress').getLocalHost().getHostName(); switch(application.machine) { case 'somemachine' : local.env = "workstation" break; case 'some_other_machine' : local.env = "dev" break; case 'machine_name_45' : local.env = "CIServer" break; case 'machine_name_x' : default: local.env = "production" break; } variables.Controller.SetSetting('Environment',local.env); return; } }