You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2006/10/19 19:54:39 UTC

svn commit: r465700 - /james/server/trunk/src/java/org/apache/james/vut/JDBCVirtualUserTable.java

Author: norman
Date: Thu Oct 19 10:54:38 2006
New Revision: 465700

URL: http://svn.apache.org/viewvc?view=rev&rev=465700
Log:
Fix prevois commit..

Modified:
    james/server/trunk/src/java/org/apache/james/vut/JDBCVirtualUserTable.java

Modified: james/server/trunk/src/java/org/apache/james/vut/JDBCVirtualUserTable.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/vut/JDBCVirtualUserTable.java?view=diff&rev=465700&r1=465699&r2=465700
==============================================================================
--- james/server/trunk/src/java/org/apache/james/vut/JDBCVirtualUserTable.java (original)
+++ james/server/trunk/src/java/org/apache/james/vut/JDBCVirtualUserTable.java Thu Oct 19 10:54:38 2006
@@ -199,9 +199,22 @@
             // Try UPPER, lower, and MixedCase, to see if the table is there.
            
             if (!(theJDBCUtil.tableExists(dbMetaData, tableName))) {
-            // Costum table not exists. Throw exception
-            throw new Exception("Table " + tableName + " not exists");
+        	
+                // Users table doesn't exist - create it.
+                createStatement =
+                    conn.prepareStatement(sqlQueries.getSqlString("createTable", true));
+                createStatement.execute();
+
+                if (getLogger().isInfoEnabled()) {
+                    logBuffer =
+                        new StringBuffer(64)
+                                .append("JdbcVirtalUserTable: Created table '")
+                                .append(tableName)
+                                .append("'.");
+                    getLogger().info(logBuffer.toString());
+                }
             }
+            
    
         } finally {
             theJDBCUtil.closeJDBCStatement(createStatement);



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