You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Thomas Andraschko (JIRA)" <ji...@apache.org> on 2011/02/21 09:57:38 UTC

[jira] Created: (OWB-523) @SessionScoped bean failover does not work

@SessionScoped bean failover does not work
------------------------------------------

                 Key: OWB-523
                 URL: https://issues.apache.org/jira/browse/OWB-523
             Project: OpenWebBeans
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.0.0
         Environment: MyFaces 2.0.3, OWB 1.0.0, Tomcat 7.0.8, memcached-session-manager
            Reporter: Thomas Andraschko
            Assignee: Gurkan Erdogdu
            Priority: Minor


OWB failover for @SessionScoped beans does not work.

A detailed description and a sample project can be found here:
https://github.com/magro/msm-sample-webapp/tree/openwebbeans

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OWB-523) @SessionScoped bean failover does not work

Posted by "Martin Grotzke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003856#comment-13003856 ] 

Martin Grotzke commented on OWB-523:
------------------------------------

I just let FailOverBagWrapper implement HSAL and after a clean install/package for both owb and the sample (and `rm -rf runtime/tomcat1/webapps/ROOT/`) I see that in session.passivate the FailOverBagWrapper.sessionWillPassivate is invoked.
It sounds as if your environment/setup is somehow broken. Did you also an runtime/tomcat1/webapps/ROOT/ after rebuilding the msm-sample-webapp? Alternatively you can copy the relevant jars to runtime/tomcat1/webapps/ROOT/WEB-INF/lib...

> @SessionScoped bean failover does not work
> ------------------------------------------
>
>                 Key: OWB-523
>                 URL: https://issues.apache.org/jira/browse/OWB-523
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>         Environment: MyFaces 2.0.3, OWB 1.0.0, Tomcat 7.0.8, memcached-session-manager
>            Reporter: Thomas Andraschko
>            Assignee: Joe Bergmark
>            Priority: Minor
>
> OWB failover for @SessionScoped beans does not work.
> A detailed description and a sample project can be found here:
> https://github.com/magro/msm-sample-webapp/tree/openwebbeans

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (OWB-523) @SessionScoped bean failover does not work

Posted by "Martin Grotzke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003706#comment-13003706 ] 

Martin Grotzke commented on OWB-523:
------------------------------------

I also just updated owb version in pom.xml to 1.1.0-SNAPSHOT (SNAPSHOT just installed from trunk at r1079022). After
$ mvn clean package
$ rm -rf runtime/tomcat1/webapps/ROOT
$ runtime/tomcat1/bin/catalina.sh run
I'm getting the following exception when submitting /test.xhtml in the browser:

Mar 8, 2011 12:56:34 AM de.javakaffee.web.msm.JavaSerializationTranscoder writeAttributes
WARNING: Cannot serialize session attribute org.apache.webbeans.web.failover for session 4442ACE9E9BBA6A1A80D718CC599C58E-n2
java.io.NotSerializableException: org.apache.webbeans.config.WebBeansContext
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
        at org.apache.webbeans.web.failover.FailOverBagWrapper.writeExternal(FailOverBagWrapper.java:139)
        at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1429)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1398)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
        at de.javakaffee.web.msm.JavaSerializationTranscoder.writeAttributes(JavaSerializationTranscoder.java:143)


> @SessionScoped bean failover does not work
> ------------------------------------------
>
>                 Key: OWB-523
>                 URL: https://issues.apache.org/jira/browse/OWB-523
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>         Environment: MyFaces 2.0.3, OWB 1.0.0, Tomcat 7.0.8, memcached-session-manager
>            Reporter: Thomas Andraschko
>            Assignee: Joe Bergmark
>            Priority: Minor
>
> OWB failover for @SessionScoped beans does not work.
> A detailed description and a sample project can be found here:
> https://github.com/magro/msm-sample-webapp/tree/openwebbeans

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (OWB-523) @SessionScoped bean failover does not work

Posted by "Gurkan Erdogdu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gurkan Erdogdu updated OWB-523:
-------------------------------

    Assignee: YING WANG  (was: Gurkan Erdogdu)

> @SessionScoped bean failover does not work
> ------------------------------------------
>
>                 Key: OWB-523
>                 URL: https://issues.apache.org/jira/browse/OWB-523
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>         Environment: MyFaces 2.0.3, OWB 1.0.0, Tomcat 7.0.8, memcached-session-manager
>            Reporter: Thomas Andraschko
>            Assignee: YING WANG
>            Priority: Minor
>
> OWB failover for @SessionScoped beans does not work.
> A detailed description and a sample project can be found here:
> https://github.com/magro/msm-sample-webapp/tree/openwebbeans

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OWB-523) @SessionScoped bean failover does not work

Posted by "Joe Bergmark (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003790#comment-13003790 ] 

Joe Bergmark commented on OWB-523:
----------------------------------

I didn't committ in any of my changes, as they did not appear to resolve the problem.  I did however fix the serialization error you posted above in my workspace along with those changes.

I still need to do more debugging, but it appears that the sessionWillActivation and sessionDidPassivate (which I moved into FailOverBagWrapper) are not being called, even though it is now a HttpSessionActivationListener, and as your exception shows it is being set as a session attribute.

> @SessionScoped bean failover does not work
> ------------------------------------------
>
>                 Key: OWB-523
>                 URL: https://issues.apache.org/jira/browse/OWB-523
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>         Environment: MyFaces 2.0.3, OWB 1.0.0, Tomcat 7.0.8, memcached-session-manager
>            Reporter: Thomas Andraschko
>            Assignee: Joe Bergmark
>            Priority: Minor
>
> OWB failover for @SessionScoped beans does not work.
> A detailed description and a sample project can be found here:
> https://github.com/magro/msm-sample-webapp/tree/openwebbeans

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (OWB-523) @SessionScoped bean failover does not work

Posted by "Martin Grotzke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997453#comment-12997453 ] 

Martin Grotzke commented on OWB-523:
------------------------------------

One additional hint: this sample works with Weld, which indicates that it's not an issue with memcached-session-manager.

When inspecting the serialized/deserialized session during passivation/activation I can see there's the session attribute "org.apache.webbeans.web.failover" with the FailOverBagWrapper.

AFAICS this session attribute is only accessed from DefaultOwbFailOverService.sessionIsIdle, but there's no invocation of DefaultOwbFailOverService.sessionWillPassivate, as StandardSession.passivate does not find a session attribute that implements HttpSessionActivationListener. Perhaps this helps.

> @SessionScoped bean failover does not work
> ------------------------------------------
>
>                 Key: OWB-523
>                 URL: https://issues.apache.org/jira/browse/OWB-523
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>         Environment: MyFaces 2.0.3, OWB 1.0.0, Tomcat 7.0.8, memcached-session-manager
>            Reporter: Thomas Andraschko
>            Assignee: YING WANG
>            Priority: Minor
>
> OWB failover for @SessionScoped beans does not work.
> A detailed description and a sample project can be found here:
> https://github.com/magro/msm-sample-webapp/tree/openwebbeans

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OWB-523) @SessionScoped bean failover does not work

Posted by "Joe Bergmark (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004186#comment-13004186 ] 

Joe Bergmark commented on OWB-523:
----------------------------------

Ok, I believe this is working now.  I was hitting an exception in the FailOverBag's restore method that was getting silently eaten by an empty catch block.  I've modified the restore method to look up the WebBeansContext again as that field needs to be trasient.

If you have a chance, please rebuild webbeans-web from trunk and see if it works for you as well.

> @SessionScoped bean failover does not work
> ------------------------------------------
>
>                 Key: OWB-523
>                 URL: https://issues.apache.org/jira/browse/OWB-523
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>         Environment: MyFaces 2.0.3, OWB 1.0.0, Tomcat 7.0.8, memcached-session-manager
>            Reporter: Thomas Andraschko
>            Assignee: Joe Bergmark
>            Priority: Minor
>
> OWB failover for @SessionScoped beans does not work.
> A detailed description and a sample project can be found here:
> https://github.com/magro/msm-sample-webapp/tree/openwebbeans

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (OWB-523) @SessionScoped bean failover does not work

Posted by "Martin Grotzke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997603#comment-12997603 ] 

Martin Grotzke commented on OWB-523:
------------------------------------

Regarding WebBeansConfigurationListener and FailOverBagWrapper: sounds reasonable what you propose. But I still wonder, why it's only failing when tomcat is restarted and not with the running tomcat. When msm is configured using non-sticky sessions sessions are swapped out at the end of each request, so from the container/session point of view there's no difference. So it seems as if anything else would keep state.

> @SessionScoped bean failover does not work
> ------------------------------------------
>
>                 Key: OWB-523
>                 URL: https://issues.apache.org/jira/browse/OWB-523
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>         Environment: MyFaces 2.0.3, OWB 1.0.0, Tomcat 7.0.8, memcached-session-manager
>            Reporter: Thomas Andraschko
>            Assignee: YING WANG
>            Priority: Minor
>
> OWB failover for @SessionScoped beans does not work.
> A detailed description and a sample project can be found here:
> https://github.com/magro/msm-sample-webapp/tree/openwebbeans

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OWB-523) @SessionScoped bean failover does not work

Posted by "Martin Grotzke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13002288#comment-13002288 ] 

Martin Grotzke commented on OWB-523:
------------------------------------

Regarding the relationship of the package and the deployed war file in tomcat: runtime/tomcat/webapps/ROOT.war is a symbolic link to target/msm-sample-webapp-1.0-SNAPSHOT.war (runtime/tomcat is a link to runtime/apache-tomcat-7.0.8). If you want to get a fresh war file deployed just `rm -rf runtime/tomcat/webapps/ROOT/` so that the war file is unpacked/deployed when tomcat is restarted.

Concerning the debugging: you can start tomcat with the jpda option like this:
./runtime/tomcat1/bin/catalina.sh jpda run

This opens a debugging socket on port 8000 so that you can attach and debug using your IDE (i.e. in eclipse it's under Debug > "Remote Java Application"). With this and the memcached-session-manager sources at hand (git clone git://github.com/magro/memcached-session-manager.git; cd memcached-session-manager; buildr eclipse) you can set a breakpoint in JavaSerializationTranscoder.writeAttributes to inspect serialized attributes (to see deserialized attributes you can check MemcachedBackupSessionManager.loadFromMemcached).

> @SessionScoped bean failover does not work
> ------------------------------------------
>
>                 Key: OWB-523
>                 URL: https://issues.apache.org/jira/browse/OWB-523
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>         Environment: MyFaces 2.0.3, OWB 1.0.0, Tomcat 7.0.8, memcached-session-manager
>            Reporter: Thomas Andraschko
>            Assignee: Joe Bergmark
>            Priority: Minor
>
> OWB failover for @SessionScoped beans does not work.
> A detailed description and a sample project can be found here:
> https://github.com/magro/msm-sample-webapp/tree/openwebbeans

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OWB-523) @SessionScoped bean failover does not work

Posted by "Joe Bergmark (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13002267#comment-13002267 ] 

Joe Bergmark commented on OWB-523:
----------------------------------

I made the changes I mentioned previously, but I'm not sure how to repackage your war module to pick them up and test them.  I tried changing the pom.xml to use 

<version>1.1.0-SNAPSHOT</version

for the open web beans files, but when I re-run "mvn package", I can navigate into the tomcat directory and see the 1.0.0 version of those jars still there.  Am I missing a step in how the war gets built and deployed?

> @SessionScoped bean failover does not work
> ------------------------------------------
>
>                 Key: OWB-523
>                 URL: https://issues.apache.org/jira/browse/OWB-523
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>         Environment: MyFaces 2.0.3, OWB 1.0.0, Tomcat 7.0.8, memcached-session-manager
>            Reporter: Thomas Andraschko
>            Assignee: Joe Bergmark
>            Priority: Minor
>
> OWB failover for @SessionScoped beans does not work.
> A detailed description and a sample project can be found here:
> https://github.com/magro/msm-sample-webapp/tree/openwebbeans

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OWB-523) @SessionScoped bean failover does not work

Posted by "Joe Bergmark (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004171#comment-13004171 ] 

Joe Bergmark commented on OWB-523:
----------------------------------

I'm making it a bit further now.  I've added some additional debug and I do see sessionWillActivate and sessionDidPassivate being called.  I also see the code make it ways down into FailOverBag.restore(), so the SessionContext in the SessionManager should be getting updated.  However I still don't see the test application's @SessionScoped bean getting propagated.

I'm going to try connecting with a remote debugger to try and identify what might be going wrong in the SessionContext.  I'm guessing the entries in it either aren't being serialized properly, or somehow the Contextuals don't match so we don't match the existing bean in the map.

> @SessionScoped bean failover does not work
> ------------------------------------------
>
>                 Key: OWB-523
>                 URL: https://issues.apache.org/jira/browse/OWB-523
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>         Environment: MyFaces 2.0.3, OWB 1.0.0, Tomcat 7.0.8, memcached-session-manager
>            Reporter: Thomas Andraschko
>            Assignee: Joe Bergmark
>            Priority: Minor
>
> OWB failover for @SessionScoped beans does not work.
> A detailed description and a sample project can be found here:
> https://github.com/magro/msm-sample-webapp/tree/openwebbeans

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (OWB-523) @SessionScoped bean failover does not work

Posted by "Martin Grotzke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004513#comment-13004513 ] 

Martin Grotzke commented on OWB-523:
------------------------------------

Looks good, now the form is populated with the data from the session user.

The only thing that makes me wonder is that during "normal" operation (tomcat is running, session is swapped out at end of request and swapped in at the start of the request), the same instance of the SessionUser is used, so there's no "????? create SessionUser" logged.
When I restart tomcat, "????? create SessionUser" is printed to stdout, so this indicates that a new instance of the @SessionScoped bean is created. Without knowing more about this I'd assume that this should not happen.

A minor thing I saw in FailOverBagWrapper is that you probably want to change one line:
-        if (failoverService != null && failoverService.isSupportFailOver() || failoverService.isSupportPassivation())
+        if (failoverService != null && (failoverService.isSupportFailOver() || failoverService.isSupportPassivation()))

> @SessionScoped bean failover does not work
> ------------------------------------------
>
>                 Key: OWB-523
>                 URL: https://issues.apache.org/jira/browse/OWB-523
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>         Environment: MyFaces 2.0.3, OWB 1.0.0, Tomcat 7.0.8, memcached-session-manager
>            Reporter: Thomas Andraschko
>            Assignee: Joe Bergmark
>            Priority: Minor
>
> OWB failover for @SessionScoped beans does not work.
> A detailed description and a sample project can be found here:
> https://github.com/magro/msm-sample-webapp/tree/openwebbeans

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (OWB-523) @SessionScoped bean failover does not work

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004516#comment-13004516 ] 

Mark Struberg commented on OWB-523:
-----------------------------------

This depends on how you use memcached. 
If you swap/read back on each request, then it should create a new User. But if it only serializes for safety, and on deserialisation first just checks the hash code (in case something got changed on another node) then the existing instance will get used again (basically the session activation will not be performed).

> @SessionScoped bean failover does not work
> ------------------------------------------
>
>                 Key: OWB-523
>                 URL: https://issues.apache.org/jira/browse/OWB-523
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>         Environment: MyFaces 2.0.3, OWB 1.0.0, Tomcat 7.0.8, memcached-session-manager
>            Reporter: Thomas Andraschko
>            Assignee: Joe Bergmark
>            Priority: Minor
>
> OWB failover for @SessionScoped beans does not work.
> A detailed description and a sample project can be found here:
> https://github.com/magro/msm-sample-webapp/tree/openwebbeans

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (OWB-523) @SessionScoped bean failover does not work

Posted by "Joe Bergmark (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997597#comment-12997597 ] 

Joe Bergmark commented on OWB-523:
----------------------------------

I get the following exception when I try and start the server as described in the README.markdown:

Caused by: java.lang.ClassNotFoundException: java.util.SubList
	at java.lang.Class.forName(Class.java:136)
	at de.javakaffee.kryoserializers.SubListSerializer.getClass(SubListSerializer.java:59

Not sure what I am missing here.  I don't see this class in the javadoc.

> @SessionScoped bean failover does not work
> ------------------------------------------
>
>                 Key: OWB-523
>                 URL: https://issues.apache.org/jira/browse/OWB-523
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>         Environment: MyFaces 2.0.3, OWB 1.0.0, Tomcat 7.0.8, memcached-session-manager
>            Reporter: Thomas Andraschko
>            Assignee: YING WANG
>            Priority: Minor
>
> OWB failover for @SessionScoped beans does not work.
> A detailed description and a sample project can be found here:
> https://github.com/magro/msm-sample-webapp/tree/openwebbeans

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (OWB-523) @SessionScoped bean failover does not work

Posted by "Joe Bergmark (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bergmark reassigned OWB-523:
--------------------------------

    Assignee: Joe Bergmark  (was: YING WANG)

> @SessionScoped bean failover does not work
> ------------------------------------------
>
>                 Key: OWB-523
>                 URL: https://issues.apache.org/jira/browse/OWB-523
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>         Environment: MyFaces 2.0.3, OWB 1.0.0, Tomcat 7.0.8, memcached-session-manager
>            Reporter: Thomas Andraschko
>            Assignee: Joe Bergmark
>            Priority: Minor
>
> OWB failover for @SessionScoped beans does not work.
> A detailed description and a sample project can be found here:
> https://github.com/magro/msm-sample-webapp/tree/openwebbeans

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OWB-523) @SessionScoped bean failover does not work

Posted by "Joe Bergmark (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004536#comment-13004536 ] 

Joe Bergmark commented on OWB-523:
----------------------------------

Thanks for catching my typo with the null check, I"ll fix that today.

As far as the same instance of SessionUser being used during "normal" operation.  This might be due to the internal map that OWB has of SessionContexts.  We are going to find the SessionContext in that map in the SessionManager if the server hasn't been stopped or that Session hasn't been destroyed. (callback to HttpSessionListener sessionDestroyed).  

In the case of restarting tomcat, the map is going to be empty, so presumably we are deserializing the @SessionScoped bean to restore the data.

Do you see the value restored after tomcat is restarted?

> @SessionScoped bean failover does not work
> ------------------------------------------
>
>                 Key: OWB-523
>                 URL: https://issues.apache.org/jira/browse/OWB-523
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>         Environment: MyFaces 2.0.3, OWB 1.0.0, Tomcat 7.0.8, memcached-session-manager
>            Reporter: Thomas Andraschko
>            Assignee: Joe Bergmark
>            Priority: Minor
>
> OWB failover for @SessionScoped beans does not work.
> A detailed description and a sample project can be found here:
> https://github.com/magro/msm-sample-webapp/tree/openwebbeans

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (OWB-523) @SessionScoped bean failover does not work

Posted by "Joe Bergmark (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bergmark resolved OWB-523.
------------------------------

       Resolution: Fixed
    Fix Version/s: 1.1.0

Basic failover is working now.

> @SessionScoped bean failover does not work
> ------------------------------------------
>
>                 Key: OWB-523
>                 URL: https://issues.apache.org/jira/browse/OWB-523
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>         Environment: MyFaces 2.0.3, OWB 1.0.0, Tomcat 7.0.8, memcached-session-manager
>            Reporter: Thomas Andraschko
>            Assignee: Joe Bergmark
>            Priority: Minor
>             Fix For: 1.1.0
>
>
> OWB failover for @SessionScoped beans does not work.
> A detailed description and a sample project can be found here:
> https://github.com/magro/msm-sample-webapp/tree/openwebbeans

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (OWB-523) @SessionScoped bean failover does not work

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12998302#comment-12998302 ] 

Mark Struberg commented on OWB-523:
-----------------------------------

looking at the code it seems that it needs cleanup anyway.
Currently removing a few suspect catch(Throwable)...

> @SessionScoped bean failover does not work
> ------------------------------------------
>
>                 Key: OWB-523
>                 URL: https://issues.apache.org/jira/browse/OWB-523
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>         Environment: MyFaces 2.0.3, OWB 1.0.0, Tomcat 7.0.8, memcached-session-manager
>            Reporter: Thomas Andraschko
>            Assignee: YING WANG
>            Priority: Minor
>
> OWB failover for @SessionScoped beans does not work.
> A detailed description and a sample project can be found here:
> https://github.com/magro/msm-sample-webapp/tree/openwebbeans

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OWB-523) @SessionScoped bean failover does not work

Posted by "Martin Grotzke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004570#comment-13004570 ] 

Martin Grotzke commented on OWB-523:
------------------------------------

The msm-sample-webapp in openwebbeans branch is defaultet to non-sticky sessions - so sessions are swapped out / in for each request. This can be changed in runtime/tomcat1/conf/context.xml (sticky="true|false") or by just using `./switch-stickyness.sh sticky|nonsticky`.

Regarding the map of SessionContexts: when (nonsticky) sessions are only "deregistered" via "sessionWillPassivate" OWB will never get some sessionDestroyed event. This sounds as this would be a session/memory leak with nonsticky sessions.

The following two paragraphs from the servlet spec 2.4 IMHO say that you can't rely on session lifecycle events but the HttpSessionActivationListener in a distributed environment:


SRV.7.7.2 Distributed Environments

[..]

Containers must notify any session attributes implementing the HttpSessionActivationListener during migration of a session. They must notify listeners of passivation prior to serialization of a session, and of activation after deserialization of a session.

SRV.10.7 Distributed Containers

In distributed Web containers, HttpSession instances are scoped to the particular JVM servicing session requests, and the ServletContext object is scoped to the Web container’s JVM. Distributed containers are not required to propagate either servlet context events or HttpSession events to other JVMs. Listener class instances are scoped to one per deployment descriptor declaration per Java Virtual Machine.

> @SessionScoped bean failover does not work
> ------------------------------------------
>
>                 Key: OWB-523
>                 URL: https://issues.apache.org/jira/browse/OWB-523
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>         Environment: MyFaces 2.0.3, OWB 1.0.0, Tomcat 7.0.8, memcached-session-manager
>            Reporter: Thomas Andraschko
>            Assignee: Joe Bergmark
>            Priority: Minor
>
> OWB failover for @SessionScoped beans does not work.
> A detailed description and a sample project can be found here:
> https://github.com/magro/msm-sample-webapp/tree/openwebbeans

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (OWB-523) @SessionScoped bean failover does not work

Posted by "Martin Grotzke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997601#comment-12997601 ] 

Martin Grotzke commented on OWB-523:
------------------------------------

Do you use the branch openwebbeans?

> @SessionScoped bean failover does not work
> ------------------------------------------
>
>                 Key: OWB-523
>                 URL: https://issues.apache.org/jira/browse/OWB-523
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>         Environment: MyFaces 2.0.3, OWB 1.0.0, Tomcat 7.0.8, memcached-session-manager
>            Reporter: Thomas Andraschko
>            Assignee: YING WANG
>            Priority: Minor
>
> OWB failover for @SessionScoped beans does not work.
> A detailed description and a sample project can be found here:
> https://github.com/magro/msm-sample-webapp/tree/openwebbeans

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OWB-523) @SessionScoped bean failover does not work

Posted by "Gurkan Erdogdu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997413#comment-12997413 ] 

Gurkan Erdogdu commented on OWB-523:
------------------------------------

Ying has more experience on this from me because he wrote the failover logic :)

> @SessionScoped bean failover does not work
> ------------------------------------------
>
>                 Key: OWB-523
>                 URL: https://issues.apache.org/jira/browse/OWB-523
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>         Environment: MyFaces 2.0.3, OWB 1.0.0, Tomcat 7.0.8, memcached-session-manager
>            Reporter: Thomas Andraschko
>            Assignee: Gurkan Erdogdu
>            Priority: Minor
>
> OWB failover for @SessionScoped beans does not work.
> A detailed description and a sample project can be found here:
> https://github.com/magro/msm-sample-webapp/tree/openwebbeans

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OWB-523) @SessionScoped bean failover does not work

Posted by "Joe Bergmark (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997575#comment-12997575 ] 

Joe Bergmark commented on OWB-523:
----------------------------------

I think I see why this is not working.  WebBeansConfigurationListener implements HttpSessionActivationListener, but it is never set as an attribute into the session to receive those callbacks.

I wonder if it might make sense to remove that interface from WebBeansConfigurationListener, add it to the FailOverBagWrapper and let the FailOverBagWrapper take care of calling into the FailOverService.  I may take a shot at this if Ying doesn't have a chance.

> @SessionScoped bean failover does not work
> ------------------------------------------
>
>                 Key: OWB-523
>                 URL: https://issues.apache.org/jira/browse/OWB-523
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>         Environment: MyFaces 2.0.3, OWB 1.0.0, Tomcat 7.0.8, memcached-session-manager
>            Reporter: Thomas Andraschko
>            Assignee: YING WANG
>            Priority: Minor
>
> OWB failover for @SessionScoped beans does not work.
> A detailed description and a sample project can be found here:
> https://github.com/magro/msm-sample-webapp/tree/openwebbeans

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OWB-523) @SessionScoped bean failover does not work

Posted by "Joe Bergmark (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13002279#comment-13002279 ] 

Joe Bergmark commented on OWB-523:
----------------------------------

I worked around the above issue by manually copying the war file into runtime/apache-tomcat-7.0.8/webapps/ROOT.war from the target directory.

Still appears to be failing. I don't see the first field saved when I go from 8081 to 8082.  Is there any debug I can turn on in tomcat or memcached to see what attributes it thinks are HttpSessionActivationListeners?

> @SessionScoped bean failover does not work
> ------------------------------------------
>
>                 Key: OWB-523
>                 URL: https://issues.apache.org/jira/browse/OWB-523
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>         Environment: MyFaces 2.0.3, OWB 1.0.0, Tomcat 7.0.8, memcached-session-manager
>            Reporter: Thomas Andraschko
>            Assignee: Joe Bergmark
>            Priority: Minor
>
> OWB failover for @SessionScoped beans does not work.
> A detailed description and a sample project can be found here:
> https://github.com/magro/msm-sample-webapp/tree/openwebbeans

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira