Update of /var/cvs/src/org/mmbase/storage/implementation/database
In directory james.mmbase.org:/tmp/cvs-serv20098
Modified Files:
DatabaseStorageManager.java
Log Message:
MMB-1724
See also:
http://cvs.mmbase.org/viewcvs/src/org/mmbase/storage/implementation/database
See also: http://www.mmbase.org/jira/browse/MMB-1724
Index: DatabaseStorageManager.java
===================================================================
RCS file:
/var/cvs/src/org/mmbase/storage/implementation/database/DatabaseStorageManager.java,v
retrieving revision 1.197
retrieving revision 1.198
diff -u -b -r1.197 -r1.198
--- DatabaseStorageManager.java 29 Jul 2008 08:39:35 -0000 1.197
+++ DatabaseStorageManager.java 1 Oct 2008 20:53:31 -0000 1.198
@@ -32,7 +32,7 @@
*
* @author Pierre van Rooden
* @since MMBase-1.7
- * @version $Id: DatabaseStorageManager.java,v 1.197 2008/07/29 08:39:35
pierre Exp $
+ * @version $Id: DatabaseStorageManager.java,v 1.198 2008/10/01 20:53:31
michiel Exp $
*/
public class DatabaseStorageManager implements StorageManager {
@@ -69,6 +69,8 @@
*/
private static boolean legacyWarned = false;
+ private static boolean verifyTablesWarned = false;
+
/**
* Whether the warning about blobs located on disk was given.
*/
@@ -166,6 +168,23 @@
}
+
+ /**
+ * @since MMBase-1.8.7
+ */
+ protected boolean verifyTables() {
+ boolean verifyTables = !
"false".equals(factory.getMMBase().getInitParameter("verifyTables"));
+ if (!verifyTablesWarned) {
+ if (! verifyTables) {
+ log.info("Not verifying tables. No implicit synchronization of
datatypes to matching db types is done. No warnings about that are logged.");
+ } else {
+ log.service("Verifying tables. Implicit synchronization of
datatypes to matching db types will be done. Warnings about that are logged.");
+ }
+ verifyTablesWarned = true;
+ }
+ return verifyTables;
+ }
+
/**
* Obtains an active connection, opening a new one if needed.
* This method sets and then returns the [EMAIL PROTECTED]
#activeConnection} member.
@@ -1935,6 +1954,8 @@
}
+
+
/**
* @see
org.mmbase.storage.StorageManager#create(org.mmbase.module.core.MMObjectBuilder)
*/
@@ -1956,7 +1977,7 @@
}
String tableName = (String) factory.getStorageIdentifier(builder);
createTable(builder, tableFields, tableName);
- if (!isVerified(builder)) {
+ if (verifyTables() && !isVerified(builder)) {
verify(builder);
}
}
@@ -2288,7 +2309,7 @@
public boolean exists(MMObjectBuilder builder) throws StorageException {
boolean result = exists((String)factory.getStorageIdentifier(builder));
if (result) {
- if (!isVerified(builder)) {
+ if (verifyTables() && !isVerified(builder)) {
verify(builder);
}
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs