geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r661502 - in /geronimo/samples/trunk/samples/timereport: ./ timereport-ear/ timereport-jetty/ timereport-jetty/src/main/plan/ timereport-tomcat/ timereport-tomcat/src/main/plan/ timereport-war/src/main/webapp/WEB-INF/
Date Thu, 29 May 2008 22:09:24 GMT
Author: djencks
Date: Thu May 29 15:09:24 2008
New Revision: 661502

URL: http://svn.apache.org/viewvc?rev=661502&view=rev
Log:
timereport sample cleanup.  Install realm. don't use an ear when a war will do. Use the db
pool for sql realm.

Added:
    geronimo/samples/trunk/samples/timereport/timereport-war/src/main/webapp/WEB-INF/TimeReportDB.sql
      - copied unchanged from r660585, geronimo/samples/trunk/samples/timereport/timereport-ear/src/main/resources/TimeReportDB.sql
Removed:
    geronimo/samples/trunk/samples/timereport/timereport-ear/
Modified:
    geronimo/samples/trunk/samples/timereport/pom.xml
    geronimo/samples/trunk/samples/timereport/timereport-jetty/pom.xml
    geronimo/samples/trunk/samples/timereport/timereport-jetty/src/main/plan/plan.xml
    geronimo/samples/trunk/samples/timereport/timereport-tomcat/pom.xml
    geronimo/samples/trunk/samples/timereport/timereport-tomcat/src/main/plan/plan.xml
    geronimo/samples/trunk/samples/timereport/timereport-war/src/main/webapp/WEB-INF/geronimo-web.xml

Modified: geronimo/samples/trunk/samples/timereport/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/timereport/pom.xml?rev=661502&r1=661501&r2=661502&view=diff
==============================================================================
--- geronimo/samples/trunk/samples/timereport/pom.xml (original)
+++ geronimo/samples/trunk/samples/timereport/pom.xml Thu May 29 15:09:24 2008
@@ -40,7 +40,6 @@
     
    <modules>
         <module>timereport-war</module>
-        <module>timereport-ear</module>
         <module>timereport-jetty</module>
         <module>timereport-tomcat</module>
     </modules>

Modified: geronimo/samples/trunk/samples/timereport/timereport-jetty/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/timereport/timereport-jetty/pom.xml?rev=661502&r1=661501&r2=661502&view=diff
==============================================================================
--- geronimo/samples/trunk/samples/timereport/timereport-jetty/pom.xml (original)
+++ geronimo/samples/trunk/samples/timereport/timereport-jetty/pom.xml Thu May 29 15:09:24
2008
@@ -40,9 +40,9 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.geronimo.samples</groupId>
-            <artifactId>timereport-ear</artifactId>
+            <artifactId>timereport-war</artifactId>
             <version>${version}</version>
-            <type>ear</type>
+            <type>war</type>
             <scope>provided</scope>
         </dependency>
         <dependency>
@@ -103,9 +103,9 @@
                     </deploymentConfigs>
                     <module>
                         <groupId>org.apache.geronimo.samples</groupId>
-                        <artifactId>timereport-ear</artifactId>
+                        <artifactId>timereport-war</artifactId>
                         <version>${version}</version>
-                        <type>ear</type>
+                        <type>war</type>
                     </module>
                     <useMavenDependencies>
                         <value>true</value>

Modified: geronimo/samples/trunk/samples/timereport/timereport-jetty/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/timereport/timereport-jetty/src/main/plan/plan.xml?rev=661502&r1=661501&r2=661502&view=diff
==============================================================================
--- geronimo/samples/trunk/samples/timereport/timereport-jetty/src/main/plan/plan.xml (original)
+++ geronimo/samples/trunk/samples/timereport/timereport-jetty/src/main/plan/plan.xml Thu
May 29 15:09:24 2008
@@ -19,6 +19,48 @@
 -->
 
 <!-- $Rev: 497879 $ $Date: 2007-01-19 12:11:01 -0500 (Fri, 19 Jan 2007) $ -->
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.2">
-   
-</application>
+<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
+
+    <context-root>/timereport</context-root>
+
+    <security-realm-name>TimeReportRealm</security-realm-name>
+
+    <security>
+        <default-principal realm-name="TimeReportRealm">
+            <principal name="anonymous" class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal"/>
+        </default-principal>
+        <role-mappings>
+            <role role-name="employee">
+                <realm realm-name="TimeReportRealm">
+                    <principal name="EmployeeGroup" class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"/>
+                </realm>
+                <realm realm-name="TimeReportRealm">
+                    <principal name="ManagerGroup" class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"/>
+                </realm>
+            </role>
+            <role role-name="manager">
+                <realm realm-name="TimeReportRealm">
+                    <principal name="ManagerGroup" class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"/>
+                </realm>
+            </role>
+        </role-mappings>
+    </security>
+
+    <gbean name="TimeReportRealm" class="org.apache.geronimo.security.realm.GenericSecurityRealm">
+        <attribute name="realmName">TimeReportRealm</attribute>
+        <reference name="ServerInfo">
+            <name>ServerInfo</name>
+        </reference>
+        <xml-reference name="LoginModuleConfiguration">
+            <log:login-config xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-1.1">
+                <log:login-module control-flag="REQUIRED" wrap-principals="false">
+                    <log:login-domain-name>TimeReportRealm</log:login-domain-name>
+                    <log:login-module-class>org.apache.geronimo.security.realm.providers.SQLLoginModule</log:login-module-class>
+                    <log:option name="dataSourceName">SampleNoTxDatasource</log:option>
+                    <log:option name="userSelect">select userid, password from users
where userid=?</log:option>
+                    <log:option name="groupSelect">select userid, groupname from usergroups
where userid=?</log:option>
+                </log:login-module>
+            </log:login-config>
+        </xml-reference>
+    </gbean>
+</web-app>

Modified: geronimo/samples/trunk/samples/timereport/timereport-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/timereport/timereport-tomcat/pom.xml?rev=661502&r1=661501&r2=661502&view=diff
==============================================================================
--- geronimo/samples/trunk/samples/timereport/timereport-tomcat/pom.xml (original)
+++ geronimo/samples/trunk/samples/timereport/timereport-tomcat/pom.xml Thu May 29 15:09:24
2008
@@ -40,9 +40,9 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.geronimo.samples</groupId>
-            <artifactId>timereport-ear</artifactId>
+            <artifactId>timereport-war</artifactId>
             <version>${version}</version>
-            <type>ear</type>
+            <type>war</type>
             <scope>provided</scope>
         </dependency>
         <dependency>
@@ -103,9 +103,9 @@
                     </deploymentConfigs>
                     <module>
                         <groupId>org.apache.geronimo.samples</groupId>
-                        <artifactId>timereport-ear</artifactId>
+                        <artifactId>timereport-war</artifactId>
                         <version>${version}</version>
-                        <type>ear</type>
+                        <type>war</type>
                     </module>
                     <useMavenDependencies>
                         <value>true</value>

Modified: geronimo/samples/trunk/samples/timereport/timereport-tomcat/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/timereport/timereport-tomcat/src/main/plan/plan.xml?rev=661502&r1=661501&r2=661502&view=diff
==============================================================================
--- geronimo/samples/trunk/samples/timereport/timereport-tomcat/src/main/plan/plan.xml (original)
+++ geronimo/samples/trunk/samples/timereport/timereport-tomcat/src/main/plan/plan.xml Thu
May 29 15:09:24 2008
@@ -19,6 +19,48 @@
 -->
 
 <!-- $Rev: 497879 $ $Date: 2007-01-19 12:11:01 -0500 (Fri, 19 Jan 2007) $ -->
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.2">
-   
-</application>
+<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
+
+    <context-root>/timereport</context-root>
+
+    <security-realm-name>TimeReportRealm</security-realm-name>
+
+    <security>
+        <default-principal realm-name="TimeReportRealm">
+            <principal name="anonymous" class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal"/>
+        </default-principal>
+        <role-mappings>
+            <role role-name="employee">
+                <realm realm-name="TimeReportRealm">
+                    <principal name="EmployeeGroup" class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"/>
+                </realm>
+                <realm realm-name="TimeReportRealm">
+                    <principal name="ManagerGroup" class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"/>
+                </realm>
+            </role>
+            <role role-name="manager">
+                <realm realm-name="TimeReportRealm">
+                    <principal name="ManagerGroup" class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"/>
+                </realm>
+            </role>
+        </role-mappings>
+    </security>
+
+    <gbean name="TimeReportRealm" class="org.apache.geronimo.security.realm.GenericSecurityRealm">
+        <attribute name="realmName">TimeReportRealm</attribute>
+        <reference name="ServerInfo">
+            <name>ServerInfo</name>
+        </reference>
+        <xml-reference name="LoginModuleConfiguration">
+            <log:login-config xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-1.1">
+                <log:login-module control-flag="REQUIRED" wrap-principals="false">
+                    <log:login-domain-name>TimeReportRealm</log:login-domain-name>
+                    <log:login-module-class>org.apache.geronimo.security.realm.providers.SQLLoginModule</log:login-module-class>
+                    <log:option name="dataSourceName">SampleNoTxDatasource</log:option>
+                    <log:option name="userSelect">select userid, password from users
where userid=?</log:option>
+                    <log:option name="groupSelect">select userid, groupname from usergroups
where userid=?</log:option>
+                </log:login-module>
+            </log:login-config>
+        </xml-reference>
+    </gbean>
+</web-app>

Modified: geronimo/samples/trunk/samples/timereport/timereport-war/src/main/webapp/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/timereport/timereport-war/src/main/webapp/WEB-INF/geronimo-web.xml?rev=661502&r1=661501&r2=661502&view=diff
==============================================================================
--- geronimo/samples/trunk/samples/timereport/timereport-war/src/main/webapp/WEB-INF/geronimo-web.xml
(original)
+++ geronimo/samples/trunk/samples/timereport/timereport-war/src/main/webapp/WEB-INF/geronimo-web.xml
Thu May 29 15:09:24 2008
@@ -19,47 +19,57 @@
 -->
 <web-app
         xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
-        
-        <environment>
-                <moduleId>
-                        <groupId>${pom.groupId}</groupId>
-                        <artifactId>${pom.artifactId}</artifactId>
-                        <version>${version}</version> 
-                        <type>war</type>
-                </moduleId>             
-        </environment>
-                
-        <context-root>/timereport</context-root>
-        
-        <security-realm-name>TimeReportRealm</security-realm-name>
-        
-        <security>
-                <default-principal realm-name="TimeReportRealm">
-                        <principal name="anonymous"
-                                   class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal"
-                                   />
-                </default-principal>
-                <role-mappings>                 
-                        <role role-name="employee">
-                                <realm realm-name="TimeReportRealm">
-                                        <principal name="EmployeeGroup"
-                                           class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"
-                                        />
-                                </realm>
-                                <realm realm-name="TimeReportRealm">
-                                        <principal name="ManagerGroup"
-                                           class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"
-                                        />                                      
-                                </realm>
-                        </role>
-                        <role role-name="manager">
-                                <realm realm-name="TimeReportRealm">
-                                        <principal name="ManagerGroup"
-                                           class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"
-                                        />                                      
-                                </realm>                                          
                     
-                        </role>
-                </role-mappings>
+
+    <environment>
+        <moduleId>
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>${pom.artifactId}</artifactId>
+            <version>${version}</version>
+            <type>war</type>
+        </moduleId>
+    </environment>
+
+    <context-root>/timereport</context-root>
+
+    <security-realm-name>TimeReportRealm</security-realm-name>
+
+    <security>
+        <default-principal realm-name="TimeReportRealm">
+            <principal name="anonymous" class="org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal"/>
+        </default-principal>
+        <role-mappings>
+            <role role-name="employee">
+                <realm realm-name="TimeReportRealm">
+                    <principal name="EmployeeGroup" class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"/>
+                </realm>
+                <realm realm-name="TimeReportRealm">
+                    <principal name="ManagerGroup" class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"/>
+                </realm>
+            </role>
+            <role role-name="manager">
+                <realm realm-name="TimeReportRealm">
+                    <principal name="ManagerGroup" class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"/>
+                </realm>
+            </role>
+        </role-mappings>
     </security>
-    
+
+    <gbean name="TimeReportRealm" class="org.apache.geronimo.security.realm.GenericSecurityRealm">
+        <attribute name="realmName">TimeReportRealm</attribute>
+        <reference name="ServerInfo">
+            <name>ServerInfo</name>
+        </reference>
+        <xml-reference name="LoginModuleConfiguration">
+            <log:login-config xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-1.1">
+                <log:login-module control-flag="REQUIRED" wrap-principals="false">
+                    <log:login-domain-name>TimeReportRealm</log:login-domain-name>
+                    <log:login-module-class>org.apache.geronimo.security.realm.providers.SQLLoginModule</log:login-module-class>
+                    <log:option name="dataSourceName">SampleNoTxDatasource</log:option>
+                    <log:option name="userSelect">select userid, password from users
where userid=?</log:option>
+                    <log:option name="groupSelect">select userid, groupname from usergroups
where userid=?</log:option>
+                </log:login-module>
+            </log:login-config>
+        </xml-reference>
+    </gbean>
+
 </web-app>



Mime
View raw message