Weld SVN: r6074 - core/trunk/impl/src/main/java/org/jboss/weld/xml.
by weld-commits@lists.jboss.org
Author: nickarls
Date: 2010-04-01 04:18:22 -0400 (Thu, 01 Apr 2010)
New Revision: 6074
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/xml/EnabledClasses.java
Log:
WS
Modified: core/trunk/impl/src/main/java/org/jboss/weld/xml/EnabledClasses.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/xml/EnabledClasses.java 2010-04-01 08:17:57 UTC (rev 6073)
+++ core/trunk/impl/src/main/java/org/jboss/weld/xml/EnabledClasses.java 2010-04-01 08:18:22 UTC (rev 6074)
@@ -26,7 +26,7 @@
/**
*
* @author Nicklas Karlsson
- *
+ *
*/
public class EnabledClasses
{
@@ -61,15 +61,19 @@
private void processAlternatives(List<BeansXmlElement> alternativesElements)
{
Collection<Class<?>> classes = getClassesInElements(alternativesElements);
- for (Class<?> clazz : classes) {
- if (clazz.isAnnotation()) {
+ for (Class<?> clazz : classes)
+ {
+ if (clazz.isAnnotation())
+ {
enabledAlternativeStereotypes.add(clazz.asSubclass(Annotation.class));
- } else {
+ }
+ else
+ {
enabledAlternativeClasses.add(clazz);
}
}
}
-
+
private Collection<Class<?>> getClassesInElements(List<BeansXmlElement> elements)
{
List<Class<?>> classes = new ArrayList<Class<?>>();
14 years, 9 months
Weld SVN: r6073 - core/trunk/impl/src/main/java/org/jboss/weld/servlet.
by weld-commits@lists.jboss.org
Author: nickarls
Date: 2010-04-01 04:17:57 -0400 (Thu, 01 Apr 2010)
New Revision: 6073
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java
Log:
Don't create new session when ending request
Modified: core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java 2010-04-01 07:13:36 UTC (rev 6072)
+++ core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java 2010-04-01 08:17:57 UTC (rev 6073)
@@ -26,6 +26,7 @@
import static org.jboss.weld.servlet.BeanProvider.conversationManager;
import static org.jboss.weld.servlet.BeanProvider.httpSessionManager;
+import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
@@ -177,8 +178,8 @@
{
return;
}
-
- conversationManager(request.getSession().getServletContext()).teardownConversation();
+ HttpPassThruSessionBeanStore sessionBeanStore = (HttpPassThruSessionBeanStore) lifecycle.getSessionContext().getBeanStore();
+ conversationManager(sessionBeanStore.getServletContext()).teardownConversation();
teardownRequest(request);
lifecycle.getConversationContext().setBeanStore(null);
lifecycle.getConversationContext().setActive(false);
14 years, 9 months
Weld SVN: r6072 - core/trunk/impl/src/main/java/org/jboss/weld/conversation.
by weld-commits@lists.jboss.org
Author: nickarls
Date: 2010-04-01 03:13:36 -0400 (Thu, 01 Apr 2010)
New Revision: 6072
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/conversation/ConversationImpl.java
Log:
Only apply the timeout parameter in the init method if it's currently unset (0) locally
Modified: core/trunk/impl/src/main/java/org/jboss/weld/conversation/ConversationImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/conversation/ConversationImpl.java 2010-04-01 06:48:18 UTC (rev 6071)
+++ core/trunk/impl/src/main/java/org/jboss/weld/conversation/ConversationImpl.java 2010-04-01 07:13:36 UTC (rev 6072)
@@ -94,7 +94,8 @@
}
/**
- * Initializes a new conversation
+ * Initializes a new conversation. The timeout value is only applied if
+ * the local value is currently unset (0).
*
* @param conversationIdGenerator The conversation ID generator
* @param timeout The conversation inactivity timeout
@@ -102,7 +103,10 @@
@Inject
public void init(@ConversationInactivityTimeout long timeout)
{
- this.timeout = timeout;
+ if (this.timeout == 0)
+ {
+ this.timeout = timeout;
+ }
_transient = true;
}
14 years, 9 months
Weld SVN: r6071 - in core/trunk/impl/src/main/java/org/jboss/weld: servlet and 1 other directory.
by weld-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2010-04-01 02:48:18 -0400 (Thu, 01 Apr 2010)
New Revision: 6071
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/jsf/WeldPhaseListener.java
core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java
Log:
moved conversation setup/teardown out of jsf phase listener into servlet lifecycle (Nik says to blame me if this doesn't work ;)
Modified: core/trunk/impl/src/main/java/org/jboss/weld/jsf/WeldPhaseListener.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/jsf/WeldPhaseListener.java 2010-03-31 03:21:16 UTC (rev 6070)
+++ core/trunk/impl/src/main/java/org/jboss/weld/jsf/WeldPhaseListener.java 2010-04-01 06:48:18 UTC (rev 6071)
@@ -118,7 +118,7 @@
private void beforeRestoreView(FacesContext facesContext)
{
log.trace(INITIATING_CONVERSATION, "Restore View");
- initiateSessionAndConversation(facesContext);
+ //initiateSessionAndConversation(facesContext);
}
/**
@@ -127,7 +127,7 @@
private void afterRenderResponse(FacesContext facesContext)
{
log.trace(CLEANING_UP_CONVERSATION, "Render Response", "response complete");
- getConversationManager().teardownConversation();
+ //getConversationManager().teardownConversation();
}
/**
@@ -136,7 +136,7 @@
private void afterResponseComplete(FacesContext facesContext, PhaseId phaseId)
{
log.trace(CLEANING_UP_CONVERSATION, phaseId, "the response has been marked complete");
- getConversationManager().teardownConversation();
+ //getConversationManager().teardownConversation();
}
/**
Modified: core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java 2010-03-31 03:21:16 UTC (rev 6070)
+++ core/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java 2010-04-01 06:48:18 UTC (rev 6071)
@@ -162,6 +162,7 @@
request.setAttribute(REQUEST_ATTRIBUTE_NAME, beanStore);
lifecycle.beginRequest(request.getRequestURI(), beanStore);
restoreSessionContext(request);
+ conversationManager(request.getSession().getServletContext()).setupConversation(request.getParameter("cid"));
}
}
@@ -176,10 +177,12 @@
{
return;
}
- teardownSession(request);
+
+ conversationManager(request.getSession().getServletContext()).teardownConversation();
teardownRequest(request);
lifecycle.getConversationContext().setBeanStore(null);
lifecycle.getConversationContext().setActive(false);
+ teardownSession(request);
}
private void teardownSession(HttpServletRequest request)
14 years, 9 months