You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jb...@apache.org on 2008/06/02 17:05:26 UTC
svn commit: r662455 - in /geronimo/samples/branches/2.1/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/
Author: jbohn
Date: Mon Jun 2 08:05:26 2008
New Revision: 662455
URL: http://svn.apache.org/viewvc?rev=662455&view=rev
Log:
complete merge of 661502 and 661518 from trunk as not all was included in 661834 - timereport sample cleanup. Install realm. don't use an ear when a war will do. Use the db pool for sql realm. - mostly reformatting, also include SampleDatabase dependency
Added:
geronimo/samples/branches/2.1/samples/timereport/timereport-war/src/main/webapp/WEB-INF/TimeReportDB.sql
- copied unchanged from r661502, geronimo/samples/trunk/samples/timereport/timereport-war/src/main/webapp/WEB-INF/TimeReportDB.sql
Removed:
geronimo/samples/branches/2.1/samples/timereport/timereport-ear/
Modified:
geronimo/samples/branches/2.1/samples/timereport/pom.xml
geronimo/samples/branches/2.1/samples/timereport/timereport-jetty/pom.xml
geronimo/samples/branches/2.1/samples/timereport/timereport-jetty/src/main/plan/plan.xml
geronimo/samples/branches/2.1/samples/timereport/timereport-tomcat/pom.xml
geronimo/samples/branches/2.1/samples/timereport/timereport-tomcat/src/main/plan/plan.xml
Modified: geronimo/samples/branches/2.1/samples/timereport/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/timereport/pom.xml?rev=662455&r1=662454&r2=662455&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/timereport/pom.xml (original)
+++ geronimo/samples/branches/2.1/samples/timereport/pom.xml Mon Jun 2 08:05:26 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/branches/2.1/samples/timereport/timereport-jetty/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/timereport/timereport-jetty/pom.xml?rev=662455&r1=662454&r2=662455&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/timereport/timereport-jetty/pom.xml (original)
+++ geronimo/samples/branches/2.1/samples/timereport/timereport-jetty/pom.xml Mon Jun 2 08:05:26 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/branches/2.1/samples/timereport/timereport-jetty/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/timereport/timereport-jetty/src/main/plan/plan.xml?rev=662455&r1=662454&r2=662455&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/timereport/timereport-jetty/src/main/plan/plan.xml (original)
+++ geronimo/samples/branches/2.1/samples/timereport/timereport-jetty/src/main/plan/plan.xml Mon Jun 2 08:05:26 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/branches/2.1/samples/timereport/timereport-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/timereport/timereport-tomcat/pom.xml?rev=662455&r1=662454&r2=662455&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/timereport/timereport-tomcat/pom.xml (original)
+++ geronimo/samples/branches/2.1/samples/timereport/timereport-tomcat/pom.xml Mon Jun 2 08:05:26 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/branches/2.1/samples/timereport/timereport-tomcat/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/samples/branches/2.1/samples/timereport/timereport-tomcat/src/main/plan/plan.xml?rev=662455&r1=662454&r2=662455&view=diff
==============================================================================
--- geronimo/samples/branches/2.1/samples/timereport/timereport-tomcat/src/main/plan/plan.xml (original)
+++ geronimo/samples/branches/2.1/samples/timereport/timereport-tomcat/src/main/plan/plan.xml Mon Jun 2 08:05:26 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>