geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiam...@apache.org
Subject svn commit: r1036727 - /geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/RunSQLPortlet.java
Date Fri, 19 Nov 2010 03:42:57 GMT
Author: xiaming
Date: Fri Nov 19 03:42:57 2010
New Revision: 1036727

URL: http://svn.apache.org/viewvc?rev=1036727&view=rev
Log:
GERONIMO-5706 fix the console exception when executing select sql statement in derby auth
disabled, patch provided by viola.lu

Modified:
    geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/RunSQLPortlet.java

Modified: geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/RunSQLPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/RunSQLPortlet.java?rev=1036727&r1=1036726&r2=1036727&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/RunSQLPortlet.java
(original)
+++ geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/RunSQLPortlet.java
Fri Nov 19 03:42:57 2010
@@ -133,8 +133,13 @@ public class RunSQLPortlet extends BaseP
             }
             renderRequest.setAttribute("singleSelectStmt", singleSelectStmt);
             renderRequest.setAttribute("ds", DerbyConnectionUtil.getDataSource(useDB));
-            renderRequest.setAttribute("userName", DerbyConnectionUtil.getDerbyConnectionUsername());
-            renderRequest.setAttribute("userPassword", DerbyConnectionUtil.getDerbyConnectionUserPassword());
+            if("false".equals(System.getProperty("derby.connection.requireAuthentication"))){
+            	renderRequest.setAttribute("userName", "app");
+                renderRequest.setAttribute("userPassword", "app");
+            } else {
+            	renderRequest.setAttribute("userName", DerbyConnectionUtil.getDerbyConnectionUsername());
+                renderRequest.setAttribute("userPassword", DerbyConnectionUtil.getDerbyConnectionUserPassword());
+            }
         }
         if ((action != null) && (action.trim().length() > 0)) {
             //set action to null so that subsequent renders of portlet



Mime
View raw message