diff --git a/src/org/openbravo/mobile/core/servercontroller/MobileServerController.java b/src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
--- a/src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
+++ b/src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
@@ -84,43 +84,48 @@
       throw new OBException("Do not call this method as a central server");
     }
 
-    final MobileServerDefinition thisServerDef = MobileServerController.getInstance()
-        .getThisServerDefinition();
+    try {
+      OBContext.setAdminMode(false);
 
-    if (thisServerDef == null) {
-      return null;
+      final MobileServerDefinition thisServerDef = getThisServerDefinition();
+
+      if (thisServerDef == null) {
+        return null;
+      }
+
+      // Get the central server, don't find ourselves to prevent infinite loops
+      // note: filters for the client of the store
+      OBQuery<MobileServerDefinition> servers = OBDal.getInstance().createQuery(
+          MobileServerDefinition.class,
+          "client.id=:clientId and " + MobileServerDefinition.PROPERTY_ACTIVE + "=true and "
+              + MobileServerDefinition.PROPERTY_MOBILESERVERKEY + "!='"
+              + thisServerDef.getMobileServerKey() + "' and "
+              + MobileServerDefinition.PROPERTY_SERVERTYPE + "='" + MobileServerUtils.MAIN_SERVER
+              + "' order by " + MobileServerDefinition.PROPERTY_PRIORITY);
+
+      // disable the client and organization filters to allow reading this server definition
+      // with a client 0 (for instance from an ant task)
+      // it is safe to do it because there is a unique constraints on the mobile server key
+      servers.setFilterOnReadableClients(false);
+      servers.setFilterOnReadableOrganization(false);
+      servers.setNamedParameter("clientId", DalUtil.getId(thisServerDef.getClient()));
+
+      MobileServerDefinition result = null;
+      for (MobileServerDefinition srv : servers.list()) {
+        if (result == null) {
+          result = srv;
+        } else {
+          log.warn("Multiple central servers are reachable " + result + " other " + srv);
+        }
+      }
+
+      if (result == null) {
+        throw new OBException("No central server defined/reachable");
+      }
+      return result;
+    } finally {
+      OBContext.restorePreviousMode();
     }
-
-    // Get the central server, don't find ourselves to prevent infinite loops
-    // note: filters for the client of the store
-    OBQuery<MobileServerDefinition> servers = OBDal.getInstance().createQuery(
-        MobileServerDefinition.class,
-        "client.id=:clientId and " + MobileServerDefinition.PROPERTY_ACTIVE + "=true and "
-            + MobileServerDefinition.PROPERTY_MOBILESERVERKEY + "!='"
-            + thisServerDef.getMobileServerKey() + "' and "
-            + MobileServerDefinition.PROPERTY_SERVERTYPE + "='" + MobileServerUtils.MAIN_SERVER
-            + "' order by " + MobileServerDefinition.PROPERTY_PRIORITY);
-
-    // disable the client and organization filters to allow reading this server definition
-    // with a client 0 (for instance from an ant task)
-    // it is safe to do it because there is a unique constraints on the mobile server key
-    servers.setFilterOnReadableClients(false);
-    servers.setFilterOnReadableOrganization(false);
-    servers.setNamedParameter("clientId", DalUtil.getId(thisServerDef.getClient()));
-
-    MobileServerDefinition result = null;
-    for (MobileServerDefinition srv : servers.list()) {
-      if (result == null) {
-        result = srv;
-      } else {
-        log.warn("Multiple central servers are reachable " + result + " other " + srv);
-      }
-    }
-
-    if (result == null) {
-      throw new OBException("No central server defined/reachable");
-    }
-    return result;
   }
 
   public boolean isCentralServerOnline() {
@@ -140,30 +145,35 @@
       throw new OBException("Do not call this method as a central server");
     }
 
-    final MobileServerDefinition thisServerDef = MobileServerController.getInstance()
-        .getThisServerDefinition();
+    try {
+      OBContext.setAdminMode(false);
 
-    // Get the central server
-    // note: filters for the client of the store
-    OBQuery<MobileServerDefinition> servers = OBDal.getInstance().createQuery(
-        MobileServerDefinition.class,
-        "client.id=:clientId and " + MobileServerDefinition.PROPERTY_ACTIVE + "=true and "
-            + MobileServerDefinition.PROPERTY_MOBILESERVERKEY + "!='"
-            + thisServerDef.getMobileServerKey() + "' and "
-            + MobileServerDefinition.PROPERTY_SERVERTYPE + "='" + MobileServerUtils.MAIN_SERVER
-            + "' order by " + MobileServerDefinition.PROPERTY_PRIORITY);
+      final MobileServerDefinition thisServerDef = getThisServerDefinition();
 
-    servers.setNamedParameter("clientId", DalUtil.getId(thisServerDef.getClient()));
+      // Get the central server
+      // note: filters for the client of the store
+      OBQuery<MobileServerDefinition> servers = OBDal.getInstance().createQuery(
+          MobileServerDefinition.class,
+          "client.id=:clientId and " + MobileServerDefinition.PROPERTY_ACTIVE + "=true and "
+              + MobileServerDefinition.PROPERTY_MOBILESERVERKEY + "!='"
+              + thisServerDef.getMobileServerKey() + "' and "
+              + MobileServerDefinition.PROPERTY_SERVERTYPE + "='" + MobileServerUtils.MAIN_SERVER
+              + "' order by " + MobileServerDefinition.PROPERTY_PRIORITY);
 
-    MobileServerDefinition result = null;
-    for (MobileServerDefinition srv : servers.list()) {
-      if (result == null) {
-        result = srv;
-      } else {
-        log.warn("Multiple central servers are reachable " + result + " other " + srv);
+      servers.setNamedParameter("clientId", DalUtil.getId(thisServerDef.getClient()));
+
+      MobileServerDefinition result = null;
+      for (MobileServerDefinition srv : servers.list()) {
+        if (result == null) {
+          result = srv;
+        } else {
+          log.warn("Multiple central servers are reachable " + result + " other " + srv);
+        }
       }
+      return result != null;
+    } finally {
+      OBContext.restorePreviousMode();
     }
-    return result != null;
   }
 
   private void checkMultiServer() {
@@ -235,7 +245,12 @@
    * @return return the enum representing the state of the server
    */
   public MobileServerState getMobileServerState(MobileServerDefinition mobileServerDefinition) {
-    return MobileServerState.getMobileServerState(mobileServerDefinition.getStatus());
+    try {
+      OBContext.setAdminMode(false);
+      return MobileServerState.getMobileServerState(mobileServerDefinition.getStatus());
+    } finally {
+      OBContext.restorePreviousMode();
+    }
   }
 
   /**
