I'm writing an application on the Wowza server and would like to be able to be able to create/start VHosts/Applications dynamically. Basically I want the VHosts.xml to contain nothing and have the server launch them. The main reason is I don't want the server to launch them on start, but I also want the app to be completely dynamic.
I've built the system however I notice that the configured HostPorts do not bind when the VHost instance is created. There's a lot of undocumented API calls and I figure this might be one of them.
The only work around I've found is to load a different VHosts.xml file after the server has started which will load the vhosts into the system but not start them.
VHostListUtils.loadConfigFile(Server.getInstance().getVHostList(), System.getProperty("com.wowza.wms.ConfigHome") + "/conf/VHosts2.xml");
However I'd like to be able to do this without having to load in a file rather I'd like to manually set the configuration such as:
vhost = VHostSingleton.getInstance("pong", true);
VHostSingleton.init(vhost.getName(), System.getProperty("com.wowza.wms.ConfigHome") + "/vhosts/pong");
This starts the VHost ok but the HostPorts don't bind.
Also which is the best way to get server properties? System.getProperty("com.wowza.wms.ConfigHome") or Bootstrap.getServerHome(Bootstrap.CONFIGHOME)