From 2b0729720eb26c2ebc9cb7fccf602b96ca84c9ea Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Sun, 11 Feb 2007 16:46:51 +0000 Subject: [PATCH] * [ 1656849 ] WAN: every time when a query fails is tried to run locally --- client/src/org/compiere/apps/ALogin.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/client/src/org/compiere/apps/ALogin.java b/client/src/org/compiere/apps/ALogin.java index ccefaa05b1..be29a8aaaa 100644 --- a/client/src/org/compiere/apps/ALogin.java +++ b/client/src/org/compiere/apps/ALogin.java @@ -348,7 +348,7 @@ public final class ALogin extends CDialog m_cc.testAppsServer(); if (m_cc.getAppsServerException() != null) { - if (m_cc.isServerObjects()) + if (m_cc.isRMIoverHTTP()) { m_cc.getAppsServerException().printStackTrace(); JOptionPane.showMessageDialog(null, @@ -361,7 +361,13 @@ public final class ALogin extends CDialog private void connectToDatabase() { //Check connection DB.setDBTarget(m_cc); - if (m_cc.isServerObjects() == false) + + //wan + if (m_cc.isRMIoverHTTP()) return; + + //vpn or direct + if (m_cc.isServerObjects() == false + || m_cc.isAppsServerOK(false) == false) DB.connect(); }