portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r946246 - in /portals/jetspeed-2/portal/trunk: components/jetspeed-capability/src/main/java/org/apache/jetspeed/tools/migration/ components/jetspeed-db-tools/src/main/java/org/apache/jetspeed/tools/migration/ components/jetspeed-page-manage...
Date Wed, 19 May 2010 15:59:24 GMT
Author: rwatler
Date: Wed May 19 15:59:24 2010
New Revision: 946246

URL: http://svn.apache.org/viewvc?rev=946246&view=rev
Log:
Migration tuning: use Statement.setFetchSize(10000) to force migration queries to stream rows using a cursor to bound memory consumption

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/tools/migration/JetspeedCapabilitiesMigration.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-db-tools/src/main/java/org/apache/jetspeed/tools/migration/JetspeedMigrationApplication.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/tools/migration/JetspeedDBPageManagerMigration.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/src/main/java/org/apache/jetspeed/tools/migration/JetspeedProfilerMigration.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/tools/migration/JetspeedRegistryMigration.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/tools/migration/JetspeedSecurityMigration.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-sso/src/main/java/org/apache/jetspeed/tools/migration/JetspeedSSOSecurityMigration.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/tools/migration/JetspeedStatisticsMigration.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/tools/migration/JetspeedMigration.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/tools/migration/JetspeedCapabilitiesMigration.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/tools/migration/JetspeedCapabilitiesMigration.java?rev=946246&r1=946245&r2=946246&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/tools/migration/JetspeedCapabilitiesMigration.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-capability/src/main/java/org/apache/jetspeed/tools/migration/JetspeedCapabilitiesMigration.java Wed May 19 15:59:24 2010
@@ -57,6 +57,7 @@ public class JetspeedCapabilitiesMigrati
         // MEDIA_TYPE
         PreparedStatement mediaTypeInsertStatement = targetConnection.prepareStatement("INSERT INTO MEDIA_TYPE (MEDIATYPE_ID, NAME, CHARACTER_SET, TITLE, DESCRIPTION) VALUES (?, ?, ?, ?, ?);");
         Statement mediaTypeQueryStatement = sourceConnection.createStatement();
+        mediaTypeQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet mediaTypeResultSet = mediaTypeQueryStatement.executeQuery("SELECT MEDIATYPE_ID, NAME, CHARACTER_SET, TITLE, DESCRIPTION FROM MEDIA_TYPE;");
         while (mediaTypeResultSet.next())
         {
@@ -75,6 +76,7 @@ public class JetspeedCapabilitiesMigrati
         // CLIENT
         PreparedStatement clientInsertStatement = targetConnection.prepareStatement("INSERT INTO CLIENT (CLIENT_ID, EVAL_ORDER, NAME, USER_AGENT_PATTERN, MANUFACTURER, MODEL, VERSION, PREFERRED_MIMETYPE_ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?);");
         Statement clientQueryStatement = sourceConnection.createStatement();
+        clientQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet clientResultSet = clientQueryStatement.executeQuery("SELECT CLIENT_ID, EVAL_ORDER, NAME, USER_AGENT_PATTERN, MANUFACTURER, MODEL, VERSION, PREFERRED_MIMETYPE_ID FROM CLIENT;");
         while (clientResultSet.next())
         {
@@ -96,6 +98,7 @@ public class JetspeedCapabilitiesMigrati
         // MIMETYPE
         PreparedStatement mimeTypeInsertStatement = targetConnection.prepareStatement("INSERT INTO MIMETYPE (MIMETYPE_ID, NAME) VALUES (?, ?);");
         Statement mimeTypeQueryStatement = sourceConnection.createStatement();
+        mimeTypeQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet mimeTypeResultSet = mimeTypeQueryStatement.executeQuery("SELECT MIMETYPE_ID, NAME FROM MIMETYPE;");
         while (mimeTypeResultSet.next())
         {
@@ -111,6 +114,7 @@ public class JetspeedCapabilitiesMigrati
         // CAPABILITY
         PreparedStatement capabilityInsertStatement = targetConnection.prepareStatement("INSERT INTO CAPABILITY (CAPABILITY_ID, CAPABILITY) VALUES (?, ?);");
         Statement capabilityQueryStatement = sourceConnection.createStatement();
+        capabilityQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet capabilityResultSet = capabilityQueryStatement.executeQuery("SELECT CAPABILITY_ID, CAPABILITY FROM CAPABILITY;");
         while (capabilityResultSet.next())
         {
@@ -126,6 +130,7 @@ public class JetspeedCapabilitiesMigrati
         // CLIENT_TO_CAPABILITY
         PreparedStatement clientToCapabilityInsertStatement = targetConnection.prepareStatement("INSERT INTO CLIENT_TO_CAPABILITY (CLIENT_ID, CAPABILITY_ID) VALUES (?, ?);");
         Statement clientToCapabilityQueryStatement = sourceConnection.createStatement();
+        clientToCapabilityQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet clientToCapabilityResultSet = clientToCapabilityQueryStatement.executeQuery("SELECT CLIENT_ID, CAPABILITY_ID FROM CLIENT_TO_CAPABILITY;");
         while (clientToCapabilityResultSet.next())
         {
@@ -141,6 +146,7 @@ public class JetspeedCapabilitiesMigrati
         // CLIENT_TO_MIMETYPE
         PreparedStatement clientToMimeTypeInsertStatement = targetConnection.prepareStatement("INSERT INTO CLIENT_TO_MIMETYPE (CLIENT_ID, MIMETYPE_ID) VALUES (?, ?);");
         Statement clientToMimeTypeQueryStatement = sourceConnection.createStatement();
+        clientToMimeTypeQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet clientToMimeTypeResultSet = clientToMimeTypeQueryStatement.executeQuery("SELECT CLIENT_ID, MIMETYPE_ID FROM CLIENT_TO_MIMETYPE;");
         while (clientToMimeTypeResultSet.next())
         {
@@ -156,6 +162,7 @@ public class JetspeedCapabilitiesMigrati
         // MEDIATYPE_TO_CAPABILITY
         PreparedStatement mediaTypeToCapabilityInsertStatement = targetConnection.prepareStatement("INSERT INTO MEDIATYPE_TO_CAPABILITY (MEDIATYPE_ID, CAPABILITY_ID) VALUES (?, ?);");
         Statement mediaTypeToCapabilityQueryStatement = sourceConnection.createStatement();
+        mediaTypeToCapabilityQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet mediaTypeToCapabilityResultSet = mediaTypeToCapabilityQueryStatement.executeQuery("SELECT MEDIATYPE_ID, CAPABILITY_ID FROM MEDIATYPE_TO_CAPABILITY;");
         while (mediaTypeToCapabilityResultSet.next())
         {
@@ -171,6 +178,7 @@ public class JetspeedCapabilitiesMigrati
         // MEDIATYPE_TO_MIMETYPE
         PreparedStatement mediaTypeToMimeTypeInsertStatement = targetConnection.prepareStatement("INSERT INTO MEDIATYPE_TO_MIMETYPE (MEDIATYPE_ID, MIMETYPE_ID) VALUES (?, ?);");
         Statement mediaTypeToMimeTypeQueryStatement = sourceConnection.createStatement();
+        mediaTypeToMimeTypeQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet mediaTypeToMimeTypeResultSet = mediaTypeToMimeTypeQueryStatement.executeQuery("SELECT MEDIATYPE_ID, MIMETYPE_ID FROM MEDIATYPE_TO_MIMETYPE;");
         while (mediaTypeToMimeTypeResultSet.next())
         {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-db-tools/src/main/java/org/apache/jetspeed/tools/migration/JetspeedMigrationApplication.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-db-tools/src/main/java/org/apache/jetspeed/tools/migration/JetspeedMigrationApplication.java?rev=946246&r1=946245&r2=946246&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-db-tools/src/main/java/org/apache/jetspeed/tools/migration/JetspeedMigrationApplication.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-db-tools/src/main/java/org/apache/jetspeed/tools/migration/JetspeedMigrationApplication.java Wed May 19 15:59:24 2010
@@ -159,8 +159,10 @@ public class JetspeedMigrationApplicatio
         {
             throw new RuntimeException("Source and target JDBC databases must be different: "+this.jdbcUrl);
         }
-
+        
+        this.sourceJDBCUrl = validateJDBCUrlOptions(this.sourceJDBCUrl, this.sourceJDBCDriverClass);
         sourceDataSourceFactory = new DBCPDatasourceComponent(this.sourceDBUsername, this.sourceDBPassword, this.sourceJDBCDriverClass, this.sourceJDBCUrl, 2, 0, GenericObjectPool.WHEN_EXHAUSTED_GROW, true);
+        this.jdbcUrl = validateJDBCUrlOptions(this.jdbcUrl, this.jdbcDriverClass);
         targetDataSourceFactory = new DBCPDatasourceComponent(this.dbUsername, this.dbPassword, this.jdbcDriverClass, this.jdbcUrl, 2, 0, GenericObjectPool.WHEN_EXHAUSTED_GROW, true);
         
         migrations = new JetspeedMigration[]{new JetspeedCapabilitiesMigration(),
@@ -173,6 +175,28 @@ public class JetspeedMigrationApplicatio
     }
     
     /**
+     * Validate required JDBC URL options.
+     * 
+     * @param jdbcUrl JDBC URL
+     * @param jdbcDriverClass JDBC driver class name
+     * @return validated JDBC URL
+     */
+    private String validateJDBCUrlOptions(String jdbcUrl, String jdbcDriverClass)
+    {
+        // add cursor fetch option for mysql, (assumes server and connector 5.0.3+)
+        if (jdbcUrl.startsWith("jdbc:mysql://") && jdbcDriverClass.startsWith("com.mysql.jdbc."))
+        {
+            if (!jdbcUrl.contains("useCursorFetch="))
+            {
+                jdbcUrl += (jdbcUrl.contains("?") ? "&" : "?")+"useCursorFetch=true";
+            }
+        }
+        
+        // return validated URL
+        return jdbcUrl;
+    }
+    
+    /**
      * Perform application migration operation.
      * 
      * @throws IOException when migration error is encountered

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/tools/migration/JetspeedDBPageManagerMigration.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/tools/migration/JetspeedDBPageManagerMigration.java?rev=946246&r1=946245&r2=946246&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/tools/migration/JetspeedDBPageManagerMigration.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/tools/migration/JetspeedDBPageManagerMigration.java Wed May 19 15:59:24 2010
@@ -84,6 +84,7 @@ public class JetspeedDBPageManagerMigrat
         // FOLDER
         PreparedStatement folderInsertStatement = targetConnection.prepareStatement("INSERT INTO FOLDER (FOLDER_ID, PARENT_ID, PATH, NAME, TITLE, SHORT_TITLE, IS_HIDDEN, SKIN, DEFAULT_LAYOUT_DECORATOR, DEFAULT_PORTLET_DECORATOR, DEFAULT_PAGE_NAME, SUBSITE, USER_PRINCIPAL, ROLE_PRINCIPAL, GROUP_PRINCIPAL, MEDIATYPE, LOCALE, EXT_ATTR_NAME, EXT_ATTR_VALUE, OWNER_PRINCIPAL) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);");
         Statement folderQueryStatement = sourceConnection.createStatement();
+        folderQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet folderResultSet = folderQueryStatement.executeQuery("SELECT FOLDER_ID, PARENT_ID, PATH, NAME, TITLE, SHORT_TITLE, IS_HIDDEN, SKIN, DEFAULT_LAYOUT_DECORATOR, DEFAULT_PORTLET_DECORATOR, DEFAULT_PAGE_NAME, SUBSITE, USER_PRINCIPAL, ROLE_PRINCIPAL, GROUP_PRINCIPAL, MEDIATYPE, LOCALE, EXT_ATTR_NAME, EXT_ATTR_VALUE, OWNER_PRINCIPAL FROM FOLDER;");
         while (folderResultSet.next())
         {
@@ -139,6 +140,7 @@ public class JetspeedDBPageManagerMigrat
         // FOLDER_METADATA
         PreparedStatement folderMetadataInsertStatement = targetConnection.prepareStatement("INSERT INTO FOLDER_METADATA (METADATA_ID, FOLDER_ID, NAME, LOCALE, VALUE) VALUES (?, ?, ?, ?, ?);");
         Statement folderMetadataQueryStatement = sourceConnection.createStatement();
+        folderMetadataQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet folderMetadataResultSet = folderMetadataQueryStatement.executeQuery("SELECT METADATA_ID, FOLDER_ID, NAME, LOCALE, VALUE FROM FOLDER_METADATA;");
         while (folderMetadataResultSet.next())
         {
@@ -157,6 +159,7 @@ public class JetspeedDBPageManagerMigrat
         // FOLDER_CONSTRAINT
         PreparedStatement folderConstraintInsertStatement = targetConnection.prepareStatement("INSERT INTO FOLDER_CONSTRAINT (CONSTRAINT_ID, FOLDER_ID, APPLY_ORDER, USER_PRINCIPALS_ACL, ROLE_PRINCIPALS_ACL, GROUP_PRINCIPALS_ACL, PERMISSIONS_ACL) VALUES (?, ?, ?, ?, ?, ?, ?);");
         Statement folderConstraintQueryStatement = sourceConnection.createStatement();
+        folderConstraintQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet folderConstraintResultSet = folderConstraintQueryStatement.executeQuery("SELECT CONSTRAINT_ID, FOLDER_ID, APPLY_ORDER, USER_PRINCIPALS_ACL, ROLE_PRINCIPALS_ACL, GROUP_PRINCIPALS_ACL, PERMISSIONS_ACL FROM FOLDER_CONSTRAINT;");
         while (folderConstraintResultSet.next())
         {
@@ -177,6 +180,7 @@ public class JetspeedDBPageManagerMigrat
         // FOLDER_CONSTRAINTS_REF
         PreparedStatement folderConstraintsRefInsertStatement = targetConnection.prepareStatement("INSERT INTO FOLDER_CONSTRAINTS_REF (CONSTRAINTS_REF_ID, FOLDER_ID, APPLY_ORDER, NAME) VALUES (?, ?, ?, ?);");
         Statement folderConstraintsRefQueryStatement = sourceConnection.createStatement();
+        folderConstraintsRefQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet folderConstraintsRefResultSet = folderConstraintsRefQueryStatement.executeQuery("SELECT CONSTRAINTS_REF_ID, FOLDER_ID, APPLY_ORDER, NAME FROM FOLDER_CONSTRAINTS_REF;");
         while (folderConstraintsRefResultSet.next())
         {
@@ -194,6 +198,7 @@ public class JetspeedDBPageManagerMigrat
         // FOLDER_ORDER
         PreparedStatement folderOrderInsertStatement = targetConnection.prepareStatement("INSERT INTO FOLDER_ORDER (ORDER_ID, FOLDER_ID, SORT_ORDER, NAME) VALUES (?, ?, ?, ?);");
         Statement folderOrderQueryStatement = sourceConnection.createStatement();
+        folderOrderQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet folderOrderResultSet = folderOrderQueryStatement.executeQuery("SELECT ORDER_ID, FOLDER_ID, SORT_ORDER, NAME FROM FOLDER_ORDER;");
         while (folderOrderResultSet.next())
         {
@@ -211,6 +216,7 @@ public class JetspeedDBPageManagerMigrat
         // FOLDER_MENU
         PreparedStatement folderMenuInsertStatement = targetConnection.prepareStatement("INSERT INTO FOLDER_MENU (MENU_ID, CLASS_NAME, PARENT_ID, FOLDER_ID, ELEMENT_ORDER, NAME, TITLE, SHORT_TITLE, TEXT, OPTIONS, DEPTH, IS_PATHS, IS_REGEXP, PROFILE, OPTIONS_ORDER, SKIN, IS_NEST) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);");
         Statement folderMenuQueryStatement = sourceConnection.createStatement();
+        folderMenuQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet folderMenuResultSet = folderMenuQueryStatement.executeQuery("SELECT MENU_ID, CLASS_NAME, PARENT_ID, FOLDER_ID, ELEMENT_ORDER, NAME, TITLE, SHORT_TITLE, TEXT, OPTIONS, DEPTH, IS_PATHS, IS_REGEXP, PROFILE, OPTIONS_ORDER, SKIN, IS_NEST FROM FOLDER_MENU;");
         while (folderMenuResultSet.next())
         {
@@ -241,6 +247,7 @@ public class JetspeedDBPageManagerMigrat
         // FOLDER_MENU_METADATA
         PreparedStatement folderMenuMetadataInsertStatement = targetConnection.prepareStatement("INSERT INTO FOLDER_MENU_METADATA (METADATA_ID, MENU_ID, NAME, LOCALE, VALUE) VALUES (?, ?, ?, ?, ?);");
         Statement folderMenuMetadataQueryStatement = sourceConnection.createStatement();
+        folderMenuMetadataQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet folderMenuMetadataResultSet = folderMenuMetadataQueryStatement.executeQuery("SELECT METADATA_ID, MENU_ID, NAME, LOCALE, VALUE FROM FOLDER_MENU_METADATA;");
         while (folderMenuMetadataResultSet.next())
         {
@@ -259,6 +266,7 @@ public class JetspeedDBPageManagerMigrat
         // PAGE
         PreparedStatement pageInsertStatement = targetConnection.prepareStatement("INSERT INTO PAGE (PAGE_ID, CLASS_NAME, PARENT_ID, PATH, CONTENT_TYPE, IS_INHERITABLE, NAME, VERSION, TITLE, SHORT_TITLE, IS_HIDDEN, SKIN, DEFAULT_LAYOUT_DECORATOR, DEFAULT_PORTLET_DECORATOR, SUBSITE, USER_PRINCIPAL, ROLE_PRINCIPAL, GROUP_PRINCIPAL, MEDIATYPE, LOCALE, EXT_ATTR_NAME, EXT_ATTR_VALUE, OWNER_PRINCIPAL) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);");
         Statement pageQueryStatement = sourceConnection.createStatement();
+        pageQueryStatement.setFetchSize(FETCH_SIZE);
         switch (sourceVersion)
         {
             case JETSPEED_SCHEMA_VERSION_2_1_3:
@@ -360,6 +368,7 @@ public class JetspeedDBPageManagerMigrat
         // PAGE_METADATA
         PreparedStatement pageMetadataInsertStatement = targetConnection.prepareStatement("INSERT INTO PAGE_METADATA (METADATA_ID, PAGE_ID, NAME, LOCALE, VALUE) VALUES (?, ?, ?, ?, ?);");
         Statement pageMetadataQueryStatement = sourceConnection.createStatement();
+        pageMetadataQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet pageMetadataResultSet = pageMetadataQueryStatement.executeQuery("SELECT METADATA_ID, PAGE_ID, NAME, LOCALE, VALUE FROM PAGE_METADATA;");
         while (pageMetadataResultSet.next())
         {
@@ -378,6 +387,7 @@ public class JetspeedDBPageManagerMigrat
         // PAGE_CONSTRAINT
         PreparedStatement pageConstraintInsertStatement = targetConnection.prepareStatement("INSERT INTO PAGE_CONSTRAINT (CONSTRAINT_ID, PAGE_ID, APPLY_ORDER, USER_PRINCIPALS_ACL, ROLE_PRINCIPALS_ACL, GROUP_PRINCIPALS_ACL, PERMISSIONS_ACL) VALUES (?, ?, ?, ?, ?, ?, ?);");
         Statement pageConstraintQueryStatement = sourceConnection.createStatement();
+        pageConstraintQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet pageConstraintResultSet = pageConstraintQueryStatement.executeQuery("SELECT CONSTRAINT_ID, PAGE_ID, APPLY_ORDER, USER_PRINCIPALS_ACL, ROLE_PRINCIPALS_ACL, GROUP_PRINCIPALS_ACL, PERMISSIONS_ACL FROM PAGE_CONSTRAINT;");
         while (pageConstraintResultSet.next())
         {
@@ -398,6 +408,7 @@ public class JetspeedDBPageManagerMigrat
         // PAGE_CONSTRAINTS_REF
         PreparedStatement pageConstraintsRefInsertStatement = targetConnection.prepareStatement("INSERT INTO PAGE_CONSTRAINTS_REF (CONSTRAINTS_REF_ID, PAGE_ID, APPLY_ORDER, NAME) VALUES (?, ?, ?, ?);");
         Statement pageConstraintsRefQueryStatement = sourceConnection.createStatement();
+        pageConstraintsRefQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet pageConstraintsRefResultSet = pageConstraintsRefQueryStatement.executeQuery("SELECT CONSTRAINTS_REF_ID, PAGE_ID, APPLY_ORDER, NAME FROM PAGE_CONSTRAINTS_REF;");
         while (pageConstraintsRefResultSet.next())
         {
@@ -415,6 +426,7 @@ public class JetspeedDBPageManagerMigrat
         // PAGE_MENU
         PreparedStatement pageMenuInsertStatement = targetConnection.prepareStatement("INSERT INTO PAGE_MENU (MENU_ID, CLASS_NAME, PARENT_ID, PAGE_ID, ELEMENT_ORDER, NAME, TITLE, SHORT_TITLE, TEXT, OPTIONS, DEPTH, IS_PATHS, IS_REGEXP, PROFILE, OPTIONS_ORDER, SKIN, IS_NEST) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);");
         Statement pageMenuQueryStatement = sourceConnection.createStatement();
+        pageMenuQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet pageMenuResultSet = pageMenuQueryStatement.executeQuery("SELECT MENU_ID, CLASS_NAME, PARENT_ID, PAGE_ID, ELEMENT_ORDER, NAME, TITLE, SHORT_TITLE, TEXT, OPTIONS, DEPTH, IS_PATHS, IS_REGEXP, PROFILE, OPTIONS_ORDER, SKIN, IS_NEST FROM PAGE_MENU;");
         while (pageMenuResultSet.next())
         {
@@ -445,6 +457,7 @@ public class JetspeedDBPageManagerMigrat
         // PAGE_MENU_METADATA
         PreparedStatement pageMenuMetadataInsertStatement = targetConnection.prepareStatement("INSERT INTO PAGE_MENU_METADATA (METADATA_ID, MENU_ID, NAME, LOCALE, VALUE) VALUES (?, ?, ?, ?, ?);");
         Statement pageMenuMetadataQueryStatement = sourceConnection.createStatement();
+        pageMenuMetadataQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet pageMenuMetadataResultSet = pageMenuMetadataQueryStatement.executeQuery("SELECT METADATA_ID, MENU_ID, NAME, LOCALE, VALUE FROM PAGE_MENU_METADATA;");
         while (pageMenuMetadataResultSet.next())
         {
@@ -463,6 +476,7 @@ public class JetspeedDBPageManagerMigrat
         // FRAGMENT
         PreparedStatement fragmentInsertStatement = targetConnection.prepareStatement("INSERT INTO FRAGMENT (FRAGMENT_ID, CLASS_NAME, PARENT_ID, PAGE_ID, FRAGMENT_STRING_ID, FRAGMENT_STRING_REFID, NAME, TITLE, SHORT_TITLE, TYPE, SKIN, DECORATOR, STATE, PMODE, LAYOUT_ROW, LAYOUT_COLUMN, LAYOUT_SIZES, LAYOUT_X, LAYOUT_Y, LAYOUT_Z, LAYOUT_WIDTH, LAYOUT_HEIGHT, OWNER_PRINCIPAL) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);");
         Statement fragmentQueryStatement = sourceConnection.createStatement();
+        fragmentQueryStatement.setFetchSize(FETCH_SIZE);
         switch (sourceVersion)
         {
             case JETSPEED_SCHEMA_VERSION_2_1_3:
@@ -601,6 +615,7 @@ public class JetspeedDBPageManagerMigrat
         // FRAGMENT_CONSTRAINT
         PreparedStatement fragmentConstraintInsertStatement = targetConnection.prepareStatement("INSERT INTO FRAGMENT_CONSTRAINT (CONSTRAINT_ID, FRAGMENT_ID, APPLY_ORDER, USER_PRINCIPALS_ACL, ROLE_PRINCIPALS_ACL, GROUP_PRINCIPALS_ACL, PERMISSIONS_ACL) VALUES (?, ?, ?, ?, ?, ?, ?);");
         Statement fragmentConstraintQueryStatement = sourceConnection.createStatement();
+        fragmentConstraintQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet fragmentConstraintResultSet = fragmentConstraintQueryStatement.executeQuery("SELECT CONSTRAINT_ID, FRAGMENT_ID, APPLY_ORDER, USER_PRINCIPALS_ACL, ROLE_PRINCIPALS_ACL, GROUP_PRINCIPALS_ACL, PERMISSIONS_ACL FROM FRAGMENT_CONSTRAINT;");
         while (fragmentConstraintResultSet.next())
         {
@@ -621,6 +636,7 @@ public class JetspeedDBPageManagerMigrat
         // FRAGMENT_CONSTRAINTS_REF
         PreparedStatement fragmentConstraintsRefInsertStatement = targetConnection.prepareStatement("INSERT INTO FRAGMENT_CONSTRAINTS_REF (CONSTRAINTS_REF_ID, FRAGMENT_ID, APPLY_ORDER, NAME) VALUES (?, ?, ?, ?);");
         Statement fragmentConstraintsRefQueryStatement = sourceConnection.createStatement();
+        fragmentConstraintsRefQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet fragmentConstraintsRefResultSet = fragmentConstraintsRefQueryStatement.executeQuery("SELECT CONSTRAINTS_REF_ID, FRAGMENT_ID, APPLY_ORDER, NAME FROM FRAGMENT_CONSTRAINTS_REF;");
         while (fragmentConstraintsRefResultSet.next())
         {
@@ -638,6 +654,7 @@ public class JetspeedDBPageManagerMigrat
         // FRAGMENT_PREF
         PreparedStatement fragmentPrefInsertStatement = targetConnection.prepareStatement("INSERT INTO FRAGMENT_PREF (PREF_ID, FRAGMENT_ID, NAME, IS_READ_ONLY) VALUES (?, ?, ?, ?);");
         Statement fragmentPrefQueryStatement = sourceConnection.createStatement();
+        fragmentPrefQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet fragmentPrefResultSet = fragmentPrefQueryStatement.executeQuery("SELECT PREF_ID, FRAGMENT_ID, NAME, IS_READ_ONLY FROM FRAGMENT_PREF;");
         while (fragmentPrefResultSet.next())
         {
@@ -655,6 +672,7 @@ public class JetspeedDBPageManagerMigrat
         // FRAGMENT_PREF_VALUE
         PreparedStatement fragmentPrefValueInsertStatement = targetConnection.prepareStatement("INSERT INTO FRAGMENT_PREF_VALUE (PREF_VALUE_ID, PREF_ID, VALUE_ORDER, VALUE) VALUES (?, ?, ?, ?);");
         Statement fragmentPrefValueQueryStatement = sourceConnection.createStatement();
+        fragmentPrefValueQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet fragmentPrefValueResultSet = fragmentPrefValueQueryStatement.executeQuery("SELECT PREF_VALUE_ID, PREF_ID, VALUE_ORDER, VALUE FROM FRAGMENT_PREF_VALUE;");
         while (fragmentPrefValueResultSet.next())
         {
@@ -673,6 +691,7 @@ public class JetspeedDBPageManagerMigrat
         int fragmentPropRowsMigrated = 0;
         PreparedStatement fragmentPropInsertStatement = targetConnection.prepareStatement("INSERT INTO FRAGMENT_PROP (PROP_ID, FRAGMENT_ID, NAME, SCOPE, SCOPE_VALUE, VALUE) VALUES (?, ?, ?, ?, ?, ?);");
         Statement fragmentPropQueryStatement = sourceConnection.createStatement();
+        fragmentPropQueryStatement.setFetchSize(FETCH_SIZE);
         switch (sourceVersion)
         {
             case JETSPEED_SCHEMA_VERSION_2_1_3:
@@ -731,6 +750,7 @@ public class JetspeedDBPageManagerMigrat
         // LINK
         PreparedStatement linkInsertStatement = targetConnection.prepareStatement("INSERT INTO LINK (LINK_ID, PARENT_ID, PATH, NAME, VERSION, TITLE, SHORT_TITLE, IS_HIDDEN, SKIN, TARGET, URL, SUBSITE, USER_PRINCIPAL, ROLE_PRINCIPAL, GROUP_PRINCIPAL, MEDIATYPE, LOCALE, EXT_ATTR_NAME, EXT_ATTR_VALUE, OWNER_PRINCIPAL) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);");
         Statement linkQueryStatement = sourceConnection.createStatement();
+        linkQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet linkResultSet = linkQueryStatement.executeQuery("SELECT LINK_ID, PARENT_ID, PATH, NAME, VERSION, TITLE, SHORT_TITLE, IS_HIDDEN, SKIN, TARGET, URL, SUBSITE, USER_PRINCIPAL, ROLE_PRINCIPAL, GROUP_PRINCIPAL, MEDIATYPE, LOCALE, EXT_ATTR_NAME, EXT_ATTR_VALUE, OWNER_PRINCIPAL FROM LINK;");
         while (linkResultSet.next())
         {
@@ -764,6 +784,7 @@ public class JetspeedDBPageManagerMigrat
         // LINK_METADATA
         PreparedStatement linkMetadataInsertStatement = targetConnection.prepareStatement("INSERT INTO LINK_METADATA (METADATA_ID, LINK_ID, NAME, LOCALE, VALUE) VALUES (?, ?, ?, ?, ?);");
         Statement linkMetadataQueryStatement = sourceConnection.createStatement();
+        linkMetadataQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet linkMetadataResultSet = linkMetadataQueryStatement.executeQuery("SELECT METADATA_ID, LINK_ID, NAME, LOCALE, VALUE FROM LINK_METADATA;");
         while (linkMetadataResultSet.next())
         {
@@ -782,6 +803,7 @@ public class JetspeedDBPageManagerMigrat
         // LINK_CONSTRAINT
         PreparedStatement linkConstraintInsertStatement = targetConnection.prepareStatement("INSERT INTO LINK_CONSTRAINT (CONSTRAINT_ID, LINK_ID, APPLY_ORDER, USER_PRINCIPALS_ACL, ROLE_PRINCIPALS_ACL, GROUP_PRINCIPALS_ACL, PERMISSIONS_ACL) VALUES (?, ?, ?, ?, ?, ?, ?);");
         Statement linkConstraintQueryStatement = sourceConnection.createStatement();
+        linkConstraintQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet linkConstraintResultSet = linkConstraintQueryStatement.executeQuery("SELECT CONSTRAINT_ID, LINK_ID, APPLY_ORDER, USER_PRINCIPALS_ACL, ROLE_PRINCIPALS_ACL, GROUP_PRINCIPALS_ACL, PERMISSIONS_ACL FROM LINK_CONSTRAINT;");
         while (linkConstraintResultSet.next())
         {
@@ -802,6 +824,7 @@ public class JetspeedDBPageManagerMigrat
         // LINK_CONSTRAINTS_REF
         PreparedStatement linkConstraintsRefInsertStatement = targetConnection.prepareStatement("INSERT INTO LINK_CONSTRAINTS_REF (CONSTRAINTS_REF_ID, LINK_ID, APPLY_ORDER, NAME) VALUES (?, ?, ?, ?);");
         Statement linkConstraintsRefQueryStatement = sourceConnection.createStatement();
+        linkConstraintsRefQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet linkConstraintsRefResultSet = linkConstraintsRefQueryStatement.executeQuery("SELECT CONSTRAINTS_REF_ID, LINK_ID, APPLY_ORDER, NAME FROM LINK_CONSTRAINTS_REF;");
         while (linkConstraintsRefResultSet.next())
         {
@@ -819,6 +842,7 @@ public class JetspeedDBPageManagerMigrat
         // PAGE_SECURITY
         PreparedStatement pageSecurityInsertStatement = targetConnection.prepareStatement("INSERT INTO PAGE_SECURITY (PAGE_SECURITY_ID, PARENT_ID, PATH, NAME, VERSION, SUBSITE, USER_PRINCIPAL, ROLE_PRINCIPAL, GROUP_PRINCIPAL, MEDIATYPE, LOCALE, EXT_ATTR_NAME, EXT_ATTR_VALUE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);");
         Statement pageSecurityQueryStatement = sourceConnection.createStatement();
+        pageSecurityQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet pageSecurityResultSet = pageSecurityQueryStatement.executeQuery("SELECT PAGE_SECURITY_ID, PARENT_ID, PATH, NAME, VERSION, SUBSITE, USER_PRINCIPAL, ROLE_PRINCIPAL, GROUP_PRINCIPAL, MEDIATYPE, LOCALE, EXT_ATTR_NAME, EXT_ATTR_VALUE FROM PAGE_SECURITY;");
         while (pageSecurityResultSet.next())
         {
@@ -845,6 +869,7 @@ public class JetspeedDBPageManagerMigrat
         // PAGE_SEC_CONSTRAINTS_DEF
         PreparedStatement pageSecurityConstraintsDefInsertStatement = targetConnection.prepareStatement("INSERT INTO PAGE_SEC_CONSTRAINTS_DEF (CONSTRAINTS_DEF_ID, PAGE_SECURITY_ID, NAME) VALUES (?, ?, ?);");
         Statement pageSecurityConstraintsDefQueryStatement = sourceConnection.createStatement();
+        pageSecurityConstraintsDefQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet pageSecurityConstraintsDefResultSet = pageSecurityConstraintsDefQueryStatement.executeQuery("SELECT CONSTRAINTS_DEF_ID, PAGE_SECURITY_ID, NAME FROM PAGE_SEC_CONSTRAINTS_DEF;");
         while (pageSecurityConstraintsDefResultSet.next())
         {
@@ -861,6 +886,7 @@ public class JetspeedDBPageManagerMigrat
         // PAGE_SEC_CONSTRAINT_DEF
         PreparedStatement pageSecurityConstraintDefInsertStatement = targetConnection.prepareStatement("INSERT INTO PAGE_SEC_CONSTRAINT_DEF (CONSTRAINT_DEF_ID, CONSTRAINTS_DEF_ID, APPLY_ORDER, USER_PRINCIPALS_ACL, ROLE_PRINCIPALS_ACL, GROUP_PRINCIPALS_ACL, PERMISSIONS_ACL) VALUES (?, ?, ?, ?, ?, ?, ?);");
         Statement pageSecurityConstraintDefQueryStatement = sourceConnection.createStatement();
+        pageSecurityConstraintDefQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet pageSecurityConstraintDefResultSet = pageSecurityConstraintDefQueryStatement.executeQuery("SELECT CONSTRAINT_DEF_ID, CONSTRAINTS_DEF_ID, APPLY_ORDER, USER_PRINCIPALS_ACL, ROLE_PRINCIPALS_ACL, GROUP_PRINCIPALS_ACL, PERMISSIONS_ACL FROM PAGE_SEC_CONSTRAINT_DEF;");
         while (pageSecurityConstraintDefResultSet.next())
         {
@@ -881,6 +907,7 @@ public class JetspeedDBPageManagerMigrat
         // PAGE_SEC_CONSTRAINTS_REF
         PreparedStatement pageSecurityConstraintsRefInsertStatement = targetConnection.prepareStatement("INSERT INTO PAGE_SEC_CONSTRAINTS_REF (CONSTRAINTS_REF_ID, PAGE_SECURITY_ID, APPLY_ORDER, NAME) VALUES (?, ?, ?, ?);");
         Statement pageSecurityConstraintsRefQueryStatement = sourceConnection.createStatement();
+        pageSecurityConstraintsRefQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet pageSecurityConstraintsRefResultSet = pageSecurityConstraintsRefQueryStatement.executeQuery("SELECT CONSTRAINTS_REF_ID, PAGE_SECURITY_ID, APPLY_ORDER, NAME FROM PAGE_SEC_CONSTRAINTS_REF;");
         while (pageSecurityConstraintsRefResultSet.next())
         {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/src/main/java/org/apache/jetspeed/tools/migration/JetspeedProfilerMigration.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/src/main/java/org/apache/jetspeed/tools/migration/JetspeedProfilerMigration.java?rev=946246&r1=946245&r2=946246&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/src/main/java/org/apache/jetspeed/tools/migration/JetspeedProfilerMigration.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/src/main/java/org/apache/jetspeed/tools/migration/JetspeedProfilerMigration.java Wed May 19 15:59:24 2010
@@ -57,6 +57,7 @@ public class JetspeedProfilerMigration i
         // PROFILING_RULE
         PreparedStatement profilingRuleInsertStatement = targetConnection.prepareStatement("INSERT INTO PROFILING_RULE (RULE_ID, CLASS_NAME, TITLE) VALUES (?, ?, ?);");
         Statement profilingRuleQueryStatement = sourceConnection.createStatement();
+        profilingRuleQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet profilingRuleResultSet = profilingRuleQueryStatement.executeQuery("SELECT RULE_ID, CLASS_NAME, TITLE FROM PROFILING_RULE;");
         while (profilingRuleResultSet.next())
         {
@@ -73,6 +74,7 @@ public class JetspeedProfilerMigration i
         // RULE_CRITERION
         PreparedStatement ruleCriterionInsertStatement = targetConnection.prepareStatement("INSERT INTO RULE_CRITERION (CRITERION_ID, RULE_ID, FALLBACK_ORDER, REQUEST_TYPE, NAME, COLUMN_VALUE, FALLBACK_TYPE) VALUES (?, ?, ?, ?, ?, ?, ?);");
         Statement ruleCriterionQueryStatement = sourceConnection.createStatement();
+        ruleCriterionQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet ruleCriterionResultSet = ruleCriterionQueryStatement.executeQuery("SELECT CRITERION_ID, RULE_ID, FALLBACK_ORDER, REQUEST_TYPE, NAME, COLUMN_VALUE, FALLBACK_TYPE FROM RULE_CRITERION;");
         while (ruleCriterionResultSet.next())
         {
@@ -93,6 +95,7 @@ public class JetspeedProfilerMigration i
         // PRINCIPAL_RULE_ASSOC
         PreparedStatement principalRuleAssocInsertStatement = targetConnection.prepareStatement("INSERT INTO PRINCIPAL_RULE_ASSOC (PRINCIPAL_NAME, LOCATOR_NAME, RULE_ID) VALUES (?, ?, ?);");
         Statement principalRuleAssocQueryStatement = sourceConnection.createStatement();
+        principalRuleAssocQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet principalRuleAssocResultSet = principalRuleAssocQueryStatement.executeQuery("SELECT PRINCIPAL_NAME, LOCATOR_NAME, RULE_ID FROM PRINCIPAL_RULE_ASSOC;");
         while (principalRuleAssocResultSet.next())
         {
@@ -109,6 +112,7 @@ public class JetspeedProfilerMigration i
         // PROFILE_PAGE_ASSOC
         PreparedStatement profilePageAssocInsertStatement = targetConnection.prepareStatement("INSERT INTO PROFILE_PAGE_ASSOC (LOCATOR_HASH, PAGE_ID) VALUES (?, ?);");
         Statement profilePageAssocQueryStatement = sourceConnection.createStatement();
+        profilePageAssocQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet profilePageAssocResultSet = profilePageAssocQueryStatement.executeQuery("SELECT LOCATOR_HASH, PAGE_ID FROM PROFILE_PAGE_ASSOC;");
         while (profilePageAssocResultSet.next())
         {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/tools/migration/JetspeedRegistryMigration.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/tools/migration/JetspeedRegistryMigration.java?rev=946246&r1=946245&r2=946246&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/tools/migration/JetspeedRegistryMigration.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/tools/migration/JetspeedRegistryMigration.java Wed May 19 15:59:24 2010
@@ -76,6 +76,7 @@ public class JetspeedRegistryMigration i
         // PORTLET_DEFINITION
         PreparedStatement portletDefinitionInsertStatement = targetConnection.prepareStatement("INSERT INTO PORTLET_DEFINITION (ID, NAME, CLASS_NAME, APPLICATION_ID, EXPIRATION_CACHE, RESOURCE_BUNDLE, PREFERENCE_VALIDATOR, SECURITY_REF, CACHE_SCOPE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);");
         Statement portletDefinitionQueryStatement = sourceConnection.createStatement();
+        portletDefinitionQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet portletDefinitionResultSet = null;
         switch (sourceVersion)
         {
@@ -135,6 +136,7 @@ public class JetspeedRegistryMigration i
         // PORTLET_APPLICATION
         PreparedStatement portletApplicationInsertStatement = targetConnection.prepareStatement("INSERT INTO PORTLET_APPLICATION (APPLICATION_ID, APP_NAME, CONTEXT_PATH, REVISION, VERSION, APP_TYPE, CHECKSUM, SECURITY_REF, DEFAULT_NAMESPACE, RESOURCE_BUNDLE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?);");
         Statement portletApplicationQueryStatement = sourceConnection.createStatement();
+        portletApplicationQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet portletApplicationResultSet = null;
         switch (sourceVersion)
         {
@@ -211,6 +213,7 @@ public class JetspeedRegistryMigration i
         // PA_METADATA_FIELDS
         PreparedStatement portletApplicationMetadataInsertStatement = targetConnection.prepareStatement("INSERT INTO PA_METADATA_FIELDS (ID, OBJECT_ID, COLUMN_VALUE, NAME, LOCALE_STRING) VALUES (?, ?, ?, ?, ?);");
         Statement portletApplicationMetadataQueryStatement = sourceConnection.createStatement();
+        portletApplicationMetadataQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet portletApplicationMetadataResultSet = portletApplicationMetadataQueryStatement.executeQuery("SELECT ID, OBJECT_ID, COLUMN_VALUE, NAME, LOCALE_STRING FROM PA_METADATA_FIELDS;");
         while (portletApplicationMetadataResultSet.next())
         {
@@ -229,6 +232,7 @@ public class JetspeedRegistryMigration i
         // PD_METADATA_FIELDS
         PreparedStatement portletDefinitionMetadataInsertStatement = targetConnection.prepareStatement("INSERT INTO PD_METADATA_FIELDS (ID, OBJECT_ID, COLUMN_VALUE, NAME, LOCALE_STRING) VALUES (?, ?, ?, ?, ?);");
         Statement portletDefinitionMetadataQueryStatement = sourceConnection.createStatement();
+        portletDefinitionMetadataQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet portletDefinitionMetadataResultSet = portletDefinitionMetadataQueryStatement.executeQuery("SELECT ID, OBJECT_ID, COLUMN_VALUE, NAME, LOCALE_STRING FROM PD_METADATA_FIELDS;");
         while (portletDefinitionMetadataResultSet.next())
         {
@@ -247,6 +251,7 @@ public class JetspeedRegistryMigration i
         // LANGUAGE
         PreparedStatement languageInsertStatement = targetConnection.prepareStatement("INSERT INTO LANGUAGE (ID, PORTLET_ID, LOCALE_STRING, SUPPORTED_LOCALE, TITLE, SHORT_TITLE, KEYWORDS) VALUES (?, ?, ?, ?, ?, ?, ?);");
         Statement languageQueryStatement = sourceConnection.createStatement();
+        languageQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet languageResultSet = null;
         switch (sourceVersion)
         {
@@ -294,6 +299,7 @@ public class JetspeedRegistryMigration i
         // PORTLET_SUPPORTS
         PreparedStatement portletSupportsInsertStatement = targetConnection.prepareStatement("INSERT INTO PORTLET_SUPPORTS (SUPPORTS_ID, PORTLET_ID, MIME_TYPE, MODES, STATES) VALUES (?, ?, ?, ?, ?);");
         Statement portletSupportsQueryStatement = sourceConnection.createStatement();
+        portletSupportsQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet portletSupportsResultSet = null;
         switch (sourceVersion)
         {
@@ -337,6 +343,7 @@ public class JetspeedRegistryMigration i
         // PARAMETER
         PreparedStatement parameterInsertStatement = targetConnection.prepareStatement("INSERT INTO PARAMETER (PARAMETER_ID, OWNER_ID, OWNER_CLASS_NAME, NAME, PARAMETER_VALUE) VALUES (?, ?, ?, ?, ?);");
         Statement parameterQueryStatement = sourceConnection.createStatement();
+        parameterQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet parameterResultSet = null;
         switch (sourceVersion)
         {
@@ -380,6 +387,7 @@ public class JetspeedRegistryMigration i
         // PORTLET_PREFERENCE
         PreparedStatement portletPreferenceInsertStatement = targetConnection.prepareStatement("INSERT INTO PORTLET_PREFERENCE (ID, DTYPE, APPLICATION_NAME, PORTLET_NAME, ENTITY_ID, USER_NAME, NAME, READONLY) VALUES (?, ?, ?, ?, ?, ?, ?, ?);");
         Statement portletPreferenceQueryStatement = sourceConnection.createStatement();
+        portletPreferenceQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet portletPreferenceResultSet = null;
         switch (sourceVersion)
         {
@@ -499,6 +507,7 @@ public class JetspeedRegistryMigration i
         // PORTLET_PREFERENCE_VALUE
         PreparedStatement portletPreferenceValueInsertStatement = targetConnection.prepareStatement("INSERT INTO PORTLET_PREFERENCE_VALUE (ID, PREF_ID, IDX, PREF_VALUE) VALUES (?, ?, ?, ?);");
         Statement portletPreferenceValueQueryStatement = sourceConnection.createStatement();
+        portletPreferenceValueQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet portletPreferenceValueResultSet = null;
         switch (sourceVersion)
         {
@@ -540,6 +549,7 @@ public class JetspeedRegistryMigration i
         // SECURITY_ROLE_REFERENCE
         PreparedStatement securityRoleReferenceInsertStatement = targetConnection.prepareStatement("INSERT INTO SECURITY_ROLE_REFERENCE (ID, PORTLET_DEFINITION_ID, ROLE_NAME, ROLE_LINK) VALUES (?, ?, ?, ?);");
         Statement securityRoleReferenceQueryStatement = sourceConnection.createStatement();
+        securityRoleReferenceQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet securityRoleReferenceResultSet = securityRoleReferenceQueryStatement.executeQuery("SELECT ID, PORTLET_DEFINITION_ID, ROLE_NAME, ROLE_LINK FROM SECURITY_ROLE_REFERENCE;");
         while (securityRoleReferenceResultSet.next())
         {
@@ -557,6 +567,7 @@ public class JetspeedRegistryMigration i
         // SECURITY_ROLE
         PreparedStatement securityRoleInsertStatement = targetConnection.prepareStatement("INSERT INTO SECURITY_ROLE (ID, APPLICATION_ID, NAME) VALUES (?, ?, ?);");
         Statement securityRoleQueryStatement = sourceConnection.createStatement();
+        securityRoleQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet securityRoleResultSet = null;
         switch (sourceVersion)
         {
@@ -634,6 +645,7 @@ public class JetspeedRegistryMigration i
         // USER_ATTRIBUTE_REF
         PreparedStatement userAttributeRefInsertStatement = targetConnection.prepareStatement("INSERT INTO USER_ATTRIBUTE_REF (ID, APPLICATION_ID, NAME, NAME_LINK) VALUES (?, ?, ?, ?);");
         Statement userAttributeRefQueryStatement = sourceConnection.createStatement();
+        userAttributeRefQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet userAttributeRefResultSet = userAttributeRefQueryStatement.executeQuery("SELECT ID, APPLICATION_ID, NAME, NAME_LINK FROM USER_ATTRIBUTE_REF;");
         while (userAttributeRefResultSet.next())
         {
@@ -651,6 +663,7 @@ public class JetspeedRegistryMigration i
         // USER_ATTRIBUTE
         PreparedStatement userAttributeInsertStatement = targetConnection.prepareStatement("INSERT INTO USER_ATTRIBUTE (ID, APPLICATION_ID, NAME) VALUES (?, ?, ?);");
         Statement userAttributeQueryStatement = sourceConnection.createStatement();
+        userAttributeQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet userAttributeResultSet = null;
         switch (sourceVersion)
         {
@@ -697,6 +710,7 @@ public class JetspeedRegistryMigration i
         // JETSPEED_SERVICE
         PreparedStatement jetspeedServiceInsertStatement = targetConnection.prepareStatement("INSERT INTO JETSPEED_SERVICE (ID, APPLICATION_ID, NAME) VALUES (?, ?, ?);");
         Statement jetspeedServiceQueryStatement = sourceConnection.createStatement();
+        jetspeedServiceQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet jetspeedServiceResultSet = jetspeedServiceQueryStatement.executeQuery("SELECT ID, APPLICATION_ID, NAME FROM JETSPEED_SERVICE;");
         while (jetspeedServiceResultSet.next())
         {
@@ -713,6 +727,7 @@ public class JetspeedRegistryMigration i
         // CUSTOM_PORTLET_MODE
         PreparedStatement customPortletModeInsertStatement = targetConnection.prepareStatement("INSERT INTO CUSTOM_PORTLET_MODE (ID, APPLICATION_ID, CUSTOM_NAME, MAPPED_NAME, PORTAL_MANAGED) VALUES (?, ?, ?, ?, ?);");
         Statement customPortletModeQueryStatement = sourceConnection.createStatement();
+        customPortletModeQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet customPortletModeResultSet = null;
         switch (sourceVersion)
         {
@@ -763,6 +778,7 @@ public class JetspeedRegistryMigration i
         // CUSTOM_WINDOW_STATE
         PreparedStatement customWindowStateInsertStatement = targetConnection.prepareStatement("INSERT INTO CUSTOM_WINDOW_STATE (ID, APPLICATION_ID, CUSTOM_NAME, MAPPED_NAME) VALUES (?, ?, ?, ?);");
         Statement customWindowStateQueryStatement = sourceConnection.createStatement();
+        customWindowStateQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet customWindowStateResultSet = null;
         switch (sourceVersion)
         {
@@ -812,6 +828,7 @@ public class JetspeedRegistryMigration i
         int maxLocalizedDescriptionId = 0;
         PreparedStatement localizedDescriptionInsertStatement = targetConnection.prepareStatement("INSERT INTO LOCALIZED_DESCRIPTION (ID, OWNER_ID, OWNER_CLASS_NAME, DESCRIPTION, LOCALE_STRING) VALUES (?, ?, ?, ?, ?);");
         Statement localizedDescriptionQueryStatement = sourceConnection.createStatement();
+        localizedDescriptionQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet localizedDescriptionResultSet = null;
         switch (sourceVersion)
         {
@@ -887,6 +904,7 @@ public class JetspeedRegistryMigration i
         // LOCALIZED_DISPLAY_NAME
         PreparedStatement localizedDisplayNameInsertStatement = targetConnection.prepareStatement("INSERT INTO LOCALIZED_DISPLAY_NAME (ID, OWNER_ID, OWNER_CLASS_NAME, DISPLAY_NAME, LOCALE_STRING) VALUES (?, ?, ?, ?, ?);");
         Statement localizedDisplayNameQueryStatement = sourceConnection.createStatement();
+        localizedDisplayNameQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet localizedDisplayNameResultSet = null;
         switch (sourceVersion)
         {
@@ -944,6 +962,7 @@ public class JetspeedRegistryMigration i
                 // EVENT_DEFINITION
                 PreparedStatement eventDefinitionInsertStatement = targetConnection.prepareStatement("INSERT INTO EVENT_DEFINITION (ID, APPLICATION_ID, LOCAL_PART, NAMESPACE, PREFIX, VALUE_TYPE) VALUES (?, ?, ?, ?, ?, ?);");
                 Statement eventDefinitionQueryStatement = sourceConnection.createStatement();
+                eventDefinitionQueryStatement.setFetchSize(FETCH_SIZE);
                 ResultSet eventDefinitionResultSet = eventDefinitionQueryStatement.executeQuery("SELECT ID, APPLICATION_ID, LOCAL_PART, NAMESPACE, PREFIX, VALUE_TYPE FROM EVENT_DEFINITION;");
                 while (eventDefinitionResultSet.next())
                 {
@@ -963,6 +982,7 @@ public class JetspeedRegistryMigration i
                 // EVENT_ALIAS
                 PreparedStatement eventAliasInsertStatement = targetConnection.prepareStatement("INSERT INTO EVENT_ALIAS (ID, OWNER_ID, LOCAL_PART, NAMESPACE, PREFIX) VALUES (?, ?, ?, ?, ?);");
                 Statement eventAliasQueryStatement = sourceConnection.createStatement();
+                eventAliasQueryStatement.setFetchSize(FETCH_SIZE);
                 ResultSet eventAliasResultSet = eventAliasQueryStatement.executeQuery("SELECT ID, OWNER_ID, LOCAL_PART, NAMESPACE, PREFIX FROM EVENT_ALIAS;");
                 while (eventAliasResultSet.next())
                 {
@@ -981,6 +1001,7 @@ public class JetspeedRegistryMigration i
                 // PARAMETER_ALIAS
                 PreparedStatement parameterAliasInsertStatement = targetConnection.prepareStatement("INSERT INTO PARAMETER_ALIAS (ID, OWNER_ID, LOCAL_PART, NAMESPACE, PREFIX) VALUES (?, ?, ?, ?, ?);");
                 Statement parameterAliasQueryStatement = sourceConnection.createStatement();
+                parameterAliasQueryStatement.setFetchSize(FETCH_SIZE);
                 ResultSet parameterAliasResultSet = parameterAliasQueryStatement.executeQuery("SELECT ID, OWNER_ID, LOCAL_PART, NAMESPACE, PREFIX FROM PARAMETER_ALIAS;");
                 while (parameterAliasResultSet.next())
                 {
@@ -999,6 +1020,7 @@ public class JetspeedRegistryMigration i
                 // PUBLISHING_EVENT
                 PreparedStatement publishingEventInsertStatement = targetConnection.prepareStatement("INSERT INTO PUBLISHING_EVENT (ID, OWNER_ID, LOCAL_PART, NAMESPACE, PREFIX) VALUES (?, ?, ?, ?, ?);");
                 Statement publishingEventQueryStatement = sourceConnection.createStatement();
+                publishingEventQueryStatement.setFetchSize(FETCH_SIZE);
                 ResultSet publishingEventResultSet = publishingEventQueryStatement.executeQuery("SELECT ID, OWNER_ID, LOCAL_PART, NAMESPACE, PREFIX FROM PUBLISHING_EVENT;");
                 while (publishingEventResultSet.next())
                 {
@@ -1017,6 +1039,7 @@ public class JetspeedRegistryMigration i
                 // PROCESSING_EVENT
                 PreparedStatement processingEventInsertStatement = targetConnection.prepareStatement("INSERT INTO PROCESSING_EVENT (ID, OWNER_ID, LOCAL_PART, NAMESPACE, PREFIX) VALUES (?, ?, ?, ?, ?);");
                 Statement processingEventQueryStatement = sourceConnection.createStatement();
+                processingEventQueryStatement.setFetchSize(FETCH_SIZE);
                 ResultSet processingEventResultSet = processingEventQueryStatement.executeQuery("SELECT ID, OWNER_ID, LOCAL_PART, NAMESPACE, PREFIX FROM PROCESSING_EVENT;");
                 while (processingEventResultSet.next())
                 {
@@ -1035,6 +1058,7 @@ public class JetspeedRegistryMigration i
                 // NAMED_PARAMETER
                 PreparedStatement namedParameterInsertStatement = targetConnection.prepareStatement("INSERT INTO NAMED_PARAMETER (ID, OWNER_ID, NAME) VALUES (?, ?, ?);");
                 Statement namedParameterQueryStatement = sourceConnection.createStatement();
+                namedParameterQueryStatement.setFetchSize(FETCH_SIZE);
                 ResultSet namedParameterResultSet = namedParameterQueryStatement.executeQuery("SELECT ID, OWNER_ID, NAME FROM NAMED_PARAMETER;");
                 while (namedParameterResultSet.next())
                 {
@@ -1051,6 +1075,7 @@ public class JetspeedRegistryMigration i
                 // RUNTIME_OPTION
                 PreparedStatement runtimeOptionInsertStatement = targetConnection.prepareStatement("INSERT INTO RUNTIME_OPTION (ID, OWNER_ID, OWNER_CLASS_NAME, NAME) VALUES (?, ?, ?, ?);");
                 Statement runtimeOptionQueryStatement = sourceConnection.createStatement();
+                runtimeOptionQueryStatement.setFetchSize(FETCH_SIZE);
                 ResultSet runtimeOptionResultSet = runtimeOptionQueryStatement.executeQuery("SELECT ID, OWNER_ID, OWNER_CLASS_NAME, NAME FROM RUNTIME_OPTION;");
                 while (runtimeOptionResultSet.next())
                 {
@@ -1068,6 +1093,7 @@ public class JetspeedRegistryMigration i
                 // RUNTIME_VALUE
                 PreparedStatement runtimeValueInsertStatement = targetConnection.prepareStatement("INSERT INTO RUNTIME_VALUE (ID, OWNER_ID, RVALUE) VALUES (?, ?, ?);");
                 Statement runtimeValueQueryStatement = sourceConnection.createStatement();
+                runtimeValueQueryStatement.setFetchSize(FETCH_SIZE);
                 ResultSet runtimeValueResultSet = runtimeValueQueryStatement.executeQuery("SELECT ID, OWNER_ID, RVALUE FROM RUNTIME_VALUE;");
                 while (runtimeValueResultSet.next())
                 {
@@ -1084,6 +1110,7 @@ public class JetspeedRegistryMigration i
                 // PUBLIC_PARAMETER
                 PreparedStatement publicParameterInsertStatement = targetConnection.prepareStatement("INSERT INTO PUBLIC_PARAMETER (ID, APPLICATION_ID, LOCAL_PART, NAMESPACE, PREFIX, IDENTIFIER) VALUES (?, ?, ?, ?, ?, ?);");
                 Statement publicParameterQueryStatement = sourceConnection.createStatement();
+                publicParameterQueryStatement.setFetchSize(FETCH_SIZE);
                 ResultSet publicParameterResultSet = publicParameterQueryStatement.executeQuery("SELECT ID, APPLICATION_ID, LOCAL_PART, NAMESPACE, PREFIX, IDENTIFIER FROM PUBLIC_PARAMETER;");
                 while (publicParameterResultSet.next())
                 {
@@ -1103,6 +1130,7 @@ public class JetspeedRegistryMigration i
                 // PORTLET_FILTER
                 PreparedStatement portletFilterInsertStatement = targetConnection.prepareStatement("INSERT INTO PORTLET_FILTER (ID, APPLICATION_ID, FILTER_NAME, FILTER_CLASS) VALUES (?, ?, ?, ?);");
                 Statement portletFilterQueryStatement = sourceConnection.createStatement();
+                portletFilterQueryStatement.setFetchSize(FETCH_SIZE);
                 ResultSet portletFilterResultSet = portletFilterQueryStatement.executeQuery("SELECT ID, APPLICATION_ID, FILTER_NAME, FILTER_CLASS FROM PORTLET_FILTER;");
                 while (portletFilterResultSet.next())
                 {
@@ -1120,6 +1148,7 @@ public class JetspeedRegistryMigration i
                 // FILTER_LIFECYCLE
                 PreparedStatement filterLifecycleInsertStatement = targetConnection.prepareStatement("INSERT INTO FILTER_LIFECYCLE (ID, OWNER_ID, NAME) VALUES (?, ?, ?);");
                 Statement filterLifecycleQueryStatement = sourceConnection.createStatement();
+                filterLifecycleQueryStatement.setFetchSize(FETCH_SIZE);
                 ResultSet filterLifecycleResultSet = filterLifecycleQueryStatement.executeQuery("SELECT ID, OWNER_ID, NAME FROM FILTER_LIFECYCLE;");
                 while (filterLifecycleResultSet.next())
                 {
@@ -1136,6 +1165,7 @@ public class JetspeedRegistryMigration i
                 // FILTER_MAPPING
                 PreparedStatement filterMappingInsertStatement = targetConnection.prepareStatement("INSERT INTO FILTER_MAPPING (ID, APPLICATION_ID, FILTER_NAME) VALUES (?, ?, ?);");
                 Statement filterMappingQueryStatement = sourceConnection.createStatement();
+                filterMappingQueryStatement.setFetchSize(FETCH_SIZE);
                 ResultSet filterMappingResultSet = filterMappingQueryStatement.executeQuery("SELECT ID, APPLICATION_ID, FILTER_NAME FROM FILTER_MAPPING;");
                 while (filterMappingResultSet.next())
                 {
@@ -1152,6 +1182,7 @@ public class JetspeedRegistryMigration i
                 // FILTERED_PORTLET
                 PreparedStatement filteredPortletInsertStatement = targetConnection.prepareStatement("INSERT INTO FILTERED_PORTLET (ID, OWNER_ID, NAME) VALUES (?, ?, ?);");
                 Statement filteredPortletQueryStatement = sourceConnection.createStatement();
+                filteredPortletQueryStatement.setFetchSize(FETCH_SIZE);
                 ResultSet filteredPortletResultSet = filteredPortletQueryStatement.executeQuery("SELECT ID, OWNER_ID, NAME FROM FILTERED_PORTLET;");
                 while (filteredPortletResultSet.next())
                 {
@@ -1168,6 +1199,7 @@ public class JetspeedRegistryMigration i
                 // PORTLET_LISTENER
                 PreparedStatement portletListenerInsertStatement = targetConnection.prepareStatement("INSERT INTO PORTLET_LISTENER (ID, APPLICATION_ID, LISTENER_CLASS) VALUES (?, ?, ?);");
                 Statement portletListenerQueryStatement = sourceConnection.createStatement();
+                portletListenerQueryStatement.setFetchSize(FETCH_SIZE);
                 ResultSet portletListenerResultSet = portletListenerQueryStatement.executeQuery("SELECT ID, APPLICATION_ID, LISTENER_CLASS FROM PORTLET_LISTENER;");
                 while (portletListenerResultSet.next())
                 {
@@ -1184,6 +1216,7 @@ public class JetspeedRegistryMigration i
                 // PA_SECURITY_CONSTRAINT
                 PreparedStatement portletApplicationSecurityConstraintInsertStatement = targetConnection.prepareStatement("INSERT INTO PA_SECURITY_CONSTRAINT (ID, APPLICATION_ID, TRANSPORT) VALUES (?, ?, ?);");
                 Statement portletApplicationSecurityConstraintQueryStatement = sourceConnection.createStatement();
+                portletApplicationSecurityConstraintQueryStatement.setFetchSize(FETCH_SIZE);
                 ResultSet portletApplicationSecurityConstraintResultSet = portletApplicationSecurityConstraintQueryStatement.executeQuery("SELECT ID, APPLICATION_ID, TRANSPORT FROM PA_SECURITY_CONSTRAINT;");
                 while (portletApplicationSecurityConstraintResultSet.next())
                 {
@@ -1200,6 +1233,7 @@ public class JetspeedRegistryMigration i
                 // SECURED_PORTLET
                 PreparedStatement securedPortletInsertStatement = targetConnection.prepareStatement("INSERT INTO SECURED_PORTLET (ID, OWNER_ID, NAME) VALUES (?, ?, ?);");
                 Statement securedPortletQueryStatement = sourceConnection.createStatement();
+                securedPortletQueryStatement.setFetchSize(FETCH_SIZE);
                 ResultSet securedPortletResultSet = securedPortletQueryStatement.executeQuery("SELECT ID, OWNER_ID, NAME FROM SECURED_PORTLET;");
                 while (securedPortletResultSet.next())
                 {
@@ -1216,6 +1250,7 @@ public class JetspeedRegistryMigration i
                 // LOCALE_ENCODING_MAPPING      
                 PreparedStatement localeEncodingMappingInsertStatement = targetConnection.prepareStatement("INSERT INTO LOCALE_ENCODING_MAPPING (ID, APPLICATION_ID, LOCALE_STRING, ENCODING) VALUES (?, ?, ?, ?);");
                 Statement localeEncodingMappingQueryStatement = sourceConnection.createStatement();
+                localeEncodingMappingQueryStatement.setFetchSize(FETCH_SIZE);
                 ResultSet localeEncodingMappingResultSet = localeEncodingMappingQueryStatement.executeQuery("SELECT ID, APPLICATION_ID, LOCALE_STRING, ENCODING FROM LOCALE_ENCODING_MAPPING;");
                 while (localeEncodingMappingResultSet.next())
                 {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/tools/migration/JetspeedSecurityMigration.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/tools/migration/JetspeedSecurityMigration.java?rev=946246&r1=946245&r2=946246&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/tools/migration/JetspeedSecurityMigration.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/tools/migration/JetspeedSecurityMigration.java Wed May 19 15:59:24 2010
@@ -78,6 +78,7 @@ public class JetspeedSecurityMigration i
         int maxSecurityDomainId = -1;
         PreparedStatement securityDomainInsertStatement = targetConnection.prepareStatement("INSERT INTO SECURITY_DOMAIN (DOMAIN_ID, DOMAIN_NAME, REMOTE, ENABLED, OWNER_DOMAIN_ID) VALUES (?, ?, ?, ?, ?);");
         Statement securityDomainQueryStatement = sourceConnection.createStatement();
+        securityDomainQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet securityDomainResultSet = null;
         switch (sourceVersion)
         {
@@ -138,6 +139,7 @@ public class JetspeedSecurityMigration i
         // SECURITY_PRINCIPAL
         PreparedStatement securityPrincipalInsertStatement = targetConnection.prepareStatement("INSERT INTO SECURITY_PRINCIPAL (PRINCIPAL_ID, PRINCIPAL_TYPE, PRINCIPAL_NAME, IS_MAPPED, IS_ENABLED, IS_READONLY, IS_REMOVABLE, CREATION_DATE, MODIFIED_DATE, DOMAIN_ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?);");
         Statement securityPrincipalQueryStatement = sourceConnection.createStatement();
+        securityPrincipalQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet securityPrincipalResultSet = null;
         switch (sourceVersion)
         {
@@ -249,6 +251,7 @@ public class JetspeedSecurityMigration i
         boolean securityAttributeRowsMigrated = false;
         PreparedStatement securityAttributeInsertStatement = targetConnection.prepareStatement("INSERT INTO SECURITY_ATTRIBUTE (ATTR_ID, PRINCIPAL_ID, ATTR_NAME, ATTR_VALUE) VALUES (?, ?, ?, ?);");
         Statement securityAttributeQueryStatement = sourceConnection.createStatement();
+        securityAttributeQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet securityAttributeResultSet = null;
         switch (sourceVersion)
         {
@@ -333,6 +336,7 @@ public class JetspeedSecurityMigration i
             case JETSPEED_SCHEMA_VERSION_2_1_4:
             {
                 Statement securityPrincipalAssocQueryStatement1 = sourceConnection.createStatement();
+                securityPrincipalAssocQueryStatement1.setFetchSize(FETCH_SIZE);
                 ResultSet securityPrincipalAssocResultSet = securityPrincipalAssocQueryStatement1.executeQuery("SELECT USER_ID, ROLE_ID FROM SECURITY_USER_ROLE;");
                 while (securityPrincipalAssocResultSet.next())
                 {
@@ -346,6 +350,7 @@ public class JetspeedSecurityMigration i
                 securityPrincipalAssocQueryStatement1.close();
 
                 Statement securityPrincipalAssocQueryStatement2 = sourceConnection.createStatement();
+                securityPrincipalAssocQueryStatement2.setFetchSize(FETCH_SIZE);
                 securityPrincipalAssocResultSet = securityPrincipalAssocQueryStatement2.executeQuery("SELECT USER_ID, GROUP_ID FROM SECURITY_USER_GROUP;");
                 while (securityPrincipalAssocResultSet.next())
                 {
@@ -359,6 +364,7 @@ public class JetspeedSecurityMigration i
                 securityPrincipalAssocQueryStatement2.close();
 
                 Statement securityPrincipalAssocQueryStatement3 = sourceConnection.createStatement();
+                securityPrincipalAssocQueryStatement3.setFetchSize(FETCH_SIZE);
                 securityPrincipalAssocResultSet = securityPrincipalAssocQueryStatement3.executeQuery("SELECT GROUP_ID, ROLE_ID FROM SECURITY_GROUP_ROLE;");
                 while (securityPrincipalAssocResultSet.next())
                 {
@@ -372,6 +378,7 @@ public class JetspeedSecurityMigration i
                 securityPrincipalAssocQueryStatement3.close();
                 
                 Statement ssoPrincipalQueryStatement = sourceConnection.createStatement();
+                ssoPrincipalQueryStatement.setFetchSize(FETCH_SIZE);
                 ResultSet ssoPrincipalResultSet = ssoPrincipalQueryStatement.executeQuery("SELECT PRINCIPAL_ID, FULL_PATH FROM SECURITY_PRINCIPAL WHERE FULL_PATH LIKE '/sso/%';");
                 PreparedStatement principalQueryStatement = targetConnection.prepareStatement("SELECT PRINCIPAL_ID FROM SECURITY_PRINCIPAL WHERE PRINCIPAL_TYPE = 'user' AND DOMAIN_ID = "+DEFAULT_SECURITY_DOMAIN_ID+" AND PRINCIPAL_NAME = ?");
                 while (ssoPrincipalResultSet.next())
@@ -410,6 +417,7 @@ public class JetspeedSecurityMigration i
             case JETSPEED_SCHEMA_VERSION_2_2_1:
             {
                 Statement securityPrincipalAssocQueryStatement = sourceConnection.createStatement();
+                securityPrincipalAssocQueryStatement.setFetchSize(FETCH_SIZE);
                 ResultSet securityPrincipalAssocResultSet = securityPrincipalAssocQueryStatement.executeQuery("SELECT ASSOC_NAME, FROM_PRINCIPAL_ID, TO_PRINCIPAL_ID FROM SECURITY_PRINCIPAL_ASSOC;");
                 while (securityPrincipalAssocResultSet.next())
                 {
@@ -429,6 +437,7 @@ public class JetspeedSecurityMigration i
         // SECURITY_PERMISSION
         PreparedStatement securityPermissionInsertStatement = targetConnection.prepareStatement("INSERT INTO SECURITY_PERMISSION (PERMISSION_ID, PERMISSION_TYPE, NAME, ACTIONS) VALUES (?, ?, ?, ?);");
         Statement securityPermissionQueryStatement = sourceConnection.createStatement();
+        securityPermissionQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet securityPermissionResultSet = null;
         switch (sourceVersion)
         {
@@ -497,6 +506,7 @@ public class JetspeedSecurityMigration i
         // PRINCIPAL_PERMISSION
         PreparedStatement principalPermissionInsertStatement = targetConnection.prepareStatement("INSERT INTO PRINCIPAL_PERMISSION (PRINCIPAL_ID, PERMISSION_ID) VALUES (?, ?);");
         Statement principalPermissionQueryStatement = sourceConnection.createStatement();
+        principalPermissionQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet principalPermissionResultSet = principalPermissionQueryStatement.executeQuery("SELECT PRINCIPAL_ID, PERMISSION_ID FROM PRINCIPAL_PERMISSION;");
         while (principalPermissionResultSet.next())
         {
@@ -512,6 +522,7 @@ public class JetspeedSecurityMigration i
         // SECURITY_CREDENTIAL
         PreparedStatement securityCredentialInsertStatement = targetConnection.prepareStatement("INSERT INTO SECURITY_CREDENTIAL (CREDENTIAL_ID, PRINCIPAL_ID, CREDENTIAL_VALUE, TYPE, UPDATE_ALLOWED, IS_STATE_READONLY, UPDATE_REQUIRED, IS_ENCODED, IS_ENABLED, AUTH_FAILURES, IS_EXPIRED, CREATION_DATE, MODIFIED_DATE, PREV_AUTH_DATE, LAST_AUTH_DATE, EXPIRATION_DATE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);");
         Statement securityCredentialQueryStatement = sourceConnection.createStatement();
+        securityCredentialQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet securityCredentialResultSet = null;
         switch (sourceVersion)
         {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-sso/src/main/java/org/apache/jetspeed/tools/migration/JetspeedSSOSecurityMigration.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-sso/src/main/java/org/apache/jetspeed/tools/migration/JetspeedSSOSecurityMigration.java?rev=946246&r1=946245&r2=946246&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-sso/src/main/java/org/apache/jetspeed/tools/migration/JetspeedSSOSecurityMigration.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-sso/src/main/java/org/apache/jetspeed/tools/migration/JetspeedSSOSecurityMigration.java Wed May 19 15:59:24 2010
@@ -67,6 +67,7 @@ public class JetspeedSSOSecurityMigratio
         // SSO_SITE
         PreparedStatement ssoSiteInsertStatement = targetConnection.prepareStatement("INSERT INTO SSO_SITE (SITE_ID, NAME, URL, ALLOW_USER_SET, REQUIRES_CERTIFICATE, CHALLENGE_RESPONSE_AUTH, FORM_AUTH, FORM_USER_FIELD, FORM_PWD_FIELD, REALM, DOMAIN_ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);");
         Statement ssoSiteQueryStatement = sourceConnection.createStatement();
+        ssoSiteQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet ssoSiteResultSet = null;
         switch (sourceVersion)
         {

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/tools/migration/JetspeedStatisticsMigration.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/tools/migration/JetspeedStatisticsMigration.java?rev=946246&r1=946245&r2=946246&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/tools/migration/JetspeedStatisticsMigration.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/tools/migration/JetspeedStatisticsMigration.java Wed May 19 15:59:24 2010
@@ -57,6 +57,7 @@ public class JetspeedStatisticsMigration
         // PORTLET_STATISTICS
         PreparedStatement portletStatisticsInsertStatement = targetConnection.prepareStatement("INSERT INTO PORTLET_STATISTICS (IPADDRESS, USER_NAME, TIME_STAMP, PAGE, PORTLET, STATUS, ELAPSED_TIME) VALUES (?, ?, ?, ?, ?, ?, ?);");
         Statement portletStatisticsQueryStatement = sourceConnection.createStatement();
+        portletStatisticsQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet portletStatisticsResultSet = portletStatisticsQueryStatement.executeQuery("SELECT IPADDRESS, USER_NAME, TIME_STAMP, PAGE, PORTLET, STATUS, ELAPSED_TIME FROM PORTLET_STATISTICS;");
         while (portletStatisticsResultSet.next())
         {
@@ -88,6 +89,7 @@ public class JetspeedStatisticsMigration
         // PAGE_STATISTICS
         PreparedStatement pageStatisticsInsertStatement = targetConnection.prepareStatement("INSERT INTO PAGE_STATISTICS (IPADDRESS, USER_NAME, TIME_STAMP, PAGE, STATUS, ELAPSED_TIME) VALUES (?, ?, ?, ?, ?, ?);");
         Statement pageStatisticsQueryStatement = sourceConnection.createStatement();
+        pageStatisticsQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet pageStatisticsResultSet = pageStatisticsQueryStatement.executeQuery("SELECT IPADDRESS, USER_NAME, TIME_STAMP, PAGE, STATUS, ELAPSED_TIME FROM PAGE_STATISTICS;");
         while (pageStatisticsResultSet.next())
         {
@@ -107,6 +109,7 @@ public class JetspeedStatisticsMigration
         // USER_STATISTICS
         PreparedStatement userStatisticsInsertStatement = targetConnection.prepareStatement("INSERT INTO USER_STATISTICS (IPADDRESS, USER_NAME, TIME_STAMP, STATUS, ELAPSED_TIME) VALUES (?, ?, ?, ?, ?);");
         Statement userStatisticsQueryStatement = sourceConnection.createStatement();
+        userStatisticsQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet userStatisticsResultSet = userStatisticsQueryStatement.executeQuery("SELECT IPADDRESS, USER_NAME, TIME_STAMP, STATUS, ELAPSED_TIME FROM USER_STATISTICS;");
         while (userStatisticsResultSet.next())
         {
@@ -125,6 +128,7 @@ public class JetspeedStatisticsMigration
         // ADMIN_ACTIVITY
         PreparedStatement adminActivityInsertStatement = targetConnection.prepareStatement("INSERT INTO ADMIN_ACTIVITY (ACTIVITY, CATEGORY, ADMIN, USER_NAME, TIME_STAMP, IPADDRESS, ATTR_NAME, ATTR_VALUE_BEFORE, ATTR_VALUE_AFTER, DESCRIPTION) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?);");
         Statement adminActivityQueryStatement = sourceConnection.createStatement();
+        adminActivityQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet adminActivityResultSet = adminActivityQueryStatement.executeQuery("SELECT ACTIVITY, CATEGORY, ADMIN, USER_NAME, TIME_STAMP, IPADDRESS, ATTR_NAME, ATTR_VALUE_BEFORE, ATTR_VALUE_AFTER, DESCRIPTION FROM ADMIN_ACTIVITY;");
         while (adminActivityResultSet.next())
         {
@@ -148,6 +152,7 @@ public class JetspeedStatisticsMigration
         // USER_ACTIVITY
         PreparedStatement userActivityInsertStatement = targetConnection.prepareStatement("INSERT INTO USER_ACTIVITY (ACTIVITY, CATEGORY, USER_NAME, TIME_STAMP, IPADDRESS, ATTR_NAME, ATTR_VALUE_BEFORE, ATTR_VALUE_AFTER, DESCRIPTION) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);");
         Statement userActivityQueryStatement = sourceConnection.createStatement();
+        userActivityQueryStatement.setFetchSize(FETCH_SIZE);
         ResultSet userActivityResultSet = userActivityQueryStatement.executeQuery("SELECT ACTIVITY, CATEGORY, USER_NAME, TIME_STAMP, IPADDRESS, ATTR_NAME, ATTR_VALUE_BEFORE, ATTR_VALUE_AFTER, DESCRIPTION FROM USER_ACTIVITY;");
         while (userActivityResultSet.next())
         {

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/tools/migration/JetspeedMigration.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/tools/migration/JetspeedMigration.java?rev=946246&r1=946245&r2=946246&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/tools/migration/JetspeedMigration.java (original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/tools/migration/JetspeedMigration.java Wed May 19 15:59:24 2010
@@ -32,6 +32,8 @@ import java.util.Map;
  */
 public interface JetspeedMigration
 {
+    static final int FETCH_SIZE = 10000;
+    
     static final int JETSPEED_SCHEMA_VERSION_UNKNOWN = 0;
     static final int JETSPEED_SCHEMA_VERSION_2_1_3 = 213;
     static final int JETSPEED_SCHEMA_VERSION_2_1_4 = 214;



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message