* change default to vpn profile instead of wan for webstart client.

This commit is contained in:
Heng Sin Low 2008-02-21 05:52:38 +00:00
parent 4e05ff082f
commit 8d113ba2a5
1 changed files with 16 additions and 2 deletions

View File

@ -87,15 +87,29 @@ public class CConnection implements Serializable, Cloneable
CConnection cc = null; CConnection cc = null;
if (apps_host != null && Adempiere.isWebStartClient()) if (apps_host != null && Adempiere.isWebStartClient())
{ {
//default to vpn for webstart client
cc = new CConnection(apps_host); cc = new CConnection(apps_host);
cc.setConnectionProfile(CConnection.PROFILE_WAN); cc.setConnectionProfile(CConnection.PROFILE_VPN);
cc.setAppsPort(80); cc.setAppsPort(DEFAULT_APP_SERVER_PORT);
if (cc.testAppsServer() == null) if (cc.testAppsServer() == null)
{ {
s_cc = cc; s_cc = cc;
Ini.setProperty(Ini.P_CONNECTION, cc.toStringLong()); Ini.setProperty(Ini.P_CONNECTION, cc.toStringLong());
Ini.saveProperties(Ini.isClient()); Ini.saveProperties(Ini.isClient());
} }
else
{
//try wan
cc = new CConnection(apps_host);
cc.setConnectionProfile(CConnection.PROFILE_WAN);
cc.setAppsPort(80);
if (cc.testAppsServer() == null)
{
s_cc = cc;
Ini.setProperty(Ini.P_CONNECTION, cc.toStringLong());
Ini.saveProperties(Ini.isClient());
}
}
} }
if (s_cc == null) if (s_cc == null)
{ {