geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiam...@apache.org
Subject svn commit: r1032508 [1/2] - in /geronimo/server/branches/2.2: framework/configs/server-security-config/src/main/resources/security/ plugins/clustering/clustering-it/sample-datasource/src/main/plan/ plugins/clustering/plugin-farm-datasource/src/main/pl...
Date Mon, 08 Nov 2010 09:44:38 GMT
Author: xiaming
Date: Mon Nov  8 09:44:37 2010
New Revision: 1032508

URL: http://svn.apache.org/viewvc?rev=1032508&view=rev
Log:
GERONIMO-4296 secure derby network server withe password, provided by Han Hong Fang

Added:
    geronimo/server/branches/2.2/plugins/derby/derby/
    geronimo/server/branches/2.2/plugins/derby/derby/pom.xml
      - copied, changed from r1032504, geronimo/server/branches/2.2/plugins/derby/pom.xml
    geronimo/server/branches/2.2/plugins/derby/derby/src/
      - copied from r1032504, geronimo/server/branches/2.2/plugins/derby/src/
    geronimo/server/branches/2.2/plugins/derby/geronimo-derby/
      - copied from r1032504, geronimo/server/branches/2.2/plugins/system-database/geronimo-derby/
    geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/Credentials.java   (with props)
    geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/DerbyUserAuthenticator.java   (with props)
    geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/test/java/org/apache/geronimo/derby/MockKernel.java   (with props)
    geronimo/server/branches/2.2/plugins/derby/pom.xml   (with props)
Removed:
    geronimo/server/branches/2.2/plugins/derby/src/
    geronimo/server/branches/2.2/plugins/system-database/geronimo-derby/
Modified:
    geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/demo_groups.properties
    geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/demo_users.properties
    geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/groups.properties
    geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/users.properties
    geronimo/server/branches/2.2/plugins/clustering/clustering-it/sample-datasource/src/main/plan/plan.xml
    geronimo/server/branches/2.2/plugins/clustering/plugin-farm-datasource/src/main/plan/plan.xml
    geronimo/server/branches/2.2/plugins/connector/geronimo-connector-builder/src/test/java/org/apache/geronimo/connector/deployment/jsr88/Connector15DCBTest.java
    geronimo/server/branches/2.2/plugins/connector/geronimo-connector-builder/src/test/resources/plan-with-nulls.xml
    geronimo/server/branches/2.2/plugins/derby/derby/src/main/history/dependencies.xml
    geronimo/server/branches/2.2/plugins/derby/geronimo-derby/pom.xml
    geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/DerbyNetworkGBean.java
    geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/DerbySystemGBean.java
    geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/test/java/org/apache/geronimo/derby/DerbySystemGBeanTest.java
    geronimo/server/branches/2.2/plugins/monitoring/agent-ds/src/main/plan/plan.xml
    geronimo/server/branches/2.2/plugins/monitoring/mconsole-ds/src/main/plan/plan.xml
    geronimo/server/branches/2.2/plugins/system-database/pom.xml
    geronimo/server/branches/2.2/plugins/system-database/sysdb-console-jetty/pom.xml
    geronimo/server/branches/2.2/plugins/system-database/sysdb-console-tomcat/pom.xml
    geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/DBViewerPortlet.java
    geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/DerbyConnectionUtil.java
    geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/RunSQLPortlet.java
    geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/listTables.jsp
    geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/runSQLNormal.jsp
    geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/viewTableContents.jsp
    geronimo/server/branches/2.2/plugins/system-database/system-database/pom.xml
    geronimo/server/branches/2.2/plugins/system-database/system-database/src/main/history/dependencies.xml
    geronimo/server/branches/2.2/plugins/system-database/system-database/src/main/plan/plan.xml
    geronimo/server/branches/2.2/plugins/uddi/uddi-db/pom.xml
    geronimo/server/branches/2.2/plugins/uddi/uddi-db/src/main/plan/plan.xml
    geronimo/server/branches/2.2/testsuite/concurrent-testsuite/concurrent-basic/concurrent-ejb-ear/src/main/resources/ConcurrentPool.xml
    geronimo/server/branches/2.2/testsuite/concurrent-testsuite/concurrent-basic/concurrent-web-ear/src/main/resources/ConcurrentPool.xml
    geronimo/server/branches/2.2/testsuite/deployment-testsuite/jca-cms-tests/jca-cms-ear/src/main/resources/META-INF/geronimo-application.xml
    geronimo/server/branches/2.2/testsuite/deployment-testsuite/jca-cms-tests/jca-cms-ear/src/test/java/org/apache/geronimo/testsuite/jcacms/CmsTest.java
    geronimo/server/branches/2.2/testsuite/deployment-testsuite/jca-cms-tests/jca-cms-war/src/main/java/org/apache/geronimo/itest/TestServlet.java
    geronimo/server/branches/2.2/testsuite/security-testsuite/test-security/src/test/java/org/apache/geronimo/testsuite/security/TestSecurity.java
    geronimo/server/branches/2.2/testsupport/test-deployment-j2ee_1.3/test-rar-j2ee_1.3/src/main/rar/META-INF/geronimo-ra.xml
    geronimo/server/branches/2.2/testsupport/test-deployment-j2ee_1.4/test-rar-j2ee_1.4/src/main/rar/META-INF/geronimo-ra.xml
    geronimo/server/branches/2.2/testsupport/test-deployment-javaee_5/test-rar-javaee_5/src/main/rar/META-INF/geronimo-ra.xml

Modified: geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/demo_groups.properties
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/demo_groups.properties?rev=1032508&r1=1032507&r2=1032508&view=diff
==============================================================================
--- geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/demo_groups.properties (original)
+++ geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/demo_groups.properties Mon Nov  8 09:44:37 2010
@@ -18,6 +18,6 @@
 
 manager=izumi
 it=alan
-pet=george,gracie,metro
-dog=george,gracie
+pet=george,gracie,metro,dbadmin
+dog=george,gracie,dbadmin
 cat=metro
\ No newline at end of file

Modified: geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/demo_users.properties
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/demo_users.properties?rev=1032508&r1=1032507&r2=1032508&view=diff
==============================================================================
--- geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/demo_users.properties (original)
+++ geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/demo_users.properties Mon Nov  8 09:44:37 2010
@@ -20,4 +20,5 @@ izumi=violin
 alan=starcraft
 george=bone
 gracie=biscuit
-metro=mouse
\ No newline at end of file
+metro=mouse
+dbadmin=manager
\ No newline at end of file

Modified: geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/groups.properties
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/groups.properties?rev=1032508&r1=1032507&r2=1032508&view=diff
==============================================================================
--- geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/groups.properties (original)
+++ geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/groups.properties Mon Nov  8 09:44:37 2010
@@ -16,3 +16,4 @@
 #=====================================================================
 admin=system
 monitor=monitor
+derbyadmin=dbadmin

Modified: geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/users.properties
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/users.properties?rev=1032508&r1=1032507&r2=1032508&view=diff
==============================================================================
--- geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/users.properties (original)
+++ geronimo/server/branches/2.2/framework/configs/server-security-config/src/main/resources/security/users.properties Mon Nov  8 09:44:37 2010
@@ -16,3 +16,4 @@
 #=====================================================================
 system=manager
 monitor=password
+dbadmin=manager

Modified: geronimo/server/branches/2.2/plugins/clustering/clustering-it/sample-datasource/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/clustering/clustering-it/sample-datasource/src/main/plan/plan.xml?rev=1032508&r1=1032507&r2=1032508&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/clustering/clustering-it/sample-datasource/src/main/plan/plan.xml (original)
+++ geronimo/server/branches/2.2/plugins/clustering/clustering-it/sample-datasource/src/main/plan/plan.xml Mon Nov  8 09:44:37 2010
@@ -25,6 +25,8 @@
                 <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
                 <connectiondefinition-instance>
                     <name>SampleTxDatasource</name>
+                    <config-property-setting name="UserName">dbadmin</config-property-setting>
+                    <config-property-setting name="Password">manager</config-property-setting>
                     <config-property-setting name="DatabaseName">SampleDatabase</config-property-setting>
                     <config-property-setting name="CreateDatabase">true</config-property-setting>
                     <connectionmanager>
@@ -40,6 +42,8 @@
                 </connectiondefinition-instance>
                 <connectiondefinition-instance>
                     <name>SampleNoTxDatasource</name>
+                    <config-property-setting name="UserName">dbadmin</config-property-setting>
+                    <config-property-setting name="Password">manager</config-property-setting>
                     <config-property-setting name="DatabaseName">SampleDatabase</config-property-setting>
                     <config-property-setting name="CreateDatabase">true</config-property-setting>
                     <connectionmanager>

Modified: geronimo/server/branches/2.2/plugins/clustering/plugin-farm-datasource/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/clustering/plugin-farm-datasource/src/main/plan/plan.xml?rev=1032508&r1=1032507&r2=1032508&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/clustering/plugin-farm-datasource/src/main/plan/plan.xml (original)
+++ geronimo/server/branches/2.2/plugins/clustering/plugin-farm-datasource/src/main/plan/plan.xml Mon Nov  8 09:44:37 2010
@@ -26,8 +26,8 @@
                 <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
                 <connectiondefinition-instance>
                     <name>PluginFarmDatasource</name>
-                    <config-property-setting name="UserName"></config-property-setting>
-                    <config-property-setting name="Password"></config-property-setting>
+                    <config-property-setting name="UserName">dbadmin</config-property-setting>
+                    <config-property-setting name="Password">manager</config-property-setting>
                     <config-property-setting name="DatabaseName">PluginFarmDatatabase</config-property-setting>
                     <config-property-setting name="CreateDatabase">true</config-property-setting>
                     <connectionmanager>
@@ -41,8 +41,8 @@
                 </connectiondefinition-instance>
                 <connectiondefinition-instance>
                     <name>NoTxPluginFarmDatasource</name>
-                    <config-property-setting name="UserName"></config-property-setting>
-                    <config-property-setting name="Password"></config-property-setting>
+                    <config-property-setting name="UserName">dbadmin</config-property-setting>
+                    <config-property-setting name="Password">manager</config-property-setting>
                     <config-property-setting name="DatabaseName">PluginFarmDatatabase</config-property-setting>
                     <config-property-setting name="CreateDatabase">true</config-property-setting>
                     <connectionmanager>

Modified: geronimo/server/branches/2.2/plugins/connector/geronimo-connector-builder/src/test/java/org/apache/geronimo/connector/deployment/jsr88/Connector15DCBTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/connector/geronimo-connector-builder/src/test/java/org/apache/geronimo/connector/deployment/jsr88/Connector15DCBTest.java?rev=1032508&r1=1032507&r2=1032508&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/connector/geronimo-connector-builder/src/test/java/org/apache/geronimo/connector/deployment/jsr88/Connector15DCBTest.java (original)
+++ geronimo/server/branches/2.2/plugins/connector/geronimo-connector-builder/src/test/java/org/apache/geronimo/connector/deployment/jsr88/Connector15DCBTest.java Mon Nov  8 09:44:37 2010
@@ -290,7 +290,7 @@ public class Connector15DCBTest extends 
             } else if(setting.getName().equals("ExceptionSorterClass")) {
                 assertEquals("", setting.getStringValue());
             } else if(setting.getName().equals("ConnectionURL")) {
-                assertEquals("jdbc:derby:TestDatabase;create=true", setting.getStringValue());
+                assertEquals("jdbc:derby:TestDatabase;create=true;user=dbadmin;password=manager", setting.getStringValue());
             } else fail("Unknown connection setting '"+setting.getName()+"'");
         }
     }

Modified: geronimo/server/branches/2.2/plugins/connector/geronimo-connector-builder/src/test/resources/plan-with-nulls.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/connector/geronimo-connector-builder/src/test/resources/plan-with-nulls.xml?rev=1032508&r1=1032507&r2=1032508&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/connector/geronimo-connector-builder/src/test/resources/plan-with-nulls.xml (original)
+++ geronimo/server/branches/2.2/plugins/connector/geronimo-connector-builder/src/test/resources/plan-with-nulls.xml Mon Nov  8 09:44:37 2010
@@ -48,7 +48,7 @@
 <!--
                     <config-property-setting name="UserName" xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
 -->
-                    <config-property-setting name="ConnectionURL">jdbc:derby:TestDatabase;create=true</config-property-setting>
+                    <config-property-setting name="ConnectionURL">jdbc:derby:TestDatabase;create=true;user=dbadmin;password=manager</config-property-setting>
                     <connectionmanager>
                         <local-transaction/>
                         <single-pool>

Copied: geronimo/server/branches/2.2/plugins/derby/derby/pom.xml (from r1032504, geronimo/server/branches/2.2/plugins/derby/pom.xml)
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/derby/derby/pom.xml?p2=geronimo/server/branches/2.2/plugins/derby/derby/pom.xml&p1=geronimo/server/branches/2.2/plugins/derby/pom.xml&r1=1032504&r2=1032508&rev=1032508&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/derby/pom.xml (original)
+++ geronimo/server/branches/2.2/plugins/derby/derby/pom.xml Mon Nov  8 09:44:37 2010
@@ -24,13 +24,13 @@
 
     <parent>
         <groupId>org.apache.geronimo.plugins</groupId>
-        <artifactId>plugins</artifactId>
+        <artifactId>derby</artifactId>
         <version>2.2.1-SNAPSHOT</version>
     </parent>
     
     <groupId>org.apache.geronimo.configs</groupId>
     <artifactId>derby</artifactId>
-    <name>Geronimo Plugins, Derby</name>
+    <name>Geronimo Plugins, Derby :: Config</name>
     <packaging>car</packaging>
 
     <description>
@@ -39,6 +39,20 @@
 
     <dependencies>
         <dependency>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>j2ee-server</artifactId>
+            <type>car</type>
+            <version>${version}</version>
+        </dependency>        
+        
+        <dependency>
+            <groupId>org.apache.geronimo.framework</groupId>
+            <artifactId>j2ee-security</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+        </dependency>
+        
+        <dependency>
             <groupId>org.apache.geronimo.framework</groupId>
             <artifactId>geronimo-gbean-deployer</artifactId>
             <version>${version}</version>
@@ -47,6 +61,12 @@
         </dependency>
         
         <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-derby</artifactId>
+            <version>${version}</version>            
+        </dependency>
+        
+        <dependency>
             <groupId>org.apache.derby</groupId>
             <artifactId>derby</artifactId>
         </dependency>

Modified: geronimo/server/branches/2.2/plugins/derby/derby/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/derby/derby/src/main/history/dependencies.xml?rev=1032508&r1=1032504&r2=1032508&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/derby/derby/src/main/history/dependencies.xml (original)
+++ geronimo/server/branches/2.2/plugins/derby/derby/src/main/history/dependencies.xml Mon Nov  8 09:44:37 2010
@@ -26,4 +26,19 @@
         <artifactId>derbytools</artifactId>
         <type>jar</type>
     </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.configs</groupId>
+        <artifactId>j2ee-server</artifactId>
+        <type>car</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.framework</groupId>
+        <artifactId>j2ee-security</artifactId>
+        <type>car</type>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.geronimo.modules</groupId>
+        <artifactId>geronimo-derby</artifactId>
+        <type>jar</type>
+    </dependency>
 </plugin-artifact>

Modified: geronimo/server/branches/2.2/plugins/derby/geronimo-derby/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/derby/geronimo-derby/pom.xml?rev=1032508&r1=1032504&r2=1032508&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/derby/geronimo-derby/pom.xml (original)
+++ geronimo/server/branches/2.2/plugins/derby/geronimo-derby/pom.xml Mon Nov  8 09:44:37 2010
@@ -24,22 +24,35 @@
 
     <parent>
         <groupId>org.apache.geronimo.plugins</groupId>
-        <artifactId>system-database</artifactId>
+        <artifactId>derby</artifactId>
         <version>2.2.1-SNAPSHOT</version>
     </parent>
     
     <groupId>org.apache.geronimo.modules</groupId>
     <artifactId>geronimo-derby</artifactId>
-    <name>Geronimo Plugins, System Database :: Derby</name>
+    <name>Geronimo Plugins, Derby :: Core</name>
     
     <description>Wrapper for using Apache Derby as a bundled database.</description>
     
-    <dependencies>
+    <dependencies>        
         <dependency>
-            <groupId>org.apache.geronimo.configs</groupId>
+            <groupId>org.apache.derby</groupId>
             <artifactId>derby</artifactId>
-            <version>${version}</version>
-            <type>car</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derbyclient</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derbynet</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derbytools</artifactId>
         </dependency>
 
         <dependency>
@@ -53,6 +66,12 @@
             <artifactId>geronimo-management</artifactId>
             <version>${version}</version>
         </dependency>
+        
+        <dependency>
+            <groupId>org.apache.geronimo.framework</groupId>
+            <artifactId>geronimo-security</artifactId>
+            <version>${version}</version>
+        </dependency>        
     </dependencies>
 
 </project>

Added: geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/Credentials.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/Credentials.java?rev=1032508&view=auto
==============================================================================
--- geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/Credentials.java (added)
+++ geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/Credentials.java Mon Nov  8 09:44:37 2010
@@ -0,0 +1,61 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.derby;
+
+import java.util.Arrays;
+import java.io.Serializable;
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.NameCallback;
+import javax.security.auth.callback.PasswordCallback;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+/** 
+ * Simple wrapper for a username and password. * 
+ * @version $Rev$ $Date$
+ */
+
+public class Credentials implements CallbackHandler, Serializable {
+    private final String username;
+    private final char[] password;
+
+    public Credentials(String username, String password) {
+        this.username = username;
+        this.password = password == null ? null : password.toCharArray();
+    }
+
+    public void handle(Callback[] callbacks) throws UnsupportedCallbackException {
+        for (int i = 0; i < callbacks.length; i++) {
+            Callback callback = callbacks[i];
+            if (callback instanceof NameCallback) {
+                NameCallback nc = (NameCallback) callback;
+                nc.setName(username);
+            } else if (callback instanceof PasswordCallback) {
+                PasswordCallback pc = (PasswordCallback) callback;
+                pc.setPassword(password);
+            } else {
+                throw new UnsupportedCallbackException(callback);
+            }
+        }
+    }
+
+    public void clear() {
+        if(password != null) {
+            Arrays.fill(password, '\0');
+        }
+    }
+}

Propchange: geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/Credentials.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/Credentials.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/Credentials.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/DerbyNetworkGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/DerbyNetworkGBean.java?rev=1032508&r1=1032504&r2=1032508&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/DerbyNetworkGBean.java (original)
+++ geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/DerbyNetworkGBean.java Mon Nov  8 09:44:37 2010
@@ -38,6 +38,8 @@ public class DerbyNetworkGBean implement
     private NetworkServerControl network;
     private String host = "localhost";
     private int port = 1527;
+    private String userName="dbadmin";
+    private String userPassword="manager";
 
     public DerbyNetworkGBean(DerbySystem system) {
     }
@@ -58,13 +60,29 @@ public class DerbyNetworkGBean implement
         this.port = port;
     }
 
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getUserPassword() {
+        return userPassword;
+    }
+
+    public void setUserPassword(String userPassword) {
+        this.userPassword = userPassword;
+    }
+    
     public InetSocketAddress getAddress() {
         return new InetSocketAddress(getHost(), getPort());
     }
 
     public void doStart() throws Exception {
         InetAddress address = InetAddress.getByName(host);
-        network = new NetworkServerControl(address, port);
+        network = new NetworkServerControl(address, port, userName, userPassword);
         network.start(null); // todo work out how to add this to our log stream
         log.debug("Started on host " + host + ':' + port);
     }
@@ -93,6 +111,8 @@ public class DerbyNetworkGBean implement
         GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Derby Connector", DerbyNetworkGBean.class);
         infoFactory.addAttribute("host", String.class, true, true);
         infoFactory.addAttribute("port", Integer.TYPE, true, true);
+        infoFactory.addAttribute("userName", String.class, true, true);
+        infoFactory.addAttribute("userPassword", String.class, true, true);
         infoFactory.addAttribute("address", InetSocketAddress.class, false);
         infoFactory.addReference("derbySystem", DerbySystem.class, "GBean");
         infoFactory.setConstructor(new String[]{"derbySystem"});

Modified: geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/DerbySystemGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/DerbySystemGBean.java?rev=1032508&r1=1032504&r2=1032508&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/DerbySystemGBean.java (original)
+++ geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/DerbySystemGBean.java Mon Nov  8 09:44:37 2010
@@ -22,6 +22,7 @@ import org.slf4j.LoggerFactory;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
+import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 
 import java.sql.DriverManager;
@@ -37,19 +38,40 @@ public class DerbySystemGBean implements
     private static final Logger log = LoggerFactory.getLogger(DerbySystemGBean.class);
     private static final String SYSTEM_HOME = "derby.system.home";
     private static final String SHUTDOWN_ALL = "jdbc:derby:;shutdown=true";
+    private static final String DERBYNETWORK_GBEAN_NAME = "DerbyNetwork";    
+    private static final String DERBYNETWORK_GBEAN_ATTRIBUTE_USERNAME = "userName";    
+    private static final String DERBYNETWORK_GBEAN_ATTRIBUTE_USERPASSWORD = "userPassword";
 
     private final ServerInfo serverInfo;
     private final String systemHome;
     private String actualHome;
+    private Kernel kernel;
 
-    public DerbySystemGBean(ServerInfo serverInfo, String derbySystemHome) {
+    public DerbySystemGBean(ServerInfo serverInfo, String derbySystemHome, Kernel kernel) {
         this.serverInfo = serverInfo;
         this.systemHome = derbySystemHome;
+        this.kernel = kernel;
     }
 
     public String getDerbyHome() {
         return actualHome;
     }
+    
+    private String getDerbyUserID() {
+        try {
+            return (String) kernel.getAttribute(DERBYNETWORK_GBEAN_NAME, DERBYNETWORK_GBEAN_ATTRIBUTE_USERNAME);
+        } catch (Exception e) {
+            return null;
+        }
+    }
+
+    private String getDerbyUserPassword() {
+        try {
+            return (String) kernel.getAttribute(DERBYNETWORK_GBEAN_NAME, DERBYNETWORK_GBEAN_ATTRIBUTE_USERPASSWORD);
+        } catch (Exception e) {
+            return null;
+        }
+    }
 
     public void doStart() throws Exception {
         // set up the system property for the database home
@@ -62,6 +84,12 @@ public class DerbySystemGBean implements
         // set the magic system property that causes derby to use explicity
         // file sync instead of relying on vm support for file open rws
         System.setProperty("derby.storage.fileSyncTransactionLog", "true");
+        
+        // set system property to enable Derby user authentication
+        if (System.getProperty("derby.connection.requireAuthentication") == null) {
+            System.setProperty("derby.connection.requireAuthentication", "true");
+            System.setProperty("derby.authentication.provider", "org.apache.geronimo.derby.DerbyUserAuthenticator");
+        }
 
         // load the Embedded driver to initialize the home
         new org.apache.derby.jdbc.EmbeddedDriver();
@@ -70,7 +98,7 @@ public class DerbySystemGBean implements
 
     public void doStop() throws Exception {
         try {
-            DriverManager.getConnection(SHUTDOWN_ALL, null, null);
+            DriverManager.getConnection(SHUTDOWN_ALL, getDerbyUserID(), getDerbyUserPassword());
         } catch (SQLException e) {
             // SQLException gets thrown on successful shutdown so ignore
         }
@@ -80,7 +108,7 @@ public class DerbySystemGBean implements
 
     public void doFail() {
         try {
-            DriverManager.getConnection(SHUTDOWN_ALL, null, null);
+            DriverManager.getConnection(SHUTDOWN_ALL, getDerbyUserID(), getDerbyUserPassword());
         } catch (SQLException e) {
             // SQLException gets thrown on successful shutdown so ignore
         }
@@ -98,8 +126,9 @@ public class DerbySystemGBean implements
         GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(DerbySystemGBean.class);
         infoFactory.addAttribute("derbySystemHome", String.class, true);
         infoFactory.addAttribute("derbyHome", String.class, false);
+        infoFactory.addAttribute("kernel", Kernel.class, false);
         infoFactory.addReference("ServerInfo", ServerInfo.class, "GBean");
-        infoFactory.setConstructor(new String[]{"ServerInfo", "derbySystemHome"});
+        infoFactory.setConstructor(new String[]{"ServerInfo", "derbySystemHome", "kernel"});
         infoFactory.setPriority(GBeanInfo.PRIORITY_CLASSLOADER);
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Added: geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/DerbyUserAuthenticator.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/DerbyUserAuthenticator.java?rev=1032508&view=auto
==============================================================================
--- geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/DerbyUserAuthenticator.java (added)
+++ geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/DerbyUserAuthenticator.java Mon Nov  8 09:44:37 2010
@@ -0,0 +1,89 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.derby;
+
+import java.sql.SQLException;
+import java.util.Properties;
+import java.util.Set;
+import javax.security.auth.Subject;
+import javax.security.auth.login.LoginContext;
+import javax.security.auth.login.LoginException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.derby.authentication.UserAuthenticator;
+import org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal;
+
+/**
+ * 
+ * 
+ * @version $Rev$ $Date$
+ */
+public class DerbyUserAuthenticator implements UserAuthenticator {
+
+    private static final Logger log = LoggerFactory.getLogger(DerbyUserAuthenticator.class);
+    private static final String configName = "geronimo-admin";
+
+    /*
+     * A user-defined UserAuthenticator to authenticate the user id and password, which are used access Geronimo
+     * embedded derby.
+     */
+    public boolean authenticateUser(String userName, String userPassword, String databaseName, Properties info)
+            throws SQLException {
+
+        Thread thread = Thread.currentThread();
+        ClassLoader oldCL = thread.getContextClassLoader();
+        Credentials credentials = new Credentials(userName, userPassword);
+
+        try {
+            thread.setContextClassLoader(DerbyUserAuthenticator.class.getClassLoader());
+            // TODO consider using ContextManager for login and checking a permission against the ACC
+            // to do e.g. deployments.
+            LoginContext context = new LoginContext(configName, credentials);
+            context.login();
+
+            Subject sub = context.getSubject();
+            Set<GeronimoGroupPrincipal> pricipalsGroup = sub.getPrincipals(GeronimoGroupPrincipal.class);
+            boolean databaseLevelFlag = false;
+            for (GeronimoGroupPrincipal principal : pricipalsGroup) {
+                // if user group is "derbyadmin", then authentication passed without checking the databaseName
+                if (principal.getName().equalsIgnoreCase("derbyadmin")) {
+                    return true;
+                } else {
+                    // To define database level user, the the user group should be "derby_${databaseName}"
+                    if (databaseName != null) {
+                        databaseLevelFlag = principal.getName().equalsIgnoreCase("derby_" + databaseName);
+                    }
+                }
+            }
+            if (!databaseLevelFlag) {
+                logAuthenticationFailure(userName, userPassword, databaseName);
+            }
+            return databaseLevelFlag;
+        } catch (LoginException e) {
+            logAuthenticationFailure(userName, userPassword, databaseName);
+            return false;
+        } finally {
+            credentials.clear();
+            thread.setContextClassLoader(oldCL);
+        }
+    }
+
+    private void logAuthenticationFailure(String userName, String userPassword, String databaseName) {
+        log.warn("User authentication failure (userName userPassword databaseName): " + userName + " " + userPassword
+                + " " + databaseName);
+    }
+}

Propchange: geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/DerbyUserAuthenticator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/DerbyUserAuthenticator.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/main/java/org/apache/geronimo/derby/DerbyUserAuthenticator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/test/java/org/apache/geronimo/derby/DerbySystemGBeanTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/test/java/org/apache/geronimo/derby/DerbySystemGBeanTest.java?rev=1032508&r1=1032504&r2=1032508&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/test/java/org/apache/geronimo/derby/DerbySystemGBeanTest.java (original)
+++ geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/test/java/org/apache/geronimo/derby/DerbySystemGBeanTest.java Mon Nov  8 09:44:37 2010
@@ -25,6 +25,7 @@ import java.sql.SQLException;
 import java.util.Properties;
 
 import junit.framework.TestCase;
+import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.system.serverinfo.BasicServerInfo;
 
@@ -33,11 +34,15 @@ import org.apache.geronimo.system.server
  */
 public class DerbySystemGBeanTest extends TestCase {
     private File systemDir;
+    private Kernel kernel;
 
     public void testCreateSystemUsingServerInfo() throws Exception {
+        
+        System.setProperty("derby.connection.requireAuthentication", "false");
+        
         ServerInfo serverInfo = new BasicServerInfo(systemDir.toString());
         String derbyDir = "var/dbderby";
-        DerbySystemGBean gbean = new DerbySystemGBean(serverInfo, derbyDir);
+        DerbySystemGBean gbean = new DerbySystemGBean(serverInfo, derbyDir, kernel);
         try {
             gbean.doStart();
             new org.apache.derby.jdbc.EmbeddedDriver();
@@ -50,7 +55,7 @@ public class DerbySystemGBeanTest extend
     }
 
     private void connect() throws SQLException {
-        Connection c = DriverManager.getConnection("jdbc:derby:testdb;create=true");
+        Connection c = DriverManager.getConnection("jdbc:derby:testdb;create=true;user=dbadmin;password=manager");
         c.close();
     }
 
@@ -67,6 +72,7 @@ public class DerbySystemGBeanTest extend
             delete(systemDir);
             throw e;
         }
+        kernel = new MockKernel();
     }
 
     protected void tearDown() throws Exception {

Added: geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/test/java/org/apache/geronimo/derby/MockKernel.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/test/java/org/apache/geronimo/derby/MockKernel.java?rev=1032508&view=auto
==============================================================================
--- geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/test/java/org/apache/geronimo/derby/MockKernel.java (added)
+++ geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/test/java/org/apache/geronimo/derby/MockKernel.java Mon Nov  8 09:44:37 2010
@@ -0,0 +1,799 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.derby;
+
+import java.util.Date;
+import java.util.Set;
+
+import javax.management.ObjectName;
+
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.kernel.DependencyManager;
+import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.InternalKernelException;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.Naming;
+import org.apache.geronimo.kernel.NoSuchAttributeException;
+import org.apache.geronimo.kernel.NoSuchOperationException;
+import org.apache.geronimo.kernel.lifecycle.LifecycleMonitor;
+import org.apache.geronimo.kernel.proxy.ProxyManager;
+
+/**
+ * 
+ *
+ * @version $Rev$ $Date$
+ */
+public class MockKernel implements Kernel{
+    
+    private static final String DERBYNETWORK_GBEAN_NAME = "DerbyNetwork";    
+    private static final String DERBYNETWORK_GBEAN_ATTRIBUTE_USERNAME = "userName";    
+    private static final String DERBYNETWORK_GBEAN_ATTRIBUTE_USERPASSWORD = "userPassword";
+
+    /* 
+     * Mock implementation for test purpose
+     */
+    public Object getAttribute(String shortName, String attributeName) throws GBeanNotFoundException,
+            NoSuchAttributeException, Exception {
+        
+        if (DERBYNETWORK_GBEAN_NAME.equals(shortName)) {
+            
+            if (DERBYNETWORK_GBEAN_ATTRIBUTE_USERNAME.equals(attributeName)) {
+                return new String("dbadmin");
+            } else if (DERBYNETWORK_GBEAN_ATTRIBUTE_USERNAME.equals(attributeName)) {
+                return new String ("manager");
+            }
+        }
+        return null;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#boot()
+     */
+    public void boot() throws Exception {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getAbstractNameFor(java.lang.Object)
+     */
+    public AbstractName getAbstractNameFor(Object service) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getAttribute(org.apache.geronimo.gbean.AbstractName, java.lang.String)
+     */
+    public Object getAttribute(AbstractName name, String attributeName) throws GBeanNotFoundException,
+            NoSuchAttributeException, Exception {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getAttribute(java.lang.Class, java.lang.String)
+     */
+    public Object getAttribute(Class type, String attributeName) throws GBeanNotFoundException,
+            NoSuchAttributeException, Exception {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getAttribute(java.lang.String, java.lang.Class, java.lang.String)
+     */
+    public Object getAttribute(String shortName, Class type, String attributeName) throws GBeanNotFoundException,
+            NoSuchAttributeException, Exception {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getAttribute(javax.management.ObjectName, java.lang.String)
+     */
+    public Object getAttribute(ObjectName name, String attributeName) throws GBeanNotFoundException,
+            NoSuchAttributeException, Exception {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getBootTime()
+     */
+    public Date getBootTime() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getClassLoaderFor(org.apache.geronimo.gbean.AbstractName)
+     */
+    public ClassLoader getClassLoaderFor(AbstractName name) throws GBeanNotFoundException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getClassLoaderFor(java.lang.String)
+     */
+    public ClassLoader getClassLoaderFor(String shortName) throws GBeanNotFoundException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getClassLoaderFor(java.lang.Class)
+     */
+    public ClassLoader getClassLoaderFor(Class type) throws GBeanNotFoundException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getClassLoaderFor(java.lang.String, java.lang.Class)
+     */
+    public ClassLoader getClassLoaderFor(String shortName, Class type) throws GBeanNotFoundException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getDependencyManager()
+     */
+    public DependencyManager getDependencyManager() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getGBean(org.apache.geronimo.gbean.AbstractName)
+     */
+    public Object getGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException,
+            IllegalStateException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getGBean(java.lang.String)
+     */
+    public Object getGBean(String shortName) throws GBeanNotFoundException, InternalKernelException,
+            IllegalStateException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getGBean(java.lang.Class)
+     */
+    public Object getGBean(Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getGBean(java.lang.String, java.lang.Class)
+     */
+    public Object getGBean(String shortName, Class type) throws GBeanNotFoundException, InternalKernelException,
+            IllegalStateException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getGBean(javax.management.ObjectName)
+     */
+    public Object getGBean(ObjectName name) throws GBeanNotFoundException, InternalKernelException,
+            IllegalStateException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getGBeanData(org.apache.geronimo.gbean.AbstractName)
+     */
+    public GBeanData getGBeanData(AbstractName name) throws GBeanNotFoundException, InternalKernelException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getGBeanData(java.lang.String)
+     */
+    public GBeanData getGBeanData(String shortName) throws GBeanNotFoundException, InternalKernelException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getGBeanData(java.lang.Class)
+     */
+    public GBeanData getGBeanData(Class type) throws GBeanNotFoundException, InternalKernelException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getGBeanData(java.lang.String, java.lang.Class)
+     */
+    public GBeanData getGBeanData(String shortName, Class type) throws GBeanNotFoundException, InternalKernelException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getGBeanInfo(org.apache.geronimo.gbean.AbstractName)
+     */
+    public GBeanInfo getGBeanInfo(AbstractName name) throws GBeanNotFoundException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getGBeanInfo(java.lang.String)
+     */
+    public GBeanInfo getGBeanInfo(String shortName) throws GBeanNotFoundException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getGBeanInfo(java.lang.Class)
+     */
+    public GBeanInfo getGBeanInfo(Class type) throws GBeanNotFoundException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getGBeanInfo(java.lang.String, java.lang.Class)
+     */
+    public GBeanInfo getGBeanInfo(String shortName, Class type) throws GBeanNotFoundException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getGBeanInfo(javax.management.ObjectName)
+     */
+    public GBeanInfo getGBeanInfo(ObjectName name) throws GBeanNotFoundException {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getGBeanStartTime(org.apache.geronimo.gbean.AbstractName)
+     */
+    public long getGBeanStartTime(AbstractName name) throws GBeanNotFoundException {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getGBeanStartTime(java.lang.String)
+     */
+    public long getGBeanStartTime(String shortName) throws GBeanNotFoundException {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getGBeanStartTime(java.lang.Class)
+     */
+    public long getGBeanStartTime(Class type) throws GBeanNotFoundException {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getGBeanStartTime(java.lang.String, java.lang.Class)
+     */
+    public long getGBeanStartTime(String shortName, Class type) throws GBeanNotFoundException {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getGBeanState(org.apache.geronimo.gbean.AbstractName)
+     */
+    public int getGBeanState(AbstractName name) throws GBeanNotFoundException {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getGBeanState(java.lang.String)
+     */
+    public int getGBeanState(String shortName) throws GBeanNotFoundException {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getGBeanState(java.lang.Class)
+     */
+    public int getGBeanState(Class type) throws GBeanNotFoundException {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getGBeanState(java.lang.String, java.lang.Class)
+     */
+    public int getGBeanState(String shortName, Class type) throws GBeanNotFoundException {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getGBeanState(javax.management.ObjectName)
+     */
+    public int getGBeanState(ObjectName name) throws GBeanNotFoundException {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getKernelName()
+     */
+    public String getKernelName() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getLifecycleMonitor()
+     */
+    public LifecycleMonitor getLifecycleMonitor() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getNaming()
+     */
+    public Naming getNaming() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getProxyManager()
+     */
+    public ProxyManager getProxyManager() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getShortNameFor(java.lang.Object)
+     */
+    public String getShortNameFor(Object service) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#getStateReason(org.apache.geronimo.gbean.AbstractName)
+     */
+    public String getStateReason(AbstractName abstractName) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#invoke(org.apache.geronimo.gbean.AbstractName, java.lang.String)
+     */
+    public Object invoke(AbstractName name, String methodName) throws GBeanNotFoundException, NoSuchOperationException,
+            InternalKernelException, Exception {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#invoke(java.lang.String, java.lang.String)
+     */
+    public Object invoke(String shortName, String methodName) throws GBeanNotFoundException, NoSuchOperationException,
+            InternalKernelException, Exception {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#invoke(java.lang.Class, java.lang.String)
+     */
+    public Object invoke(Class type, String methodName) throws GBeanNotFoundException, NoSuchOperationException,
+            InternalKernelException, Exception {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#invoke(java.lang.String, java.lang.Class, java.lang.String)
+     */
+    public Object invoke(String shortName, Class type, String methodName) throws GBeanNotFoundException,
+            NoSuchOperationException, InternalKernelException, Exception {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#invoke(org.apache.geronimo.gbean.AbstractName, java.lang.String, java.lang.Object[], java.lang.String[])
+     */
+    public Object invoke(AbstractName name, String methodName, Object[] args, String[] types)
+            throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#invoke(java.lang.String, java.lang.String, java.lang.Object[], java.lang.String[])
+     */
+    public Object invoke(String shortName, String methodName, Object[] args, String[] types)
+            throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#invoke(java.lang.Class, java.lang.String, java.lang.Object[], java.lang.String[])
+     */
+    public Object invoke(Class type, String methodName, Object[] args, String[] types) throws GBeanNotFoundException,
+            NoSuchOperationException, InternalKernelException, Exception {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#invoke(java.lang.String, java.lang.Class, java.lang.String, java.lang.Object[], java.lang.String[])
+     */
+    public Object invoke(String shortName, Class type, String methodName, Object[] args, String[] types)
+            throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#invoke(javax.management.ObjectName, java.lang.String)
+     */
+    public Object invoke(ObjectName name, String methodName) throws GBeanNotFoundException, NoSuchOperationException,
+            InternalKernelException, Exception {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#invoke(javax.management.ObjectName, java.lang.String, java.lang.Object[], java.lang.String[])
+     */
+    public Object invoke(ObjectName name, String methodName, Object[] args, String[] types)
+            throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#isLoaded(org.apache.geronimo.gbean.AbstractName)
+     */
+    public boolean isLoaded(AbstractName name) {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#isLoaded(java.lang.String)
+     */
+    public boolean isLoaded(String shortName) {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#isLoaded(java.lang.Class)
+     */
+    public boolean isLoaded(Class type) {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#isLoaded(java.lang.String, java.lang.Class)
+     */
+    public boolean isLoaded(String shortName, Class type) {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#isRunning(org.apache.geronimo.gbean.AbstractName)
+     */
+    public boolean isRunning(AbstractName name) {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#isRunning(java.lang.String)
+     */
+    public boolean isRunning(String shortName) {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#isRunning(java.lang.Class)
+     */
+    public boolean isRunning(Class type) {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#isRunning(java.lang.String, java.lang.Class)
+     */
+    public boolean isRunning(String shortName, Class type) {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#isRunning()
+     */
+    public boolean isRunning() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#listGBeans(org.apache.geronimo.gbean.AbstractNameQuery)
+     */
+    public Set listGBeans(AbstractNameQuery abstractNameQuery) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#listGBeans(java.util.Set)
+     */
+    public Set listGBeans(Set abstractNameQueries) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#listGBeans(javax.management.ObjectName)
+     */
+    public Set listGBeans(ObjectName pattern) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#loadGBean(org.apache.geronimo.gbean.GBeanData, java.lang.ClassLoader)
+     */
+    public void loadGBean(GBeanData gbeanData, ClassLoader classLoader) throws GBeanAlreadyExistsException,
+            InternalKernelException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#registerShutdownHook(java.lang.Runnable)
+     */
+    public void registerShutdownHook(Runnable hook) {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#setAttribute(org.apache.geronimo.gbean.AbstractName, java.lang.String, java.lang.Object)
+     */
+    public void setAttribute(AbstractName name, String attributeName, Object attributeValue)
+            throws GBeanNotFoundException, NoSuchAttributeException, Exception {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#setAttribute(java.lang.String, java.lang.String, java.lang.Object)
+     */
+    public void setAttribute(String shortName, String attributeName, Object attributeValue)
+            throws GBeanNotFoundException, NoSuchAttributeException, Exception {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#setAttribute(java.lang.Class, java.lang.String, java.lang.Object)
+     */
+    public void setAttribute(Class type, String attributeName, Object attributeValue) throws GBeanNotFoundException,
+            NoSuchAttributeException, Exception {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#setAttribute(java.lang.String, java.lang.Class, java.lang.String, java.lang.Object)
+     */
+    public void setAttribute(String shortName, Class type, String attributeName, Object attributeValue)
+            throws GBeanNotFoundException, NoSuchAttributeException, Exception {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#shutdown()
+     */
+    public void shutdown() {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#startGBean(org.apache.geronimo.gbean.AbstractName)
+     */
+    public void startGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException,
+            IllegalStateException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#startGBean(java.lang.String)
+     */
+    public void startGBean(String shortName) throws GBeanNotFoundException, InternalKernelException,
+            IllegalStateException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#startGBean(java.lang.Class)
+     */
+    public void startGBean(Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#startGBean(java.lang.String, java.lang.Class)
+     */
+    public void startGBean(String shortName, Class type) throws GBeanNotFoundException, InternalKernelException,
+            IllegalStateException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#startRecursiveGBean(org.apache.geronimo.gbean.AbstractName)
+     */
+    public void startRecursiveGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException,
+            IllegalStateException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#startRecursiveGBean(java.lang.String)
+     */
+    public void startRecursiveGBean(String shortName) throws GBeanNotFoundException, InternalKernelException,
+            IllegalStateException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#startRecursiveGBean(java.lang.Class)
+     */
+    public void startRecursiveGBean(Class type) throws GBeanNotFoundException, InternalKernelException,
+            IllegalStateException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#startRecursiveGBean(java.lang.String, java.lang.Class)
+     */
+    public void startRecursiveGBean(String shortName, Class type) throws GBeanNotFoundException,
+            InternalKernelException, IllegalStateException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#stopGBean(org.apache.geronimo.gbean.AbstractName)
+     */
+    public void stopGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException,
+            IllegalStateException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#stopGBean(java.lang.String)
+     */
+    public void stopGBean(String shortName) throws GBeanNotFoundException, InternalKernelException,
+            IllegalStateException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#stopGBean(java.lang.Class)
+     */
+    public void stopGBean(Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#stopGBean(java.lang.String, java.lang.Class)
+     */
+    public void stopGBean(String shortName, Class type) throws GBeanNotFoundException, InternalKernelException,
+            IllegalStateException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#unloadGBean(org.apache.geronimo.gbean.AbstractName)
+     */
+    public void unloadGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException,
+            IllegalStateException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#unloadGBean(java.lang.String)
+     */
+    public void unloadGBean(String shortName) throws GBeanNotFoundException, InternalKernelException,
+            IllegalStateException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#unloadGBean(java.lang.Class)
+     */
+    public void unloadGBean(Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#unloadGBean(java.lang.String, java.lang.Class)
+     */
+    public void unloadGBean(String shortName, Class type) throws GBeanNotFoundException, InternalKernelException,
+            IllegalStateException {
+        // TODO Auto-generated method stub
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.kernel.Kernel#unregisterShutdownHook(java.lang.Runnable)
+     */
+    public void unregisterShutdownHook(Runnable hook) {
+        // TODO Auto-generated method stub
+        
+    }
+
+}

Propchange: geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/test/java/org/apache/geronimo/derby/MockKernel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/test/java/org/apache/geronimo/derby/MockKernel.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/branches/2.2/plugins/derby/geronimo-derby/src/test/java/org/apache/geronimo/derby/MockKernel.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/branches/2.2/plugins/derby/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/derby/pom.xml?rev=1032508&view=auto
==============================================================================
--- geronimo/server/branches/2.2/plugins/derby/pom.xml (added)
+++ geronimo/server/branches/2.2/plugins/derby/pom.xml Mon Nov  8 09:44:37 2010
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.geronimo.plugins</groupId>
+        <artifactId>plugins</artifactId>
+        <version>2.2.1-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>derby</artifactId>
+    <name>Geronimo Plugins, Derby</name>
+    <packaging>pom</packaging>
+
+    <description>
+        Derby plugin
+    </description>
+
+    <modules>
+        <module>geronimo-derby</module>
+        <module>derby</module>
+    </modules>
+
+</project>

Propchange: geronimo/server/branches/2.2/plugins/derby/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/branches/2.2/plugins/derby/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/branches/2.2/plugins/derby/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: geronimo/server/branches/2.2/plugins/monitoring/agent-ds/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/monitoring/agent-ds/src/main/plan/plan.xml?rev=1032508&r1=1032507&r2=1032508&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/monitoring/agent-ds/src/main/plan/plan.xml (original)
+++ geronimo/server/branches/2.2/plugins/monitoring/agent-ds/src/main/plan/plan.xml Mon Nov  8 09:44:37 2010
@@ -28,8 +28,8 @@
                 <connectiondefinition-instance>
                     <name>jdbc/ActiveDS</name>
                     <config-property-setting name="CreateDatabase">true</config-property-setting>
-                    <config-property-setting name="Password">monitor</config-property-setting>
-                    <config-property-setting name="UserName">monitor</config-property-setting>
+                    <config-property-setting name="Password">manager</config-property-setting>
+                    <config-property-setting name="UserName">dbadmin</config-property-setting>
                     <config-property-setting name="DatabaseName">ActiveMRCDB</config-property-setting>
                     <connectionmanager>
                         <local-transaction/>
@@ -47,8 +47,8 @@
                 <connectiondefinition-instance>
                     <name>jdbc/ArchiveDS</name>
                     <config-property-setting name="CreateDatabase">true</config-property-setting>
-                    <config-property-setting name="Password">monitor</config-property-setting>
-                    <config-property-setting name="UserName">monitor</config-property-setting>
+                    <config-property-setting name="Password">manager</config-property-setting>
+                    <config-property-setting name="UserName">dbadmin</config-property-setting>
                     <config-property-setting name="DatabaseName">ArchiveMRCDB</config-property-setting>
                     <connectionmanager>
                         <local-transaction/>

Modified: geronimo/server/branches/2.2/plugins/monitoring/mconsole-ds/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/monitoring/mconsole-ds/src/main/plan/plan.xml?rev=1032508&r1=1032507&r2=1032508&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/monitoring/mconsole-ds/src/main/plan/plan.xml (original)
+++ geronimo/server/branches/2.2/plugins/monitoring/mconsole-ds/src/main/plan/plan.xml Mon Nov  8 09:44:37 2010
@@ -27,7 +27,8 @@
                 <connectiondefinition-instance>
                     <name>MonitoringClientDS</name>
                     <config-property-setting name="CreateDatabase">true</config-property-setting>
-                    <config-property-setting name="UserName">app</config-property-setting>
+                    <config-property-setting name="Password">manager</config-property-setting>
+                    <config-property-setting name="UserName">dbadmin</config-property-setting>
                     <config-property-setting name="DatabaseName">MonitoringClientDB</config-property-setting>
                     <connectionmanager>
                         <local-transaction/>
@@ -41,7 +42,8 @@
                 <connectiondefinition-instance>
                     <name>NoTxMonitoringClientDS</name>
                     <config-property-setting name="CreateDatabase">true</config-property-setting>
-                    <config-property-setting name="UserName">app</config-property-setting>
+                    <config-property-setting name="Password">manager</config-property-setting>
+                    <config-property-setting name="UserName">dbadmin</config-property-setting>
                     <config-property-setting name="DatabaseName">MonitoringClientDB</config-property-setting>
                     <connectionmanager>
                         <no-transaction/>

Modified: geronimo/server/branches/2.2/plugins/system-database/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/system-database/pom.xml?rev=1032508&r1=1032507&r2=1032508&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/system-database/pom.xml (original)
+++ geronimo/server/branches/2.2/plugins/system-database/pom.xml Mon Nov  8 09:44:37 2010
@@ -37,7 +37,7 @@
     </description>
 
     <modules>
-        <module>geronimo-derby</module>
+        <!--module>geronimo-derby</module-->
         <module>system-database</module>
         <module>sysdb-portlets</module>
         <module>sysdb-console-jetty</module>

Modified: geronimo/server/branches/2.2/plugins/system-database/sysdb-console-jetty/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/system-database/sysdb-console-jetty/pom.xml?rev=1032508&r1=1032507&r2=1032508&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/system-database/sysdb-console-jetty/pom.xml (original)
+++ geronimo/server/branches/2.2/plugins/system-database/sysdb-console-jetty/pom.xml Mon Nov  8 09:44:37 2010
@@ -128,12 +128,6 @@
 
         <dependency>
             <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-derby</artifactId>
-            <version>${version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
             <artifactId>geronimo-test-ddbean</artifactId>
             <version>${version}</version>
         </dependency>

Modified: geronimo/server/branches/2.2/plugins/system-database/sysdb-console-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/system-database/sysdb-console-tomcat/pom.xml?rev=1032508&r1=1032507&r2=1032508&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/system-database/sysdb-console-tomcat/pom.xml (original)
+++ geronimo/server/branches/2.2/plugins/system-database/sysdb-console-tomcat/pom.xml Mon Nov  8 09:44:37 2010
@@ -127,12 +127,6 @@
 
         <dependency>
             <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-derby</artifactId>
-            <version>${version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
             <artifactId>geronimo-test-ddbean</artifactId>
             <version>${version}</version>
         </dependency>

Modified: geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/DBViewerPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/DBViewerPortlet.java?rev=1032508&r1=1032507&r2=1032508&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/DBViewerPortlet.java (original)
+++ geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/DBViewerPortlet.java Mon Nov  8 09:44:37 2010
@@ -137,9 +137,9 @@ public class DBViewerPortlet extends Bas
         if (LISTTBLS_ACTION.equals(action)) {
             renderRequest.setAttribute("db", db);
             renderRequest.setAttribute("viewTables", viewTables);
-            renderRequest.setAttribute("ds", DerbyConnectionUtil
-                    .getDataSourceForDataBaseName(db));
-
+            renderRequest.setAttribute("ds", DerbyConnectionUtil.getDataSourceForDataBaseName(db));
+            renderRequest.setAttribute("userName", DerbyConnectionUtil.getDerbyConnectionUsername());
+            renderRequest.setAttribute("userPassword", DerbyConnectionUtil.getDerbyConnectionUserPassword());
             if (WindowState.NORMAL.equals(renderRequest.getWindowState())) {
             	listTablesView.include(renderRequest, renderResponse);
             } else {
@@ -149,12 +149,13 @@ public class DBViewerPortlet extends Bas
             renderRequest.setAttribute("db", db);
             renderRequest.setAttribute("tbl", tbl);
             renderRequest.setAttribute("viewTables", viewTables);
-            renderRequest.setAttribute("ds", DerbyConnectionUtil
-                    .getDataSourceForDataBaseName(db));
+            renderRequest.setAttribute("ds", DerbyConnectionUtil.getDataSourceForDataBaseName(db));
+            renderRequest.setAttribute("userName", DerbyConnectionUtil.getDerbyConnectionUsername());
+            renderRequest.setAttribute("userPassword", DerbyConnectionUtil.getDerbyConnectionUserPassword());
             if (WindowState.NORMAL.equals(renderRequest.getWindowState())) {
-            	viewTableContentsView.include(renderRequest, renderResponse);
+                viewTableContentsView.include(renderRequest, renderResponse);
             } else {
-            	viewTableContentsMaximizedView.include(renderRequest, renderResponse);
+                viewTableContentsMaximizedView.include(renderRequest, renderResponse);
             }
         } else {
             renderRequest.setAttribute("databases", helper

Modified: geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/DerbyConnectionUtil.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/DerbyConnectionUtil.java?rev=1032508&r1=1032507&r2=1032508&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/DerbyConnectionUtil.java (original)
+++ geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/DerbyConnectionUtil.java Mon Nov  8 09:44:37 2010
@@ -28,12 +28,15 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.geronimo.console.util.KernelManagementHelper;
 import org.apache.geronimo.console.util.ManagementHelper;
+import org.apache.geronimo.console.util.PortletManager;
 import org.apache.geronimo.derby.DerbySystemGBean;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.KernelRegistry;
+import org.apache.geronimo.kernel.NoSuchAttributeException;
 import org.apache.geronimo.management.JCAManagedConnectionFactory;
 import org.apache.geronimo.management.geronimo.ResourceAdapterModule;
 
@@ -68,6 +71,12 @@ public class DerbyConnectionUtil {
     
     private static AbstractName SYSTEM_DATASOURCE_NAME = null;
     
+    private static final String DERBYNETWORK_GBEAN_NAME = "DerbyNetwork";
+    
+    private static final String DERBYNETWORK_GBEAN_ATTRIBUTE_USERNAME = "userName";
+    
+    private static final String DERBYNETWORK_GBEAN_ATTRIBUTE_USERPASSWORD = "userPassword";
+    
     static {
         try {
             log.debug("Looking up system datasource name...");
@@ -133,8 +142,38 @@ public class DerbyConnectionUtil {
         // because it is not binded to our JNDI Context.
         if (SYSTEM_DB.equalsIgnoreCase(dbName)) {
             return getSystemDBConnection();
-        } else {
-            return DriverManager.getConnection(protocol + dbName + properties);
+        } else {        	
+            String userName = getDerbyConnectionUsername();
+            String password = getDerbyConnectionUserPassword();
+            return DriverManager.getConnection(protocol + dbName + properties + ";user=" + userName + ";password="
+                    + password);
+        }
+    }
+
+    /**
+     * Get user name of Derby connection
+     */
+    
+    public static String getDerbyConnectionUsername() {
+
+        try {
+            return (String) PortletManager.getKernel().getAttribute(DERBYNETWORK_GBEAN_NAME,
+                    DERBYNETWORK_GBEAN_ATTRIBUTE_USERNAME);
+        } catch (Exception e) {
+            return null;
+        }
+    }
+    
+    /**
+     * Get user password of Derby connection
+     */
+
+    public static String getDerbyConnectionUserPassword() {
+        try {
+            return (String) PortletManager.getKernel().getAttribute(DERBYNETWORK_GBEAN_NAME,
+                    DERBYNETWORK_GBEAN_ATTRIBUTE_USERPASSWORD);
+        } catch (Exception e) {
+            return null;
         }
     }
 

Modified: geronimo/server/branches/2.2/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.2/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/RunSQLPortlet.java?rev=1032508&r1=1032507&r2=1032508&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/RunSQLPortlet.java (original)
+++ geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/internaldb/RunSQLPortlet.java Mon Nov  8 09:44:37 2010
@@ -133,6 +133,8 @@ 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 ((action != null) && (action.trim().length() > 0)) {
             //set action to null so that subsequent renders of portlet

Modified: geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/listTables.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/listTables.jsp?rev=1032508&r1=1032507&r2=1032508&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/listTables.jsp (original)
+++ geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/internaldb/listTables.jsp Mon Nov  8 09:44:37 2010
@@ -30,8 +30,8 @@
       var="ds"
       driver="org.apache.derby.jdbc.EmbeddedDriver"
       url="jdbc:derby:${db};create=true"
-      user=""
-      password=""
+      user="${userName}"
+      password="${userPassword}"
     />
 </c:if>
 



Mime
View raw message