Avoid NPE when no application server client library is detected.

This commit is contained in:
Heng Sin Low 2008-12-03 09:03:38 +00:00
parent 5b8c826e5f
commit 6b33b0ab59
1 changed files with 19 additions and 1 deletions

View File

@ -12,6 +12,8 @@
*****************************************************************************/ *****************************************************************************/
package org.adempiere.as; package org.adempiere.as;
import java.util.Hashtable;
/** /**
* *
* @author Low Heng Sin * @author Low Heng Sin
@ -44,6 +46,22 @@ public class ASFactory {
} catch (Throwable t) { } catch (Throwable t) {
} }
} }
if (applicationServer == null) {
applicationServer = new IApplicationServer() {
@Override
public int getDefaultNamingServicePort() {
return 0;
}
@Override
public Hashtable<String, String> getInitialContextEnvironment(
String AppsHost, int AppsPort, String principal,
String credential) {
return new Hashtable<String, String>();
}
};
}
} }
/** /**