Seam SVN: r7804 - in trunk/src/main/org/jboss/seam/annotations/security: management and 1 other directory.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-04-03 03:20:56 -0400 (Thu, 03 Apr 2008)
New Revision: 7804
Added:
trunk/src/main/org/jboss/seam/annotations/security/management/
trunk/src/main/org/jboss/seam/annotations/security/management/RoleGroups.java
trunk/src/main/org/jboss/seam/annotations/security/management/RoleName.java
trunk/src/main/org/jboss/seam/annotations/security/management/UserEnabled.java
trunk/src/main/org/jboss/seam/annotations/security/management/UserFirstName.java
trunk/src/main/org/jboss/seam/annotations/security/management/UserLastName.java
trunk/src/main/org/jboss/seam/annotations/security/management/UserPassword.java
trunk/src/main/org/jboss/seam/annotations/security/management/UserPrincipal.java
trunk/src/main/org/jboss/seam/annotations/security/management/UserRoles.java
Log:
annotations for identity-management entities
Added: trunk/src/main/org/jboss/seam/annotations/security/management/RoleGroups.java
===================================================================
--- trunk/src/main/org/jboss/seam/annotations/security/management/RoleGroups.java (rev 0)
+++ trunk/src/main/org/jboss/seam/annotations/security/management/RoleGroups.java 2008-04-03 07:20:56 UTC (rev 7804)
@@ -0,0 +1,24 @@
+package org.jboss.seam.annotations.security.management;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Flags an entity field or method as representing the group memberships for a role
+ *
+ * @author Shane Bryzak
+ */
+@Target({METHOD,FIELD})
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface RoleGroups
+{
+
+}
Added: trunk/src/main/org/jboss/seam/annotations/security/management/RoleName.java
===================================================================
--- trunk/src/main/org/jboss/seam/annotations/security/management/RoleName.java (rev 0)
+++ trunk/src/main/org/jboss/seam/annotations/security/management/RoleName.java 2008-04-03 07:20:56 UTC (rev 7804)
@@ -0,0 +1,24 @@
+package org.jboss.seam.annotations.security.management;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Flags an entity field or method as representing the name of a role
+ *
+ * @author Shane Bryzak
+ */
+@Target({METHOD,FIELD})
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface RoleName
+{
+
+}
Added: trunk/src/main/org/jboss/seam/annotations/security/management/UserEnabled.java
===================================================================
--- trunk/src/main/org/jboss/seam/annotations/security/management/UserEnabled.java (rev 0)
+++ trunk/src/main/org/jboss/seam/annotations/security/management/UserEnabled.java 2008-04-03 07:20:56 UTC (rev 7804)
@@ -0,0 +1,24 @@
+package org.jboss.seam.annotations.security.management;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Flags an entity field or method as representing the enabled status of a user
+ *
+ * @author Shane Bryzak
+ */
+@Target({METHOD,FIELD})
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface UserEnabled
+{
+
+}
Added: trunk/src/main/org/jboss/seam/annotations/security/management/UserFirstName.java
===================================================================
--- trunk/src/main/org/jboss/seam/annotations/security/management/UserFirstName.java (rev 0)
+++ trunk/src/main/org/jboss/seam/annotations/security/management/UserFirstName.java 2008-04-03 07:20:56 UTC (rev 7804)
@@ -0,0 +1,24 @@
+package org.jboss.seam.annotations.security.management;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Flags an entity field or method as representing the first name of a user
+ *
+ * @author Shane Bryzak
+ */
+@Target({METHOD,FIELD})
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface UserFirstName
+{
+
+}
Added: trunk/src/main/org/jboss/seam/annotations/security/management/UserLastName.java
===================================================================
--- trunk/src/main/org/jboss/seam/annotations/security/management/UserLastName.java (rev 0)
+++ trunk/src/main/org/jboss/seam/annotations/security/management/UserLastName.java 2008-04-03 07:20:56 UTC (rev 7804)
@@ -0,0 +1,24 @@
+package org.jboss.seam.annotations.security.management;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Flags an entity field or method as representing the last name of a user
+ *
+ * @author Shane Bryzak
+ */
+@Target({METHOD,FIELD})
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface UserLastName
+{
+
+}
Added: trunk/src/main/org/jboss/seam/annotations/security/management/UserPassword.java
===================================================================
--- trunk/src/main/org/jboss/seam/annotations/security/management/UserPassword.java (rev 0)
+++ trunk/src/main/org/jboss/seam/annotations/security/management/UserPassword.java 2008-04-03 07:20:56 UTC (rev 7804)
@@ -0,0 +1,24 @@
+package org.jboss.seam.annotations.security.management;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Flags an entity field or method as representing the password for a user
+ *
+ * @author Shane Bryzak
+ */
+@Target({METHOD,FIELD})
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface UserPassword
+{
+ String hash() default "";
+}
Added: trunk/src/main/org/jboss/seam/annotations/security/management/UserPrincipal.java
===================================================================
--- trunk/src/main/org/jboss/seam/annotations/security/management/UserPrincipal.java (rev 0)
+++ trunk/src/main/org/jboss/seam/annotations/security/management/UserPrincipal.java 2008-04-03 07:20:56 UTC (rev 7804)
@@ -0,0 +1,24 @@
+package org.jboss.seam.annotations.security.management;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Flags an entity field or method as representing the principal (username) for a user
+ *
+ * @author Shane Bryzak
+ */
+@Target({METHOD,FIELD})
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface UserPrincipal
+{
+
+}
Added: trunk/src/main/org/jboss/seam/annotations/security/management/UserRoles.java
===================================================================
--- trunk/src/main/org/jboss/seam/annotations/security/management/UserRoles.java (rev 0)
+++ trunk/src/main/org/jboss/seam/annotations/security/management/UserRoles.java 2008-04-03 07:20:56 UTC (rev 7804)
@@ -0,0 +1,24 @@
+package org.jboss.seam.annotations.security.management;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Flags an entity field or method as representing the list of role memberships for a user
+ *
+ * @author Shane Bryzak
+ */
+@Target({METHOD,FIELD})
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface UserRoles
+{
+
+}
16 years, 7 months
Seam SVN: r7803 - in trunk/src: test/unit/org/jboss/seam/test/unit and 1 other directory.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-04-03 03:20:00 -0400 (Thu, 03 Apr 2008)
New Revision: 7803
Modified:
trunk/src/main/org/jboss/seam/security/management/JpaIdentityStore.java
trunk/src/main/org/jboss/seam/security/management/PasswordHash.java
trunk/src/test/unit/org/jboss/seam/test/unit/PasswordHashTest.java
Log:
made PasswordHash a Seam component
Modified: trunk/src/main/org/jboss/seam/security/management/JpaIdentityStore.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/management/JpaIdentityStore.java 2008-04-03 01:03:11 UTC (rev 7802)
+++ trunk/src/main/org/jboss/seam/security/management/JpaIdentityStore.java 2008-04-03 07:20:00 UTC (rev 7803)
@@ -191,7 +191,7 @@
}
else
{
- account.setPasswordHash(PasswordHash.generateHash(password, getAccountSalt(account)));
+ account.setPasswordHash(PasswordHash.instance().generateSaltedHash(password, getAccountSalt(account)));
account.setEnabled(true);
}
@@ -379,7 +379,7 @@
throw new NoSuchUserException("Could not change password, user '" + name + "' does not exist");
}
- account.setPasswordHash(PasswordHash.generateHash(password, getAccountSalt(account)));
+ account.setPasswordHash(PasswordHash.instance().generateSaltedHash(password, getAccountSalt(account)));
mergeAccount(account);
return true;
}
@@ -463,7 +463,7 @@
return false;
}
- String passwordHash = PasswordHash.generateHash(password, getAccountSalt(account));
+ String passwordHash = PasswordHash.instance().generateSaltedHash(password, getAccountSalt(account));
boolean success = passwordHash.equals(account.getPasswordHash());
if (success && Events.exists())
Modified: trunk/src/main/org/jboss/seam/security/management/PasswordHash.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/management/PasswordHash.java 2008-04-03 01:03:11 UTC (rev 7802)
+++ trunk/src/main/org/jboss/seam/security/management/PasswordHash.java 2008-04-03 07:20:00 UTC (rev 7803)
@@ -1,7 +1,16 @@
package org.jboss.seam.security.management;
+import static org.jboss.seam.ScopeType.STATELESS;
+import static org.jboss.seam.annotations.Install.BUILT_IN;
+
import java.security.MessageDigest;
+import org.jboss.seam.Component;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Install;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.intercept.BypassInterceptors;
import org.jboss.seam.util.Base64;
/**
@@ -9,31 +18,36 @@
*
* @author Shane Bryzak
*/
+@Scope(STATELESS)
+@Name("org.jboss.seam.security.management.passwordHash")
+@Install(precedence = BUILT_IN)
+@BypassInterceptors
public class PasswordHash
{
- public enum Algorithm {SHA, MD5}
+ public static final String ALGORITHM_MD5 = "MD5";
+ public static final String ALGORITHM_SHA = "SHA";
+
+ private static final String DEFAULT_ALGORITHM = ALGORITHM_MD5;
- private static final Algorithm DEFAULT_ALGORITHM = Algorithm.MD5;
-
- public static String generateHash(String password)
+ public String generateHash(String password)
{
return generateHash(password, DEFAULT_ALGORITHM);
}
- public static String generateHash(String password, Algorithm algorithm)
+ public String generateHash(String password, String algorithm)
{
- return generateHash(password, algorithm, null);
+ return generateSaltedHash(password, null, algorithm);
}
- public static String generateHash(String password, String saltPhrase)
+ public String generateSaltedHash(String password, String saltPhrase)
{
- return generateHash(password, DEFAULT_ALGORITHM, saltPhrase);
+ return generateSaltedHash(password, saltPhrase, DEFAULT_ALGORITHM);
}
- public static String generateHash(String password, Algorithm algorithm, String saltPhrase)
+ public String generateSaltedHash(String password, String saltPhrase, String algorithm)
{
try {
- MessageDigest md = MessageDigest.getInstance(algorithm.name());
+ MessageDigest md = MessageDigest.getInstance(algorithm);
if (saltPhrase != null)
{
@@ -56,4 +70,9 @@
throw new RuntimeException(e);
}
}
+
+ public static PasswordHash instance()
+ {
+ return (PasswordHash) Component.getInstance(PasswordHash.class, ScopeType.STATELESS);
+ }
}
Modified: trunk/src/test/unit/org/jboss/seam/test/unit/PasswordHashTest.java
===================================================================
--- trunk/src/test/unit/org/jboss/seam/test/unit/PasswordHashTest.java 2008-04-03 01:03:11 UTC (rev 7802)
+++ trunk/src/test/unit/org/jboss/seam/test/unit/PasswordHashTest.java 2008-04-03 07:20:00 UTC (rev 7803)
@@ -1,7 +1,6 @@
package org.jboss.seam.test.unit;
import org.jboss.seam.security.management.PasswordHash;
-import org.jboss.seam.security.management.PasswordHash.Algorithm;
import org.testng.annotations.Test;
public class PasswordHashTest
@@ -9,14 +8,14 @@
@Test
public void testMd5Hash()
{
- String hash = PasswordHash.generateHash("secret", Algorithm.MD5);
+ String hash = PasswordHash.instance().generateHash("secret", "MD5");
assert hash.equals("Xr4ilOzQ4PCOq3aQ0qbuaQ==");
}
@Test
public void testShaHash()
{
- String hash = PasswordHash.generateHash("secret", Algorithm.SHA);
+ String hash = PasswordHash.instance().generateHash("secret", "SHA");
assert hash.equals("5en6G6MezRroT3XKqkdPOmY/BfQ=");
}
}
16 years, 7 months
Seam SVN: r7802 - tags.
by seam-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2008-04-02 21:03:11 -0400 (Wed, 02 Apr 2008)
New Revision: 7802
Added:
tags/JBoss_Seam_2_0_2_CR1/
Log:
Updated tag for 2.0.2.CR1
Copied: tags/JBoss_Seam_2_0_2_CR1 (from rev 7801, branches/Seam_2_0)
16 years, 7 months
Seam SVN: r7801 - tags.
by seam-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2008-04-02 20:58:51 -0400 (Wed, 02 Apr 2008)
New Revision: 7801
Removed:
tags/JBoss_Seam_2_0_2_CR1/
Log:
removing old tag prior to applying updated tag
16 years, 7 months
Seam SVN: r7800 - branches/Seam_2_0.
by seam-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2008-04-02 20:55:28 -0400 (Wed, 02 Apr 2008)
New Revision: 7800
Modified:
branches/Seam_2_0/changelog.txt
branches/Seam_2_0/readme.txt
branches/Seam_2_0/release-process.txt
Log:
Updated for 2.0.2.CR1
Modified: branches/Seam_2_0/changelog.txt
===================================================================
--- branches/Seam_2_0/changelog.txt 2008-04-03 00:53:48 UTC (rev 7799)
+++ branches/Seam_2_0/changelog.txt 2008-04-03 00:55:28 UTC (rev 7800)
@@ -1,6 +1,88 @@
JBoss Seam Changelog
====================
+Release Notes - JBoss Seam - Version 2.0.2.CR1
+
+** Feature Request
+ * [ JBSEAM-2787 ] Add org.jboss.seam.endPageflow and org.jboss.seam.beginPageflow events
+
+** Bug
+ * [ JBSEAM-1735 ] Pages.getStringValuesFromModel throws ConcurrentModificationException
+ * [ JBSEAM-1887 ] Session timeout results in javax.faces.application.ViewExpiredException
+ * [ JBSEAM-1946 ] seam 2.0's persistence:managed-persistence-context not support openjpa
+ * [ JBSEAM-1997 ] ConversationList not refreshed when beginning a long-running conversation
+ * [ JBSEAM-2029 ] Identity.checkEntityPermission() fails for entities mapped using orm.xml or .hbm.xml
+ * [ JBSEAM-2042 ] quartz example doesn't report errors
+ * [ JBSEAM-2086 ] ConcurrentModificationException in Pages.wildcardViewIds
+ * [ JBSEAM-2186 ] RichFaces loses skin with login-required="true" in pages.xml
+ * [ JBSEAM-2306 ] Can't create Quartz Cron job at startup
+ * [ JBSEAM-2309 ] UserTransaction.commit() may throw a RollbackException(), in that case don't try to perform a UserTransaction.rollback()
+ * [ JBSEAM-2359 ] ArrayIndexOutOfBoundsException in org.jboss.seam.contexts.BasicContext.getNames()
+ * [ JBSEAM-2377 ] Conversation Switcher broken when using Explicit Conversations
+ * [ JBSEAM-2447 ] Premature requests causes pages actions problem
+ * [ JBSEAM-2456 ] Exception redirect when in pageflow can cause spurious additional facesmessage
+ * [ JBSEAM-2484 ] async:quartz-dispatcher + serializied fields in an entity = java.lang.ClassNotFoundException: No ClassLoaders found
+ * [ JBSEAM-2493 ] Problems with faces Renderer when used simultaneously from different threads
+ * [ JBSEAM-2544 ] Exception handling for javax.persistence.OptimisticLockException fails the second time
+ * [ JBSEAM-2554 ] pdf docType needs to be serializable
+ * [ JBSEAM-2566 ] Interpolator cannot handle ##{expr}
+ * [ JBSEAM-2571 ] Event observers in overridden components are still being invoked
+ * [ JBSEAM-2574 ] Problem with jquery
+ * [ JBSEAM-2583 ] <s:conversationPropagation type="join" /> seems not creating aq new conversation
+ * [ JBSEAM-2588 ] s:conversationPropagation breaks a4j:commandButton
+ * [ JBSEAM-2593 ] Cap and Join not working correctly in UIStroke
+ * [ JBSEAM-2604 ] parsing page.xml is not thread safe
+ * [ JBSEAM-2606 ] Natural conversation id already in use in seam-bay example
+ * [ JBSEAM-2609 ] Locking issue for ConversationEntry when using Conversation.instance().leave()
+ * [ JBSEAM-2615 ] POJO does not get outjected in the page context as expected
+ * [ JBSEAM-2621 ] debug page missing url-encoding for component viewing
+ * [ JBSEAM-2658 ] s:defaultAction only works 1 submit
+ * [ JBSEAM-2660 ] Rename exception context variables
+ * [ JBSEAM-2665 ] Seam 2.0.1 incompatibility with Trinidad
+ * [ JBSEAM-2667 ] Interceptor should call annotation setter with instance, not class
+ * [ JBSEAM-2692 ] Overriding security messages
+ * [ JBSEAM-2693 ] Little documentation error
+ * [ JBSEAM-2698 ] *.page.xml files not loaded in new Tomcat version
+ * [ JBSEAM-2747 ] nextExists on EntityQuery throws exception when maxResults is not set
+ * [ JBSEAM-2751 ] Outjected DataModel looses/forgets wrapped data
+ * [ JBSEAM-2753 ] EclipseClasspathTask creates invalid .classpath when javadocPath exists
+ * [ JBSEAM-2754 ] Images not being resolved
+ * [ JBSEAM-2755 ] Images not being resized for PDF version
+ * [ JBSEAM-2756 ] Many <programlisting>'s are overflowing
+ * [ JBSEAM-2758 ] Update WebSphere chapter with a note about Seam specific EJB's
+ * [ JBSEAM-2768 ] SeamDisc Example Throws Exception When Adding Disc on Artist Screen
+ * [ JBSEAM-2773 ] JPA example on Tomcat 6.X throws a NoClassDefFoundError: org/objectweb/asm/Type
+ * [ JBSEAM-2777 ] Can not build refdoc with 2.0.2-snapshot
+ * [ JBSEAM-2780 ] @Stateless Framework classes not nullifying fields
+ * [ JBSEAM-2781 ] Workaround for NPE in bootstrap/ due to jboss.remoting bug.
+
+** Task
+ * [ JBSEAM-1567 ] Complete documentation for seam-ui
+ * [ JBSEAM-2234 ] Documentation for "Integration Testing with Mock Data" is incomplete
+ * [ JBSEAM-2266 ] WLS doesn't support Servlet 2.5
+ * [ JBSEAM-2372 ] Documentation out of date for PDF support
+ * [ JBSEAM-2491 ] Seam is still using Groovy 1.1 beta, Groovy 1.5 has been released
+ * [ JBSEAM-2555 ] Upgrade to Richfaces 3.1.4
+ * [ JBSEAM-2573 ] Update the seam-gen build scripts for icefaces stub project
+ * [ JBSEAM-2625 ] Avoid rescanning taglib.xml (and logging) for Seam mail rendering
+ * [ JBSEAM-2661 ] Upgrade to latest jfreechart
+ * [ JBSEAM-2701 ] Update readme.txt to point to seamframework.org for more info
+ * [ JBSEAM-2733 ] Documentation of Seam transactions misleading regarding transaction boundaries
+ * [ JBSEAM-2734 ] Build docs from ant refdoc target
+ * [ JBSEAM-2735 ] Move Doc's POM to build dir
+ * [ JBSEAM-2736 ] Compile and resolve includes on chapter modules
+ * [ JBSEAM-2737 ] Use seamframework.org style in Seam docs
+ * [ JBSEAM-2738 ] Output html page per chapter
+ * [ JBSEAM-2739 ] Use full version number in both PDF and HTML docs
+ * [ JBSEAM-2757 ] Mark <programlisting> with role="" to give syntax highlighting
+ * [ JBSEAM-2784 ] Backport of Alex's code about portlet support (From 2.1.0.A1)
+ * [ JBSEAM-2790 ] Remove portal example
+ * [ JBSEAM-2800 ] Upgrade to Drools 4.0.6
+
+** Patch
+ * [ JBSEAM-2770 ] exploded-archives\{project}.ear\lib was not created if lib.dir is overridden
+ * [ JBSEAM-2786 ] Small fixes to the text of the tutorial
+
Release Notes - JBoss Seam - Version 2.0.1.GA
** Bug
Modified: branches/Seam_2_0/readme.txt
===================================================================
--- branches/Seam_2_0/readme.txt 2008-04-03 00:53:48 UTC (rev 7799)
+++ branches/Seam_2_0/readme.txt 2008-04-03 00:55:28 UTC (rev 7800)
@@ -1,6 +1,6 @@
JBoss Seam - Contextual Component framework for Java EE 5
=========================================================
-version 2.0.1.GA, January 2008
+version 2.0.2.CR1, April 2008
This software is distributed under the terms of the FSF Lesser Gnu
Public License (see lgpl.txt).
Modified: branches/Seam_2_0/release-process.txt
===================================================================
--- branches/Seam_2_0/release-process.txt 2008-04-03 00:53:48 UTC (rev 7799)
+++ branches/Seam_2_0/release-process.txt 2008-04-03 00:55:28 UTC (rev 7800)
@@ -1,21 +1,128 @@
Seam Release Process
====================
-
Updating version numbers
------------------------
-* Update the version number embedded in:
- - readme.txt
- - changelog.txt (insert JIRA release notes)
- - build/default.build.properties (you're probably building locally with
- -SNAPSHOT as the qualifer in build.properties, comment it out when building
- for a release)
+* Update the version information:
+ - readme.txt
+ - one place at top including date.
+ - changelog.txt
+ - Generate a JIRA release note report for the release in "text" format
+ - Only "issue types" that have jira's will work
+ - Usually that is (Bug, Feature Request, Task, and Patch)
+ - Check all the issue types one at a time to determine final list.
+ - build/default.build.properties
+ - Change the version numbers as needed
+ - Set the qualifier using a "." ex. ".CR1" or ".GA"
+ - Check that build.properties has the qualifier commented out for the release
+SVN Tagging and Checkout
+------------------------
+* Note: testing can begin prior to official tagging but a complete process should be executed on the tag prior to release.
+* Tag the release (XX as needed)
+ -"svn copy https://svn.jboss.org/repos/seam/XX/XX https://svn.jboss.org/repos/seam/tags/JBoss_Seam_x_x_x_XXX -m "create JBoss_Seam_x_x_x_XXX tag""
+ - ex. "svn copy https://svn.jboss.org/repos/seam/branches/Seam_2_0 https://svn.jboss.org/repos/seam/tags/JBoss_Seam_2_0_2_CR1"
+* In a clean directory checkout the required seam source ( XX as needed)
+ - "svn co https://svn.jboss.org/repos/seam/tags/JBoss_Seam_x_x_x_XXX seam"
+ - ex. "svn co https://svn.jboss.org/repos/seam/tags/JBoss_Seam_2_0_2_CR1 seam"
+
+Building and Checking Diff
+--------------------------
+* Run "mkdir ../releaselogs"
+* Initial build and test suite execution
+ - run initial build to get dependencies and other requirements
+ - run "ant > ../releaselogs/x.x.x.XX.initbuild.txt"
+ - edit build.properties and un-comment "validate.xml = true"
+ - run "ant cleanall testall testreport > ../releaselogs/x.x.x.XX.testallreport.txt"
+ - check report/junit-noframes.html
+ - There should be no failures or errors.
+ - run "cp -R test-output ../releaselogs"
+ - run "cp -R test-report ../releaselogs"
+ - comment out "validate.xml = true" in build.properties
+* Create the distribution build
+ - run "ant cleanall dist > ../releaselogs/x.x.x.XX.distbuild.txt"
+ - Use the dist build for all example tests
+* Diff the zip, gz, and exploded version of the build
+ - ex.
+ - explode the zip and gz into a tmp dir
+ - cp distribution directory into the tmp dir
+ - in tmp dir run:
+ - "diff -r ./gz/. ./zip/."
+ - "diff -r ./gz/. ./dir/."
+ - There should be no differences.
+* check that the following files/directories exist in the dist "ls -1"
+bootstrap
+build
+build.properties
+build.xml
+changelog.txt
+doc
+examples
+lgpl.txt
+lib
+mail
+readme.txt
+seam
+seam-gen
+seam-text.g
+seam.bat
+seam2migration.txt
+src
+ui
+
+* check that the following source directories exist in the dist "ls -1 src"
+debug
+gen
+ioc
+jbas5
+mail
+main
+pdf
+remoting
+test
+
+* check that the following examples exist in the dist "ls -1 examples"
+blog
+booking
+build.xml
+contactlist
+drools
+dvdstore
+groovybooking
+hibernate
+icefaces
+itext
+jee5
+jpa
+mail
+messages
+nestedbooking
+numberguess
+quartz
+readme.txt
+registration
+remoting
+seam-examples.html
+seambay
+seamdiscs
+seampay
+seamspace
+spring
+todo
+ui
+wiki
+
+* [future] jar, archive, dependency report
+* [future] directory structure report
+
Tests
-----
-* "ant cleanall testall testreport" with validate.xml = true in build.properties, check report/junit-noframes.html
+* edit the $dist/build.properties and set the jboss.home and tomcat.home
+ - JBoss AS 4.2.2.GA and Tomcat 6.X
+* Test the steps in the readme.txt
+ - this deploys the booking example on JBoss 4.2.2
+ - Sanity check the application
* Sanity check the following example applications on JBoss 4.2.2
- - booking
- dvdstore
- jpa
- hibernate
@@ -23,17 +130,22 @@
- contactlist
- itext
- mail
- - spring
- seamdiscs
+ - remoting/chatroom
+ - blog
* Sanity check the following example applications on Tomcat
- booking
- dvdstore
+ - spring
- jpa
- hibernate
* Sanity check the folowing example applications on GlassFish
- jee5
- jpa
- hibernate
+* Validate /examples/seam-examples.html
+ - ant deploypresentation
+ - check for errors and spot check apps - they were already test above.
Test seam-gen & JBDS
-------------
@@ -73,84 +185,13 @@
- Test generated pages (check hot deployment of Seam components, html)
- Test running unit tests from Eclipse
-
-
-Tag SVN
--------
-* "svn copy trunk tags/JBoss_Seam_x_x_x_XX"
-* "svn commit tags/JBoss_Seam_x_x_x_XX"
-
-Build + Upload
+Final Build + Upload
--------------
* run "ant cleanall dist"
-* check that the following files/directories exist in the dist "ls -1"
-bootstrap
-build
-build.properties
-build.xml
-changelog.txt
-doc
-examples
-lgpl.txt
-lib
-mail
-pom.xml
-readme.txt
-seam
-seam-gen
-seam-text.g
-seam.bat
-seam2migration.txt
-src
-ui
-
-* check that the following source directories exist in the dist "ls -1 src"
-
-debug
-gen
-ioc
-mail
-main
-pdf
-remoting
-test
-
-* check that the following examples exist in the dist "ls -1 examples"
-
-blog
-booking
-build.xml
-contactlist
-drools
-dvdstore
-groovybooking
-hibernate
-icefaces
-itext
-jee5
-jpa
-mail
-messages
-numberguess
-portal
-quartz
-readme.txt
-registration
-remoting
-seam-examples.html
-seambay
-seamdiscs
-seampay
-seamspace
-spring
-todo
-ui
-wiki
-
* upload .zip and .tar.gz to upload.sf.net
* do the sf.net file release stuff
-* Do the release proceedure for maven as described in build/readme.txt
+* Do the release procedure for maven as described in build/readme.txt
* upload the doc directory of the dist to docs.jboss.org
- remember to update the latest/ dir
* update the documentation and download pages on jboss.org
@@ -161,4 +202,3 @@
------------
This step is not needed for every point release:
* upload the booking and dvdstore examples to demo.jboss.com
-
16 years, 7 months
Seam SVN: r7799 - branches/Seam_2_0/examples.
by seam-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2008-04-02 20:53:48 -0400 (Wed, 02 Apr 2008)
New Revision: 7799
Modified:
branches/Seam_2_0/examples/readme.txt
Log:
Updated for 2.0.2.CR1 - and updated links to sfwk.org
Modified: branches/Seam_2_0/examples/readme.txt
===================================================================
--- branches/Seam_2_0/examples/readme.txt 2008-04-03 00:52:26 UTC (rev 7798)
+++ branches/Seam_2_0/examples/readme.txt 2008-04-03 00:53:48 UTC (rev 7799)
@@ -53,9 +53,6 @@
drools/ A version of the number guessing example that
uses Drools with jBPM
-
-portal/ A port of the Seam Hibernate demo to run on
- JBoss Portal
remoting/helloworld/ A trivial example using Ajax
@@ -85,13 +82,13 @@
How to Build and Deploy an Example on JBoss AS
----------------------------------------------
-1. Download and unzip JBoss AS 4.2.1.GA from:
+1. Download and unzip JBoss AS 4.2.2.GA from:
http://labs.jboss.com/jbossas/downloads
2. Make sure you have an up to date version of Seam:
- http://labs.jboss.com/jbossseam/download
+ http://seamframework.org/Download
3. Edit the "build.properties" file and change jboss.home to your
JBoss AS directory (Seam uses the default profile)
@@ -102,7 +99,7 @@
"examples/${example.name}" directory
6. Start JBoss AS by typing "./run.sh" (on Linux/Unix) or "run" (on Windows)
- in the jboss-4.2.1.GA/bin directory
+ in the jboss-4.2.2.GA/bin directory
7. Point your web browser to:
@@ -125,7 +122,7 @@
3. Make sure you have an up to date version of Seam:
- http://labs.jboss.com/jbossseam/download
+ http://seamframework.org/Download
4. Edit the "build.properties" file and change tomcat.home to your
Tomcat directory
16 years, 7 months
Seam SVN: r7798 - branches/Seam_2_0/build.
by seam-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2008-04-02 20:52:26 -0400 (Wed, 02 Apr 2008)
New Revision: 7798
Modified:
branches/Seam_2_0/build/default.build.properties
Log:
Updated for 2.0.2.CR1
Modified: branches/Seam_2_0/build/default.build.properties
===================================================================
--- branches/Seam_2_0/build/default.build.properties 2008-04-03 00:51:29 UTC (rev 7797)
+++ branches/Seam_2_0/build/default.build.properties 2008-04-03 00:52:26 UTC (rev 7798)
@@ -8,7 +8,7 @@
major.version 2
minor.version .0
patchlevel .2
-qualifier -SNAPSHOT
+qualifier .CR1
#
# Other program locations
# -----------------------
16 years, 7 months
Seam SVN: r7797 - trunk/src/main/org/jboss/seam/security.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-04-02 20:51:29 -0400 (Wed, 02 Apr 2008)
New Revision: 7797
Modified:
trunk/src/main/org/jboss/seam/security/Identity.java
Log:
fix logic for login() when silent login occurs beforehand
Modified: trunk/src/main/org/jboss/seam/security/Identity.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/Identity.java 2008-04-02 18:20:09 UTC (rev 7796)
+++ trunk/src/main/org/jboss/seam/security/Identity.java 2008-04-03 00:51:29 UTC (rev 7797)
@@ -60,13 +60,14 @@
public static final String EVENT_LOGGED_OUT = "org.jboss.seam.security.loggedOut";
public static final String EVENT_CREDENTIALS_UPDATED = "org.jboss.seam.security.credentialsUpdated";
public static final String EVENT_REMEMBER_ME = "org.jboss.seam.security.rememberMe";
- public static final String EVENT_ALREADY_LOGGED_IN = "org.jboss.seam.security.alreadyLoggedIn";
+ public static final String EVENT_ALREADY_LOGGED_IN = "org.jboss.seam.security.alreadyLoggedIn";
protected static boolean securityEnabled = true;
public static final String ROLES_GROUP = "Roles";
private static final String LOGIN_TRIED = "org.jboss.seam.security.loginTried";
+ private static final String SILENT_LOGIN = "org.jboss.seam.security.silentLogin";
private static final long serialVersionUID = 3751659008033189259L;
@@ -211,11 +212,20 @@
public String login()
{
try
- {
+ {
if (isLoggedIn(false))
{
+ // If authentication has already occurred during this request via a silent login,
+ // and login() is explicitly called then we still want to raise the LOGIN_SUCCESSFUL event,
+ // and then return.
+ if (Contexts.isEventContextActive() && Contexts.getEventContext().isSet(SILENT_LOGIN))
+ {
+ if (Events.exists()) Events.instance().raiseEvent(EVENT_LOGIN_SUCCESSFUL);
+ return "loggedIn";
+ }
+
if (Events.exists()) Events.instance().raiseEvent(EVENT_ALREADY_LOGGED_IN);
- return "loggedIn";
+ return "loggedIn";
}
authenticate();
@@ -248,7 +258,14 @@
{
try
{
- if (isCredentialsSet()) authenticate();
+ if (isCredentialsSet())
+ {
+ authenticate();
+ if (isLoggedIn(false) && Contexts.isEventContextActive())
+ {
+ Contexts.getEventContext().set(SILENT_LOGIN, true);
+ }
+ }
}
catch (LoginException ex) { }
}
16 years, 7 months
Seam SVN: r7796 - branches/Seam_2_0/seam-gen/build-scripts.
by seam-commits@lists.jboss.org
Author: epbernard
Date: 2008-04-02 14:20:09 -0400 (Wed, 02 Apr 2008)
New Revision: 7796
Modified:
branches/Seam_2_0/seam-gen/build-scripts/build-war.xml
Log:
JBSEAM-2319 Ant 1.7.0 does not detect groovy classes properly
Modified: branches/Seam_2_0/seam-gen/build-scripts/build-war.xml
===================================================================
--- branches/Seam_2_0/seam-gen/build-scripts/build-war.xml 2008-04-02 17:20:37 UTC (rev 7795)
+++ branches/Seam_2_0/seam-gen/build-scripts/build-war.xml 2008-04-02 18:20:09 UTC (rev 7796)
@@ -45,7 +45,7 @@
<mkdir dir="${classes.action.dir}" />
<mkdir dir="${dist.dir}" />
<!-- if a .groovy file is in model or action, set groovy.present -->
- <available property="groovy.present" value="true" file="">
+ <available property="groovy.present" value="true" file="" searchparents="true">
<filepath>
<fileset dir="${src.action.dir}">
<include name="**/*.groovy"/>
16 years, 7 months
Seam SVN: r7795 - trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-04-02 13:20:37 -0400 (Wed, 02 Apr 2008)
New Revision: 7795
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDAO.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDirectory.java
Log:
SQL query optimization for blog entries
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDAO.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDAO.java 2008-04-02 14:16:44 UTC (rev 7794)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDAO.java 2008-04-02 17:20:37 UTC (rev 7795)
@@ -21,9 +21,17 @@
import javax.persistence.EntityManager;
import java.util.List;
+import java.util.Map;
+import java.util.HashMap;
import java.io.Serializable;
+import java.math.BigInteger;
/**
+ * Queries and database operations related to blog entries (mostly aggregation queries).
+ *
+ * TODO: The queries (especially since they are all SQL) should be externalized to a hbm.xml file. However,
+ * building them dynamically here is less duplication for now.
+ *
* @author Christian Bauer
*/
@Name("blogDAO")
@@ -90,33 +98,27 @@
if (day != null) query.setParameter("limitDay", day);
}
- public List<BlogEntry> findBlogEntriesWithCommentCount(WikiDirectory startDir,
+ public List<BlogEntry> findBlogEntriesInDirectory(WikiDirectory startDir,
WikiDocument ignoreDoc,
Pager pager,
Integer year,
Integer month,
Integer day,
- String tag) {
+ String tag,
+ boolean countComments) {
+ final Map<Long, BlogEntry> blogEntryMap = new HashMap<Long, BlogEntry>();
+
StringBuilder queryString = new StringBuilder();
-
queryString.append("select").append(" ");
for (int i = 0; i < getWikiDocumentSQLColumnNames().length; i++) {
queryString.append(getWikiDocumentSQLColumnNames()[i]);
if (i != getWikiDocumentSQLColumnNames().length-1) queryString.append(", ");
}
- queryString.append(", count(c3.NODE_ID) as COMMENT_COUNT").append(" ");
+ queryString.append(", '0' as COMMENT_COUNT").append(" ");
queryString.append(getblogEntryFromClause(tag));
- queryString.append("left outer join WIKI_NODE c1 on doc.NODE_ID = c1.PARENT_NODE_ID").append(" ");
- queryString.append("left outer join WIKI_COMMENT c2 on c1.NODE_ID = c2.NODE_ID").append(" ");
- queryString.append("left outer join WIKI_COMMENT c3 on c2.NS_THREAD = c3.NS_THREAD").append(" ");
queryString.append(getBlogEntryWhereClause(ignoreDoc, year, month, day, tag));
- queryString.append("group by").append(" ");
- for (int i = 0; i < getWikiDocumentSQLColumnNames().length; i++) {
- queryString.append(getWikiDocumentSQLColumnNames()[i]);
- if (i != getWikiDocumentSQLColumnNames().length-1) queryString.append(", ");
- }
queryString.append(" ");
queryString.append("order by doc2.CREATED_ON desc");
@@ -135,15 +137,46 @@
public Object transformTuple(Object[] result, String[] aliases) {
BlogEntry be = new BlogEntry();
be.setEntryDocument( (WikiDocument)result[0]);
- be.setCommentCount( (Long)result[1] );
+ blogEntryMap.put(be.getEntryDocument().getId(), be); // Put in map so we can attach comment count later
return be;
}
public List transformList(List list) { return list; }
}
);
- return (List<BlogEntry>)query.list();
+ List<BlogEntry> result = (List<BlogEntry>)query.list();
+ if (countComments) {
+ // The risk here is that pager.getQueryMaxResults() is too large for the IN() operator of some DBs...
+ StringBuilder commentQueryString = new StringBuilder();
+ commentQueryString.append("select doc.NODE_ID as DOC_ID, count(c3.NODE_ID) as COMMENT_COUNT").append(" ");
+ commentQueryString.append("from WIKI_DOCUMENT doc").append(" ");
+ commentQueryString.append("left outer join WIKI_NODE c1 on doc.NODE_ID = c1.PARENT_NODE_ID").append(" ");
+ commentQueryString.append("left outer join WIKI_COMMENT c2 on c1.NODE_ID = c2.NODE_ID").append(" ");
+ commentQueryString.append("left outer join WIKI_COMMENT c3 on c2.NS_THREAD = c3.NS_THREAD").append(" ");
+ commentQueryString.append("where doc.NODE_ID in (:blogEntriesIds)").append(" ");
+ commentQueryString.append("group by doc.NODE_ID");
+
+ SQLQuery commentQuery = getSession().createSQLQuery(commentQueryString.toString());
+ commentQuery.setComment("Finding comment count for blog entries");
+ commentQuery.addScalar("DOC_ID");
+ commentQuery.addScalar("COMMENT_COUNT");
+ commentQuery.setParameterList("blogEntriesIds", blogEntryMap.keySet());
+
+ commentQuery.setResultTransformer(
+ new ResultTransformer() {
+ public Object transformTuple(Object[] result, String[] aliases) {
+ BlogEntry be = blogEntryMap.get( ((BigInteger)result[0]).longValue() );
+ be.setCommentCount( ((BigInteger)result[1]).longValue() );
+ return null;
+ }
+ public List transformList(List list) { return list; }
+ }
+ );
+ commentQuery.list();
+ }
+
+ return result;
}
public Long countBlogEntries(WikiDirectory startDir, WikiDocument ignoreDoc, Integer year, Integer month, Integer day, String tag) {
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDirectory.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDirectory.java 2008-04-02 14:16:44 UTC (rev 7794)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/blogdirectory/BlogDirectory.java 2008-04-02 17:20:37 UTC (rev 7795)
@@ -91,12 +91,13 @@
return;
}
blogEntries =
- blogDAO.findBlogEntriesWithCommentCount(
+ blogDAO.findBlogEntriesInDirectory(
currentDirectory,
currentDocument,
pager,
year, month, day,
- tag
+ tag,
+ true
);
}
@@ -110,12 +111,12 @@
@Observer(value = {"Macro.render.blogRecentEntries", "PersistenceContext.filterReset"}, create = false)
public void loadRecentBlogEntries() {
List<BlogEntry> recentBlogEntriesNonAggregated =
- blogDAO.findBlogEntriesWithCommentCount(
+ blogDAO.findBlogEntriesInDirectory(
currentDirectory,
currentDocument,
new Pager(prefs.getRecentEntriesItems()),
null, null, null,
- null
+ null, false
);
// Now aggregate by day
16 years, 7 months