diff --git a/src/org/openbravo/dal/service/OBQuery.java b/src/org/openbravo/dal/service/OBQuery.java
--- a/src/org/openbravo/dal/service/OBQuery.java
+++ b/src/org/openbravo/dal/service/OBQuery.java
@@ -78,6 +78,8 @@
 
   private String poolName;
 
+  private int queryTimeout = -1;
+
   // package visible
   OBQuery() {
   }
@@ -250,14 +252,18 @@
       if (maxResult > -1) {
         qry.setMaxResults(maxResult);
       }
-      String queryProfile = null;
-      if (this.getQueryType() != null) {
-        queryProfile = this.getQueryType();
-      } else if (SessionInfo.getQueryProfile() != null) {
-        queryProfile = SessionInfo.getQueryProfile();
-      }
-      if (queryProfile != null) {
-        QueryTimeOutUtil.getInstance().setQueryTimeOut(qry, queryProfile);
+      if (queryTimeout != -1) {
+        QueryTimeOutUtil.getInstance().setQueryTimeOut(qry, queryTimeout);
+      } else {
+        String queryProfile = null;
+        if (this.getQueryType() != null) {
+          queryProfile = this.getQueryType();
+        } else if (SessionInfo.getQueryProfile() != null) {
+          queryProfile = SessionInfo.getQueryProfile();
+        }
+        if (queryProfile != null) {
+          QueryTimeOutUtil.getInstance().setQueryTimeOut(qry, queryProfile);
+        }
       }
       return qry;
     } catch (final Exception e) {
@@ -718,4 +724,8 @@
   void setPoolName(String poolName) {
     this.poolName = poolName;
   }
+
+  public void setQueryTimeout(int queryTimeout) {
+    this.queryTimeout = queryTimeout;
+  }
 }
diff --git a/src/org/openbravo/service/db/QueryTimeOutUtil.java b/src/org/openbravo/service/db/QueryTimeOutUtil.java
--- a/src/org/openbravo/service/db/QueryTimeOutUtil.java
+++ b/src/org/openbravo/service/db/QueryTimeOutUtil.java
@@ -140,6 +140,12 @@
     }
   }
 
+  public void setQueryTimeOut(Query query, int milliseconds) {
+    if (canApplyTimeOut) {
+      query.setTimeout(milliseconds);
+    }
+  }
+
   /**
    * Sets a timeout for a hibernate criteria (i.e. OBCriteria), if possible
    * 
