[jboss-cvs] JBoss Messaging SVN: r2200 - in trunk/src/main/org/jboss: messaging/core/plugin and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Feb 6 20:12:44 EST 2007
Author: clebert.suconic at jboss.com
Date: 2007-02-06 20:12:44 -0500 (Tue, 06 Feb 2007)
New Revision: 2200
Modified:
trunk/src/main/org/jboss/jms/server/plugin/JDBCJMSUserManager.java
trunk/src/main/org/jboss/messaging/core/plugin/JDBCSupport.java
Log:
Fixing support to POPULATE.TABLES. on JDBCJMSUserManager
Modified: trunk/src/main/org/jboss/jms/server/plugin/JDBCJMSUserManager.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/plugin/JDBCJMSUserManager.java 2007-02-06 23:36:56 UTC (rev 2199)
+++ trunk/src/main/org/jboss/jms/server/plugin/JDBCJMSUserManager.java 2007-02-07 01:12:44 UTC (rev 2200)
@@ -83,7 +83,17 @@
" PRIMARY KEY(USERID, ROLEID))");
return map;
}
-
+
+ protected boolean ignoreVerificationOnStartup(String statementName)
+ {
+ // Do not cross-check on POPULATE.TABLES. as we just load the tables with them
+ if (statementName.startsWith("POPULATE.TABLES."))
+ {
+ return true;
+ }
+ return false;
+ }
+
// MessagingComponent overrides ---------------------------------
public void start() throws Exception
Modified: trunk/src/main/org/jboss/messaging/core/plugin/JDBCSupport.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/plugin/JDBCSupport.java 2007-02-06 23:36:56 UTC (rev 2199)
+++ trunk/src/main/org/jboss/messaging/core/plugin/JDBCSupport.java 2007-02-07 01:12:44 UTC (rev 2200)
@@ -101,7 +101,12 @@
while (iter.hasNext())
{
String statementName = (String)iter.next();
-
+
+ if (ignoreVerificationOnStartup(statementName))
+ {
+ continue;
+ }
+
//This will throw an exception if there is no default for the statement specified in the
//sql properties
getSQLStatement(statementName);
@@ -144,7 +149,6 @@
log.debug(this + " started");
}
-
public void stop() throws Exception
{
log.debug(this + " stopped");
@@ -178,7 +182,13 @@
{
return Collections.EMPTY_MAP;
}
-
+
+ /** Subclasses might choose to not cross check the maps on certain statements.
+ * An example would be POPULATE.TABLES on JDBCJMSUserManagerService */
+ protected boolean ignoreVerificationOnStartup(String statementName)
+ {
+ return false;
+ }
// Private ----------------------------------------------------------------
private void createSchema() throws Exception
More information about the jboss-cvs-commits
mailing list