From 1fe9575e43a4493b60a9b3354fcb596d196d9f31 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 12 Dec 2006 03:30:52 +0000 Subject: [PATCH] Avoid deprecated methods --- base/src/org/compiere/process/ImportAccount.java | 6 +++--- .../org/compiere/process/M_Product_Category_Acct_Copy.java | 6 +++--- dbPort/src/org/compiere/db/DB_Fyracle.java | 2 +- dbPort/src/org/compiere/dbPort/PostgresConvertTest.java | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/base/src/org/compiere/process/ImportAccount.java b/base/src/org/compiere/process/ImportAccount.java index 2f5d4c021f..cda65d0630 100644 --- a/base/src/org/compiere/process/ImportAccount.java +++ b/base/src/org/compiere/process/ImportAccount.java @@ -351,10 +351,10 @@ public class ImportAccount extends SvrProcess // String updateSQL = "UPDATE AD_TreeNode SET Parent_ID=?, SeqNo=? " + "WHERE AD_Tree_ID=? AND Node_ID=?"; - //begin e-evolution vpj-cd 15 nov 2005 PostgreSQL + //begin e-evolution vpj-cd 15 nov 2005 PostgreSQL //PreparedStatement updateStmt = DB.prepareStatement(updateSQL, get_TrxName()); - PreparedStatement updateStmt = DB.prepareStatement(updateSQL, ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_UPDATABLE); - //end + PreparedStatement updateStmt = DB.prepareStatement(updateSQL, ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_UPDATABLE, get_TrxName()); + //end // while (rs.next()) { diff --git a/base/src/org/compiere/process/M_Product_Category_Acct_Copy.java b/base/src/org/compiere/process/M_Product_Category_Acct_Copy.java index 6d531050a3..3f1d4641e9 100644 --- a/base/src/org/compiere/process/M_Product_Category_Acct_Copy.java +++ b/base/src/org/compiere/process/M_Product_Category_Acct_Copy.java @@ -82,7 +82,7 @@ public class M_Product_Category_Acct_Copy extends SvrProcess PreparedStatement pstmt = null; try { - pstmt = DB.prepareStatement(sql); + pstmt = DB.prepareStatement(sql, get_TrxName()); ResultSet rs = pstmt.executeQuery(); while (rs.next()) { @@ -102,7 +102,7 @@ public class M_Product_Category_Acct_Copy extends SvrProcess + "AND EXISTS (SELECT * FROM M_Product p " + "WHERE p.M_Product_ID=M_Product_Acct.M_Product_ID " + "AND p.M_Product_Category_ID= " + rs.getInt("M_PRODUCT_CATEGORY_ID") + ")"; - cntu = DB.executeUpdate(sqlupd); + cntu = DB.executeUpdate(sqlupd, get_TrxName()); totu += cntu; // Insert new Products sqlins = "INSERT INTO M_Product_Acct " @@ -126,7 +126,7 @@ public class M_Product_Category_Acct_Copy extends SvrProcess + "AND NOT EXISTS (SELECT * FROM M_Product_Acct pa " + "WHERE pa.M_Product_ID=p.M_Product_ID " + "AND pa.C_AcctSchema_ID=" + rs.getInt("C_ACCTSCHEMA_ID") + ")"; - cnti = DB.executeUpdate(sqlins); + cnti = DB.executeUpdate(sqlins, get_TrxName()); toti += cnti; log.info("Product = " + cntu + " / " + cnti); } diff --git a/dbPort/src/org/compiere/db/DB_Fyracle.java b/dbPort/src/org/compiere/db/DB_Fyracle.java index d274553693..0ff1d9279c 100644 --- a/dbPort/src/org/compiere/db/DB_Fyracle.java +++ b/dbPort/src/org/compiere/db/DB_Fyracle.java @@ -597,7 +597,7 @@ class DataSourceImpl implements DataSource { } public void setMaxConnections(int arg0) { - impl.setMaxConnections(arg0); + impl.setMaxPoolSize(arg0); } public void setMaxIdleTime(int arg0) { diff --git a/dbPort/src/org/compiere/dbPort/PostgresConvertTest.java b/dbPort/src/org/compiere/dbPort/PostgresConvertTest.java index 1fecadc2fd..5924cb9b99 100755 --- a/dbPort/src/org/compiere/dbPort/PostgresConvertTest.java +++ b/dbPort/src/org/compiere/dbPort/PostgresConvertTest.java @@ -67,7 +67,7 @@ public class PostgresConvertTest " 'ropa de cache para damas' FROM DUAL"); try { - PreparedStatement pstmt = DB.prepareStatement(sql.toString()); + PreparedStatement pstmt = DB.prepareStatement(sql.toString(), null); ResultSet rs = pstmt.executeQuery(); } catch(SQLException e)