This is an automated email from the ASF dual-hosted git repository.
tandraschko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwebbeans.git
The following commit(s) were added to refs/heads/master by this push:
new c3c15d5 OWB-1295
c3c15d5 is described below
commit c3c15d5f3884cd943fffdb088bafd9a585b2103a
Author: Thomas Andraschko <[email protected]>
AuthorDate: Mon Jul 22 10:43:52 2019 +0200
OWB-1295
---
.../webbeans/jsf/ConversationAwareViewHandler.java | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git
a/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/ConversationAwareViewHandler.java
b/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/ConversationAwareViewHandler.java
index cf32a6d..f0b45a9 100644
---
a/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/ConversationAwareViewHandler.java
+++
b/webbeans-jsf/src/main/java/org/apache/webbeans/jsf/ConversationAwareViewHandler.java
@@ -23,8 +23,6 @@ import java.util.Map;
import javax.enterprise.context.ContextNotActiveException;
import javax.enterprise.context.Conversation;
-import javax.enterprise.context.SessionScoped;
-import javax.enterprise.context.spi.Context;
import javax.faces.application.ViewHandler;
import javax.faces.application.ViewHandlerWrapper;
import javax.faces.context.FacesContext;
@@ -57,11 +55,10 @@ public class ConversationAwareViewHandler extends
ViewHandlerWrapper
try
{
- WebBeansContext webBeansContext =
WebBeansContext.currentInstance();
-
- Context sessionContext =
webBeansContext.getBeanManagerImpl().getContext(SessionScoped.class);
- if (sessionContext.isActive())
+ Object session = context.getExternalContext().getSession(false);
+ if (session != null)
{
+ WebBeansContext webBeansContext =
WebBeansContext.currentInstance();
Conversation conversation =
webBeansContext.getConversationManager().getConversationBeanReference();
if (conversation != null && !conversation.isTransient())
{
@@ -114,11 +111,10 @@ public class ConversationAwareViewHandler extends
ViewHandlerWrapper
try
{
- WebBeansContext webBeansContext =
WebBeansContext.currentInstance();
-
- Context sessionContext =
webBeansContext.getBeanManagerImpl().getContext(SessionScoped.class);
- if (sessionContext.isActive())
+ Object session = context.getExternalContext().getSession(false);
+ if (session != null)
{
+ WebBeansContext webBeansContext =
WebBeansContext.currentInstance();
Conversation conversation =
webBeansContext.getConversationManager().getConversationBeanReference();
if (conversation != null && !conversation.isTransient())
{