[
https://issues.apache.org/jira/browse/OWB-385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
YING WANG updated OWB-385:
--------------------------
Attachment: owb-385-2.patch
Sorry, fogot checkstyle. the second patch fixed CS issues and 2 minor bugs in
the code. Please try this one. The reasons of using Externalizable are:
1. Java ObjectStreams will not work for proxies. So we use a wrapper to do the
work by using javassit object streams.
2. For performance reason, we just need to transfer passivation id instead of
beans. (some fields of bean class is hard to be serialized).
3. the failover bag holds a sessioncontext and a map of conversationcontexts.
It does not handle each individual beans.
To enable, please define:
org.apache.webbeans.spi.FailOverService=org.apache.webbeans.web.failover.DefaultOwbFailOverService
org.apache.webbeans.web.failover.issupportfailover=true
org.apache.webbeans.web.failover.issupportpassivation=true
In my test, I have one proxy server =>1 cluster of 2 servers. access the
application through the proxy server, then kill the server served the requests,
then continue accessing the app, both session scope/conversation bean instances
are failovered to the other server.
> implement passivation of managed beans in ServletContextListener
> ----------------------------------------------------------------
>
> Key: OWB-385
> URL: https://issues.apache.org/jira/browse/OWB-385
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Context and Scopes
> Affects Versions: 1.0.0-alpha-1
> Reporter: Eric Covener
> Assignee: YING WANG
> Fix For: 1.0.0-alpha-2
>
> Attachments: owb-385-1.patch, owb-385-2.patch
>
> Original Estimate: 60h
> Remaining Estimate: 60h
>
> Message-ID: <[email protected]>
> Currently we have no support for those callbacks for managed beans. Also
> includes AroundTimeout method.
> Motivation
> ----------------------
> Actually we have 2 methods in WebBeansConfigurationListener. Currently our
> session and conversation context does not provided actiovation/passivation.
> What we have to do is that we update below lifecycle callbacks to put all
> session and conversation context instances into the session in the
> "sessionWillPassivate" and call passivate callback, and reverse it on
> "sessionDidActivate".
> Those areas needs some contributions :)
> /**
> * {...@inheritdoc}
> */
> @Override
> public void sessionDidActivate(HttpSessionEvent event)
> {
> //TODO activation
> //Gets all passivated instances from passivated session and restore our
> session and conversation context.
> }
> /**
> * {...@inheritdoc}
> */
> @Override
> public void sessionWillPassivate(HttpSessionEvent event)
> {
> //TODO Passivation
> //Gets all instances from the Session and ConversationContexts
> and add those into the session that is under passivation therefore our
> bean instances
> are correctly passivated
> }
> Thanks;
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.