system
1
a linux server(redhat enterprise 5).
the properties I set in Application.xml cannot be loaded. When I query the data,
I got null in my java code. This happens in 1.3.0 and 1.3.1.
I revert back to an older version
1.1.2 build3503
and it works correctly in that version.
XXXXX
yyy
It is working for me in Wowza Pro 1.3.1. I modified the fastplay example. So my [install-dir]/conf/fastplay/Application.xml file looks like this:
<Root>
<Application>
<Connections>
<AutoAccept>true</AutoAccept>
</Connections>
<Streams>
<StreamType>default</StreamType>
<StorageDir>${com.wowza.wms.AppHome}/examples/SampleContent</StorageDir>
</Streams>
<SharedObjects>
<StorageDir></StorageDir>
</SharedObjects>
<Modules>
<Module>
<Name>base</Name>
<Description>Base</Description>
<Class>com.wowza.wms.module.ModuleCore</Class>
</Module>
<Module>
<Name>properties</Name>
<Description>Properties</Description>
<Class>com.wowza.wms.module.ModuleProperties</Class>
</Module>
<Module>
<Name>logging</Name>
<Description>Client Logging</Description>
<Class>com.wowza.wms.module.ModuleClientLogging</Class>
</Module>
<Module>
<Name>fastplay</Name>
<Description>Fast Play</Description>
<Class>com.wowza.wms.module.ModuleFastPlay</Class>
</Module>
<Module>
<Name>junkmodule</Name>
<Description>Junk Module</Description>
<Class>com.wowza.wms.plugin.test.module.JunkModule1</Class>
</Module>
</Modules>
<Properties>
<!-- Properties defined here will be added to the IApplication.getProperties() and IApplicationInstance.getProperties() collections -->
<Property>
<Name>test</Name>
<Value>working</Value>
</Property>
</Properties>
</Application>
</Root>
And the server side java code looks like this:
package com.wowza.wms.plugin.test.module;
import com.wowza.wms.module.*;
import com.wowza.wms.application.*;
public class JunkModule1 extends ModuleBase
{
public void onAppStart(IApplicationInstance appInstance)
{
getLogger().info("onAppStart: "+appInstance.getProperties().getPropertyStr("test"));
}
}
When I run this code and connect using the fastplay example I get the following log message:
onAppStart: working
If you still can’t get it to work can you either try the code above or post your code and Application.xml file.
Charlie
OK. my code is not the same as yours.
The code was originally written for version 1.1.2 and earlier.
initProps( appInstance.getApplication().getProperties() );
// this one below does not work.
//initProps( appInstance.getProperties() );
appInstance.getProperties() does not work in 1.1.2.
appInstance.getApplication().getProperties() does.
in version 1.3.1, it is the opposite.
appInstance.getProperties() works.
which call should I use? What is the difference between these 2?
I changed this slightly in 1.3.0. The proper way to get to the properties in Application.xml is:
appInstance.getProperties()
I apologize for the change and the confusion. The way it worked in 1.2.x was a bug that was fixed in 1.3.x.
Charlie