[ 
http://issues.apache.org/jira/browse/JUDDI-89?page=comments#action_12420832 ] 

Rémi Flament commented on JUDDI-89:
-----------------------------------

Here is a second patch that correct bugs added by the first one :

Index: BindingCategoryTable.java
===================================================================
RCS file: 
g:/local/cvs/cvs-uddi/juddi/src/java/org/apache/juddi/datastore/jdbc/BindingCategoryTable.java,v
retrieving revision 1.4
diff -u -r1.4 BindingCategoryTable.java
--- BindingCategoryTable.java   11 Jul 2006 09:13:02 -0000      1.4
+++ BindingCategoryTable.java   13 Jul 2006 08:13:34 -0000
@@ -153,6 +153,8 @@
         PreparedStatement statement = null;
         ResultSet resultSet = null;
 
+        if (bindingsKeys!=null && !bindingsKeys.isEmpty())
+        {
         try {
 
             DynamicQuery query = new DynamicQuery();
@@ -207,6 +209,8 @@
             } catch (Exception e) { /* ignored */
             }
         }
+        }
+        return results;
     }
 
     /**
Index: BindingDescTable.java
===================================================================
RCS file: 
g:/local/cvs/cvs-uddi/juddi/src/java/org/apache/juddi/datastore/jdbc/BindingDescTable.java,v
retrieving revision 1.4
diff -u -r1.4 BindingDescTable.java
--- BindingDescTable.java       11 Jul 2006 09:13:02 -0000      1.4
+++ BindingDescTable.java       13 Jul 2006 08:13:34 -0000
@@ -144,6 +144,8 @@
         PreparedStatement statement = null;
         ResultSet resultSet = null;
 
+        if (bindingsKeys!=null && !bindingsKeys.isEmpty())
+        {
         try {
 
             DynamicQuery query = new DynamicQuery();
@@ -197,6 +199,8 @@
             } catch (Exception e) { /* ignored */
             }
         }
+        }
+        return results;
     }
 
     /**
Index: BindingTemplateTable.java
===================================================================
RCS file: 
g:/local/cvs/cvs-uddi/juddi/src/java/org/apache/juddi/datastore/jdbc/BindingTemplateTable.java,v
retrieving revision 1.4
diff -u -r1.4 BindingTemplateTable.java
--- BindingTemplateTable.java   11 Jul 2006 09:13:02 -0000      1.4
+++ BindingTemplateTable.java   13 Jul 2006 08:13:34 -0000
@@ -239,6 +239,8 @@
         PreparedStatement statement = null;
         ResultSet resultSet = null;
 
+        if (bindingsKeys!=null && !bindingsKeys.isEmpty())
+        {
         try {
             DynamicQuery query = new DynamicQuery();
             query.append("(" + selectInSQL);
@@ -293,6 +295,8 @@
             } catch (Exception e) { /* ignored */
             }
         }
+        }
+        return results;
     }
 
     /**
@@ -358,6 +362,8 @@
         PreparedStatement statement = null;
         ResultSet resultSet = null;
 
+        if (servicesKeys!=null && !servicesKeys.isEmpty())
+        {
         try {
 
             DynamicQuery query = new DynamicQuery();
@@ -426,6 +432,8 @@
             } catch (Exception e) { /* ignored */
             }
         }
+        }
+        return results;
     }
 
     /**
Index: BusinessServiceTable.java
===================================================================
RCS file: 
g:/local/cvs/cvs-uddi/juddi/src/java/org/apache/juddi/datastore/jdbc/BusinessServiceTable.java,v
retrieving revision 1.3
diff -u -r1.3 BusinessServiceTable.java
--- BusinessServiceTable.java   11 Jul 2006 09:13:02 -0000      1.3
+++ BusinessServiceTable.java   13 Jul 2006 08:13:34 -0000
@@ -198,6 +198,9 @@
         ResultSet resultSet = null;
         ArrayList services = new ArrayList();
 
+        if (servicesKeys!=null && !servicesKeys.isEmpty())
+        {
+        
         try {
             DynamicQuery query = new DynamicQuery();
             query.append("(" + selectInSQL);
@@ -246,6 +249,8 @@
             } catch (Exception e) { /* ignored */
             }
         }
+        }
+        return services;
     }
 
     /**
Index: ServiceCategoryTable.java
===================================================================
RCS file: 
g:/local/cvs/cvs-uddi/juddi/src/java/org/apache/juddi/datastore/jdbc/ServiceCategoryTable.java,v
retrieving revision 1.4
diff -u -r1.4 ServiceCategoryTable.java
--- ServiceCategoryTable.java   11 Jul 2006 09:13:02 -0000      1.4
+++ ServiceCategoryTable.java   13 Jul 2006 08:13:34 -0000
@@ -152,6 +152,8 @@
         PreparedStatement statement = null;
         ResultSet resultSet = null;
 
+        if (servicesKeys!=null && !servicesKeys.isEmpty())
+        {
         try {
             DynamicQuery query = new DynamicQuery();
             query.append("(" + selectInSQL);
@@ -206,6 +208,8 @@
             } catch (Exception e) { /* ignored */
             }
         }
+        }
+        return results;
     }
 
     /**
Index: ServiceDescTable.java
===================================================================
RCS file: 
g:/local/cvs/cvs-uddi/juddi/src/java/org/apache/juddi/datastore/jdbc/ServiceDescTable.java,v
retrieving revision 1.3
diff -u -r1.3 ServiceDescTable.java
--- ServiceDescTable.java       11 Jul 2006 09:13:02 -0000      1.3
+++ ServiceDescTable.java       13 Jul 2006 08:13:34 -0000
@@ -143,7 +143,9 @@
         Map results = new HashMap();
         PreparedStatement statement = null;
         ResultSet resultSet = null;
-
+        
+        if (servicesKeys!=null && !servicesKeys.isEmpty())
+        {
         try {
             DynamicQuery query = new DynamicQuery();
             query.append("(" + selectInSQL);
@@ -196,6 +198,8 @@
             } catch (Exception e) { /* ignored */
             }
         }
+        }
+        return results;
     }
 
     /**
Index: ServiceNameTable.java
===================================================================
RCS file: 
g:/local/cvs/cvs-uddi/juddi/src/java/org/apache/juddi/datastore/jdbc/ServiceNameTable.java,v
retrieving revision 1.3
diff -u -r1.3 ServiceNameTable.java
--- ServiceNameTable.java       11 Jul 2006 09:13:02 -0000      1.3
+++ ServiceNameTable.java       13 Jul 2006 08:13:34 -0000
@@ -146,6 +146,8 @@
 
         Map results = new HashMap();
 
+        if (servicesKeys!=null && !servicesKeys.isEmpty())
+        {
         try {
             DynamicQuery query = new DynamicQuery();
             query.append("(");
@@ -200,6 +202,8 @@
             } catch (Exception e) { /* ignored */
             }
         }
+        }
+        return results;
     }
 
     /**
Index: TModelInstanceInfoDescTable.java
===================================================================
RCS file: 
g:/local/cvs/cvs-uddi/juddi/src/java/org/apache/juddi/datastore/jdbc/TModelInstanceInfoDescTable.java,v
retrieving revision 1.4
diff -u -r1.4 TModelInstanceInfoDescTable.java
--- TModelInstanceInfoDescTable.java    11 Jul 2006 09:13:02 -0000      1.4
+++ TModelInstanceInfoDescTable.java    13 Jul 2006 08:13:34 -0000
@@ -155,6 +155,9 @@
         ResultSet resultSet = null;
         Map results = new HashMap();
 
+        
+        if (bindingsKeys!=null && !bindingsKeys.isEmpty())
+        {
         try {
 
             DynamicQuery query = new DynamicQuery();
@@ -216,6 +219,8 @@
             } catch (Exception e) { /* ignored */
             }
         }
+        }
+        return results;
     }
 
     /**
Index: TModelInstanceInfoTable.java
===================================================================
RCS file: 
g:/local/cvs/cvs-uddi/juddi/src/java/org/apache/juddi/datastore/jdbc/TModelInstanceInfoTable.java,v
retrieving revision 1.4
diff -u -r1.4 TModelInstanceInfoTable.java
--- TModelInstanceInfoTable.java        11 Jul 2006 09:13:02 -0000      1.4
+++ TModelInstanceInfoTable.java        13 Jul 2006 08:13:34 -0000
@@ -169,6 +169,8 @@
         ResultSet resultSet = null;
         Map results = new HashMap();
 
+        if (bindingsKeys!=null && !bindingsKeys.isEmpty())
+        {
         try {
             DynamicQuery query = new DynamicQuery();
             query.append("(" + selectInSQL);
@@ -248,6 +250,8 @@
             } catch (Exception e) { /* ignored */
             }
         }
+        }
+        return results;
     }
 
     /**


> JDBC Datastore performance improvements
> ---------------------------------------
>
>          Key: JUDDI-89
>          URL: http://issues.apache.org/jira/browse/JUDDI-89
>      Project: jUDDI
>         Type: Improvement

>     Versions: 0.9rc4
>  Environment: Oracle
>     Reporter: Rémi Flament
>     Assignee: Steve Viens
>  Attachments: juddi.patch
>
> Hi,
> Please find a *huge* patch attached.
> We have used Juddi with more than an hundred business services and we had 
> some issues. This patch correct these issues :
> - Juddi was *very* slow with more than 1000 business services.
> - Oracle cannot handle more than 1000 elements in SQL "IN" request, so Juddi 
> crashed when a business entity contained more than 1000 services.
> For the "IN" problem we added a method in util/Config which gives the maximum 
> element the db can handle in IN requests.
> For the performance problem we had to rewrite a lot of the JDBC datastore. 
> Basically the thing is to avoid to do too much sql requests by grouping them. 
> As an example instead of the method fetchService() we use the method 
> fetchServices(), etc.
> Thanks to these corrections we had great performance improvement : the 
> getbusinessdetail used to take more than 40 seconds on big business entity, 
> now it takes about 6 seconds.
> This patch applies to v0.9rc4.
> Regards,
> Rémi Flament.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to