Seam SVN: r9576 - in trunk/src/main/org/jboss/seam: init and 1 other directory.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-11-16 02:01:39 -0500 (Sun, 16 Nov 2008)
New Revision: 9576
Modified:
trunk/src/main/org/jboss/seam/core/Init.java
trunk/src/main/org/jboss/seam/init/Initialization.java
Log:
JBSEAM-3701
Modified: trunk/src/main/org/jboss/seam/core/Init.java
===================================================================
--- trunk/src/main/org/jboss/seam/core/Init.java 2008-11-16 06:58:39 UTC (rev 9575)
+++ trunk/src/main/org/jboss/seam/core/Init.java 2008-11-16 07:01:39 UTC (rev 9576)
@@ -101,6 +101,7 @@
private Map<Class, String> convertersByClass = new HashMap<Class, String>();
private long timestamp;
+ private long warTimestamp;
private File[] hotDeployPaths;
public static Init instance()
@@ -550,6 +551,16 @@
{
this.timestamp = timestamp;
}
+
+ public long getWarTimestamp()
+ {
+ return warTimestamp;
+ }
+
+ public void setWarTimestamp(long warTimestamp)
+ {
+ this.warTimestamp = warTimestamp;
+ }
public boolean isTransactionManagementEnabled()
{
Modified: trunk/src/main/org/jboss/seam/init/Initialization.java
===================================================================
--- trunk/src/main/org/jboss/seam/init/Initialization.java 2008-11-16 06:58:39 UTC (rev 9575)
+++ trunk/src/main/org/jboss/seam/init/Initialization.java 2008-11-16 07:01:39 UTC (rev 9576)
@@ -778,12 +778,17 @@
WarRootDeploymentStrategy warRootDeploymentStrategy = new WarRootDeploymentStrategy(Thread.currentThread().getContextClassLoader(), warRoot);
warRootDeploymentStrategy.scan();
- Pages pages = (Pages) ServletLifecycle.getServletContext().getAttribute(Seam.getComponentName(Pages.class));
- if (pages!= null) {
- pages.initialize(warRootDeploymentStrategy.getDotPageDotXmlFileNames());
+ if (init.getWarTimestamp() < warRootDeploymentStrategy.getTimestamp())
+ {
+ Pages pages = (Pages) ServletLifecycle.getServletContext().getAttribute(Seam.getComponentName(Pages.class));
+ if (pages!= null) {
+ pages.initialize(warRootDeploymentStrategy.getDotPageDotXmlFileNames());
+ }
+ ServletLifecycle.getServletContext().removeAttribute( Seam.getComponentName(Exceptions.class) );
+ init.setWarTimestamp(warRootDeploymentStrategy.getTimestamp());
}
- ServletLifecycle.getServletContext().removeAttribute( Seam.getComponentName(Exceptions.class) );
+
}
}
finally
16 years
Seam SVN: r9575 - trunk/src/main/org/jboss/seam/deployment.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-11-16 01:58:39 -0500 (Sun, 16 Nov 2008)
New Revision: 9575
Modified:
trunk/src/main/org/jboss/seam/deployment/FileDescriptor.java
Log:
Fix for hot-deploy
Modified: trunk/src/main/org/jboss/seam/deployment/FileDescriptor.java
===================================================================
--- trunk/src/main/org/jboss/seam/deployment/FileDescriptor.java 2008-11-15 23:22:10 UTC (rev 9574)
+++ trunk/src/main/org/jboss/seam/deployment/FileDescriptor.java 2008-11-16 06:58:39 UTC (rev 9575)
@@ -24,7 +24,11 @@
{
throw new NullPointerException("Name cannot be null, loading from " + classLoader);
}
- this.url = Resources.getResource(name, ServletLifecycle.getServletContext());
+ this.url = classLoader.getResource(name);
+ if (url == null)
+ {
+ this.url = Resources.getResource(name, ServletLifecycle.getServletContext());
+ }
if (this.url == null)
{
throw new NullPointerException("Cannot find URL from classLoader for " + name + ", loading from " + classLoader);
16 years
Seam SVN: r9574 - trunk/seam-gen/test.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-11-15 18:22:10 -0500 (Sat, 15 Nov 2008)
New Revision: 9574
Modified:
trunk/seam-gen/test/readme.txt
Log:
more details
Modified: trunk/seam-gen/test/readme.txt
===================================================================
--- trunk/seam-gen/test/readme.txt 2008-11-15 23:18:39 UTC (rev 9573)
+++ trunk/seam-gen/test/readme.txt 2008-11-15 23:22:10 UTC (rev 9574)
@@ -20,5 +20,10 @@
-Dsun.lang.ClassLoader.allowArraySyntax=true
+Please be sure to use JDK 6 Update 4 or better (>= 1.6.0_04) if you are using
+JDK 6. The Update 4 release upgraded to JAXB 2.1 which removes a problem with
+earlier versions of Sun's JDK 6 which required overriding the JAXB libraries
+using the endorsed directory.
+
To add tests to your project create a TestNG xml descriptor called *Test.xml
(e.g. FooTest.xml) next to your test classes and run ant test.
16 years
Seam SVN: r9573 - trunk/seam-gen/test.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-11-15 18:18:39 -0500 (Sat, 15 Nov 2008)
New Revision: 9573
Modified:
trunk/seam-gen/test/readme.txt
Log:
better details on how to setup tests in Eclipse. Also mention the JDK 6 fix.
Modified: trunk/seam-gen/test/readme.txt
===================================================================
--- trunk/seam-gen/test/readme.txt 2008-11-15 22:33:10 UTC (rev 9572)
+++ trunk/seam-gen/test/readme.txt 2008-11-15 23:18:39 UTC (rev 9573)
@@ -1,9 +1,24 @@
If you want to run tests using the Eclipse TestNG plugin, you'll need to add
-these jars to the top of your TestNG classpath. Using the Run Dialog, select
-xml suite to run, and add /lib/test/jboss-embedded-all.jar,
-/lib/test/hibernate-all.jar, /lib/test/thirdparty-all.jar, /lib/jboss-embedded-api.jar,
-/lib/jboss-deployers-client-spi.jar, /lib/jboss-deployers-core-spi.jar, and
-/bootstrap as the first entries in the User classpath.
+these jars to the top of your TestNG classpath. Using the Run Dialog, select the
+XML suite to run, and select these entries from the project tree:
-To add tests to your project create a TestNG xml descriptor called *Test.xml e.g.
-FooTest.xml next to your test classes and run ant test.
\ No newline at end of file
+/lib/test/jboss-embedded-all.jar
+/lib/test/hibernate-all.jar
+/lib/test/thirdparty-all.jar
+/lib/jboss-embedded-api.jar
+/lib/jboss-deployers-client-spi.jar
+/lib/jboss-deployers-core-spi.jar
+
+You also need to add the Embedded JBoss bootstrap folder, which you can do by
+clicking on the Advanced... button.
+
+/bootstrap
+
+Seam uses JBoss Embedded in its unit and integration testing. This has an
+additional requirement when using JDK 6. Add the following VM argument to the VM
+args tab in the TestNG launch configuration for your suite.
+
+-Dsun.lang.ClassLoader.allowArraySyntax=true
+
+To add tests to your project create a TestNG xml descriptor called *Test.xml
+(e.g. FooTest.xml) next to your test classes and run ant test.
16 years
Seam SVN: r9572 - trunk/src/main/org/jboss/seam/util.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-11-15 17:33:10 -0500 (Sat, 15 Nov 2008)
New Revision: 9572
Modified:
trunk/src/main/org/jboss/seam/util/Reflections.java
Log:
allow setting of private fields
Modified: trunk/src/main/org/jboss/seam/util/Reflections.java
===================================================================
--- trunk/src/main/org/jboss/seam/util/Reflections.java 2008-11-15 21:57:04 UTC (rev 9571)
+++ trunk/src/main/org/jboss/seam/util/Reflections.java 2008-11-15 22:33:10 UTC (rev 9572)
@@ -114,8 +114,10 @@
public static void setAndWrap(Field field, Object target, Object value)
{
+ boolean accessible = field.isAccessible();
try
{
+ field.setAccessible(true);
set(field, target, value);
}
catch (Exception e)
@@ -129,6 +131,10 @@
throw new IllegalArgumentException("exception setting: " + field.getName(), e);
}
}
+ finally
+ {
+ field.setAccessible(accessible);
+ }
}
public static Object invokeAndWrap(Method method, Object target, Object... args)
16 years
Seam SVN: r9571 - trunk.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-11-15 16:57:04 -0500 (Sat, 15 Nov 2008)
New Revision: 9571
Modified:
trunk/seam21migration.txt
Log:
fix some typos
reflect change in MEI
Modified: trunk/seam21migration.txt
===================================================================
--- trunk/seam21migration.txt 2008-11-15 21:55:58 UTC (rev 9570)
+++ trunk/seam21migration.txt 2008-11-15 21:57:04 UTC (rev 9571)
@@ -66,7 +66,7 @@
persistence controller in the Seam Application Framework:
public String getPersistenceContextName() {
- "session";
+ "session";
}
Security
@@ -96,7 +96,7 @@
<event type="org.jboss.seam.security.notLoggedIn">
<action execute="#{redirect.captureCurrentView}"/>
- <action execute="#{identity.tryLogin()}"/>
+ <action execute="#{identity.tryLogin}"/>
</event>
<event type="org.jboss.seam.security.loginSuccessful">
<action execute="#{redirect.returnToCapturedView}"/>
@@ -114,9 +114,9 @@
Clustering
----------
-Seam's ManagedEntityIdentityInterceptor is now disabled by default. If you need
-the ManagedEntityIdentityInterceptor for clustered failover of conversations,
-you can enable it components.xml:
+Seam's ManagedEntityInterceptor (formally ManagedEntityIdentityInterceptor) is now disabled by
+default. If you need the ManagedEntityInterceptor for clustered failover of conversations, you can
+enable it components.xml:
<core:init>
<core:interceptors>
@@ -135,7 +135,7 @@
<value>org.jboss.seam.transaction.TransactionInterceptor</value>
<value>org.jboss.seam.webservice.WSSecurityInterceptor</value>
<value>org.jboss.seam.security.SecurityInterceptor</value>
- <value>org.jboss.seam.persistence.ManagedEntityIdentityInterceptor</value>
+ <value>org.jboss.seam.persistence.ManagedEntityInterceptor</value>
</core:interceptors>
</core:init>
@@ -143,7 +143,7 @@
Asynchronous Exception Handling
----------------------
-All asynchronous are now wrapped in exception handling. By default, any
+All asynchronous invocations are now wrapped in exception handling. By default, any
exceptions which propagate out of the asynchronous call are caught and logged at
error level. The reference manual describes how to customize this behaviour.
@@ -193,4 +193,7 @@
objects, you don't need to make any changes. If you are extending the objects in
Java, you just need to create a value expression; for example:
-public ValueExpression getCreatedMessage() { return createValueExpression("New person #{person.firstName} #{person.lastName} created"); }
+public ValueExpression getCreatedMessage() {
+ return createValueExpression("New person #{person.firstName} #{person.lastName} created");
+}
+
16 years
Seam SVN: r9570 - in trunk/seam-gen: view and 1 other directory.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-11-15 16:55:58 -0500 (Sat, 15 Nov 2008)
New Revision: 9570
Modified:
trunk/seam-gen/icefaces/view/conversation.xhtml
trunk/seam-gen/view/conversation.xhtml
Log:
show begin and end buttons conditionally based on state of conversation
Modified: trunk/seam-gen/icefaces/view/conversation.xhtml
===================================================================
--- trunk/seam-gen/icefaces/view/conversation.xhtml 2008-11-15 21:55:28 UTC (rev 9569)
+++ trunk/seam-gen/icefaces/view/conversation.xhtml 2008-11-15 21:55:58 UTC (rev 9570)
@@ -31,11 +31,11 @@
<div class="actionButtons">
<h:commandButton id="begin" value="Begin"
- action="#{@componentName@.begin}"/>
- <h:commandButton id="inc" value="Increment"
- action="#{@componentName@.increment}"/>
- <h:commandButton id="end" value="End"
- action="#{@componentName@.end}"/>
+ action="#{@componentName@.begin}" rendered="#{not conversation.longRunning}"/>
+ <h:commandButton id="inc" value="Increment"
+ action="#{@componentName@.increment}" rendered="#{conversation.longRunning}"/>
+ <h:commandButton id="end" value="End"
+ action="#{@componentName@.end}" rendered="#{conversation.longRunning}"/>
</div>
</ice:form>
Modified: trunk/seam-gen/view/conversation.xhtml
===================================================================
--- trunk/seam-gen/view/conversation.xhtml 2008-11-15 21:55:28 UTC (rev 9569)
+++ trunk/seam-gen/view/conversation.xhtml 2008-11-15 21:55:58 UTC (rev 9570)
@@ -27,11 +27,11 @@
<h:form id="@componentName@">
<div class="actionButtons">
<h:commandButton id="begin" value="Begin"
- action="#{@componentName@.begin}"/>
+ action="#{@componentName@.begin}" rendered="#{not conversation.longRunning}"/>
<h:commandButton id="inc" value="Increment"
- action="#{@componentName@.increment}"/>
+ action="#{@componentName@.increment}" rendered="#{conversation.longRunning}"/>
<h:commandButton id="end" value="End"
- action="#{@componentName@.end}"/>
+ action="#{@componentName@.end}" rendered="#{conversation.longRunning}"/>
</div>
</h:form>
16 years
Seam SVN: r9569 - trunk/seam-gen/src.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-11-15 16:55:28 -0500 (Sat, 15 Nov 2008)
New Revision: 9569
Modified:
trunk/seam-gen/src/ConversationBean.java
trunk/seam-gen/src/ConversationJavaBean.java
Log:
conversation-scoped beans should be serializable
Modified: trunk/seam-gen/src/ConversationBean.java
===================================================================
--- trunk/seam-gen/src/ConversationBean.java 2008-11-15 21:54:51 UTC (rev 9568)
+++ trunk/seam-gen/src/ConversationBean.java 2008-11-15 21:55:28 UTC (rev 9569)
@@ -1,5 +1,6 @@
package @actionPackage@;
+import java.io.Serializable;
import javax.ejb.Remove;
import javax.ejb.Stateful;
import org.jboss.seam.annotations.Name;
@@ -11,7 +12,7 @@
@Stateful
@Name("@componentName@")
-public class @beanName@ implements @interfaceName@ {
+public class @beanName@ implements @interfaceName@, Serializable {
@Logger private Log log;
Modified: trunk/seam-gen/src/ConversationJavaBean.java
===================================================================
--- trunk/seam-gen/src/ConversationJavaBean.java 2008-11-15 21:54:51 UTC (rev 9568)
+++ trunk/seam-gen/src/ConversationJavaBean.java 2008-11-15 21:55:28 UTC (rev 9569)
@@ -2,6 +2,7 @@
import static org.jboss.seam.ScopeType.CONVERSATION;
+import java.io.Serializable;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Begin;
import org.jboss.seam.annotations.End;
@@ -11,7 +12,7 @@
@Scope(CONVERSATION)
@Name("@componentName@")
-public class @interfaceName@ {
+public class @interfaceName@ implements Serializable {
@Logger private Log log;
16 years
Seam SVN: r9568 - in trunk/src: test/unit/org/jboss/seam/test/unit and 1 other directory.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-11-15 16:54:51 -0500 (Sat, 15 Nov 2008)
New Revision: 9568
Added:
trunk/src/test/unit/org/jboss/seam/test/unit/PageDescriptorTest.java
Removed:
trunk/src/test/unit/org/jboss/seam/test/unit/PageDescriptionsTest.java
Modified:
trunk/src/main/org/jboss/seam/navigation/Page.java
trunk/src/test/unit/org/jboss/seam/test/unit/testng.xml
Log:
JBSEAM-3705
Modified: trunk/src/main/org/jboss/seam/navigation/Page.java
===================================================================
--- trunk/src/main/org/jboss/seam/navigation/Page.java 2008-11-15 05:14:30 UTC (rev 9567)
+++ trunk/src/main/org/jboss/seam/navigation/Page.java 2008-11-15 21:54:51 UTC (rev 9568)
@@ -73,6 +73,10 @@
this.viewId = viewId;
if (viewId!=null)
{
+ if (viewId.equals("/debug.xhtml"))
+ {
+ switchEnabled = false;
+ }
int loc = viewId.lastIndexOf('.');
if ( loc>0 && viewId.startsWith("/") )
{
Deleted: trunk/src/test/unit/org/jboss/seam/test/unit/PageDescriptionsTest.java
===================================================================
--- trunk/src/test/unit/org/jboss/seam/test/unit/PageDescriptionsTest.java 2008-11-15 05:14:30 UTC (rev 9567)
+++ trunk/src/test/unit/org/jboss/seam/test/unit/PageDescriptionsTest.java 2008-11-15 21:54:51 UTC (rev 9568)
@@ -1,45 +0,0 @@
-package org.jboss.seam.test.unit;
-
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.navigation.Pages;
-import org.testng.annotations.Test;
-
-/**
- * This test verifies that the descriptions returned by the Pages component are based on the matching
- * Page definition as well as any matching wild-card pages in the page stack.
- *
- */
-public class PageDescriptionsTest extends AbstractPageTest
-{
- /**
- * Verify that the Pages component determines when a description exists in the Page stack and when
- * it does not.
- */
- @Test(enabled = true)
- public void testHasDescription()
- {
- Pages pages = Pages.instance();
-
- assert pages.hasDescription("/action-test01b.xhtml");
- assert pages.hasDescription("/action-test01a.xhtml");
- assert !pages.hasDescription("/action-test02.xhtml");
- }
-
- /**
- * Verify that the description can be retrieved from the page stack when a wild-card view-id
- * description has been specified. Also verifies that a description specific to a page overrides
- * the wild-card description.
- */
- @Test(enabled = true)
- public void testGetAndResolveDescription()
- {
- Pages pages = Pages.instance();
- String fineDescription = "fine-description";
- Contexts.getEventContext().set("fineDescription", fineDescription);
-
- assert "coarse-description".equals(pages.getDescription("/action-test01a.xhtml")) :
- "Expecting the wild-card description to be returned as no description was provided for the view-id";
- assert fineDescription.equals(pages.renderDescription("/action-test01b.xhtml")) :
- "Expecting the description for the view-id to be returned";
- }
-}
Copied: trunk/src/test/unit/org/jboss/seam/test/unit/PageDescriptorTest.java (from rev 9559, trunk/src/test/unit/org/jboss/seam/test/unit/PageDescriptionsTest.java)
===================================================================
--- trunk/src/test/unit/org/jboss/seam/test/unit/PageDescriptorTest.java (rev 0)
+++ trunk/src/test/unit/org/jboss/seam/test/unit/PageDescriptorTest.java 2008-11-15 21:54:51 UTC (rev 9568)
@@ -0,0 +1,58 @@
+package org.jboss.seam.test.unit;
+
+import org.jboss.seam.contexts.Contexts;
+import org.jboss.seam.navigation.Pages;
+import org.testng.annotations.Test;
+
+/**
+ * This test verifies that the page descriptor is parsed correctly and that the
+ * Page instance returned by the Pages component are based on the matching Page
+ * definition as well as any matching wild-card pages in the page stack.
+ */
+public class PageDescriptorTest extends AbstractPageTest
+{
+ /**
+ * Verify that the switch enabled flag is true by default, but false
+ * for the debug page.
+ */
+ @Test(enabled = true)
+ public void testSwitchEnabledFlag()
+ {
+ Pages pages = Pages.instance();
+
+ assert pages.getPage("/action-test01a.xhtml").isSwitchEnabled();
+ assert !pages.getPage("/debug.xhtml").isSwitchEnabled();
+ }
+
+ /**
+ * Verify that the Pages component determines when a description exists in the Page stack and when
+ * it does not.
+ */
+ @Test(enabled = true)
+ public void testHasDescription()
+ {
+ Pages pages = Pages.instance();
+
+ assert pages.hasDescription("/action-test01b.xhtml");
+ assert pages.hasDescription("/action-test01a.xhtml");
+ assert !pages.hasDescription("/action-test02.xhtml");
+ }
+
+ /**
+ * Verify that the description can be retrieved from the page stack when a wild-card view-id
+ * description has been specified. Also verifies that a description specific to a page overrides
+ * the wild-card description.
+ */
+ @Test(enabled = true)
+ public void testGetAndResolveDescription()
+ {
+ Pages pages = Pages.instance();
+ String fineDescription = "fine-description";
+ Contexts.getEventContext().set("fineDescription", fineDescription);
+
+ assert "coarse-description".equals(pages.getDescription("/action-test01a.xhtml")) :
+ "Expecting the wild-card description to be returned as no description was provided for the view-id";
+ assert fineDescription.equals(pages.renderDescription("/action-test01b.xhtml")) :
+ "Expecting the description for the view-id to be returned";
+ }
+}
Property changes on: trunk/src/test/unit/org/jboss/seam/test/unit/PageDescriptorTest.java
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: trunk/src/test/unit/org/jboss/seam/test/unit/testng.xml
===================================================================
--- trunk/src/test/unit/org/jboss/seam/test/unit/testng.xml 2008-11-15 05:14:30 UTC (rev 9567)
+++ trunk/src/test/unit/org/jboss/seam/test/unit/testng.xml 2008-11-15 21:54:51 UTC (rev 9568)
@@ -29,7 +29,7 @@
<test name="Seam Unit Tests: Pages dot xml">
<classes>
<class name="org.jboss.seam.test.unit.PageActionsTest" />
- <class name="org.jboss.seam.test.unit.PageDescriptionsTest" />
+ <class name="org.jboss.seam.test.unit.PageDescriptorTest" />
<class name="org.jboss.seam.test.unit.PageParamTest" />
</classes>
</test>
16 years
Seam SVN: r9567 - trunk/examples.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2008-11-15 00:14:30 -0500 (Sat, 15 Nov 2008)
New Revision: 9567
Modified:
trunk/examples/build.xml
Log:
JBSEAM-2655
Modified: trunk/examples/build.xml
===================================================================
--- trunk/examples/build.xml 2008-11-15 05:05:30 UTC (rev 9566)
+++ trunk/examples/build.xml 2008-11-15 05:14:30 UTC (rev 9567)
@@ -166,6 +166,14 @@
<include name="jboss-seam-excel.jar" if="seam.excel.lib" />
<include name="jxl.jar" if="seam.excel.lib" />
</fileset>
+
+ <!-- openid required dependencies -->
+ <fileset id="openid.jar" dir="${lib.dir}">
+ <include name="openid4java.jar" if="openid.lib" />
+ <include name="openxri-client.jar" if="openid.lib" />
+ <include name="openxri-syntax.jar" if="openid.lib" />
+ <include name="htmlparser.jar" if="openid.lib" />
+ </fileset>
<!-- Seam rss, and dependencies -->
<fileset id="seam.rss.jar" dir="${lib.dir}">
@@ -671,6 +679,7 @@
<fileset refid="el-ri.jar" />
<fileset refid="trinidad-api.jar" />
<fileset refid="jboss-common-core.jar" />
+ <fileset refid="openid.jar" />
<mapper type="flatten" />
</copy>
</target>
@@ -809,6 +818,7 @@
<fileset refid="tomcat.jbpm.jar" />
<fileset refid="spring.jar" />
<fileset refid="gwt.jar" />
+ <fileset refid="openid.jar" />
<fileset refid="jboss-el.jar" />
<fileset refid="jsf.jar" />
<fileset refid="search.jar" />
16 years