[jboss-cvs] jboss-seam/src/main/org/jboss/seam/core ...
Gavin King
gavin.king at jboss.com
Wed Oct 11 00:42:12 EDT 2006
User: gavin
Date: 06/10/11 00:42:12
Modified: src/main/org/jboss/seam/core Events.java Manager.java
Log:
make tests run
Revision Changes Path
1.8 +2 -1 jboss-seam/src/main/org/jboss/seam/core/Events.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Events.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Events.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- Events.java 10 Oct 2006 02:33:22 -0000 1.7
+++ Events.java 11 Oct 2006 04:42:12 -0000 1.8
@@ -138,7 +138,8 @@
public static boolean exists()
{
- return Contexts.getApplicationContext().isSet( Seam.getComponentName(Events.class) );
+ return Contexts.isApplicationContextActive() &&
+ Contexts.getApplicationContext().isSet( Seam.getComponentName(Events.class) );
}
public static Events instance()
1.92 +3 -3 jboss-seam/src/main/org/jboss/seam/core/Manager.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Manager.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Manager.java,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -b -r1.91 -r1.92
--- Manager.java 10 Oct 2006 22:09:05 -0000 1.91
+++ Manager.java 11 Oct 2006 04:42:12 -0000 1.92
@@ -41,7 +41,7 @@
*
* @author Gavin King
* @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
- * @version $Revision: 1.91 $
+ * @version $Revision: 1.92 $
*/
@Scope(ScopeType.EVENT)
@Name("org.jboss.seam.core.manager")
@@ -619,7 +619,7 @@
setLongRunningConversation(true);
createConversationEntry().setInitiatorComponentName(initiator);
Conversation.instance(); //force instantiation of the Conversation in the outer (non-nested) conversation
- Events.instance().raiseEvent("org.jboss.seam.beginConversation");
+ if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.beginConversation");
}
/**
@@ -627,7 +627,7 @@
*/
public void endConversation(boolean beforeRedirect)
{
- Events.instance().raiseEvent("org.jboss.seam.endConversation");
+ if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.endConversation");
setLongRunningConversation(false);
destroyBeforeRedirect = beforeRedirect;
}
More information about the jboss-cvs-commits
mailing list