[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3172) Shutting down cluster node gracefully, causes NoSuchEJBException on next request

Nikolay Elenkov (JIRA) jira-events at lists.jboss.org
Fri Aug 29 08:22:23 EDT 2008


    [ https://jira.jboss.org/jira/browse/JBSEAM-3172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12427297#action_12427297 ] 

Nikolay Elenkov commented on JBSEAM-3172:
-----------------------------------------

JBoss-specific workaround: 

1. Extend SeamListener and override sessionDestroyed and contextDestroyed
2. Install in web.xml in place of SeamListener

{code:title=MySeamListener.java|borderStyle=solid}
public class MySeamListener extends SeamListener {
   
    @Override
    public void sessionDestroyed(HttpSessionEvent event) {
        boolean inShutdown = isInShutdown();
        if (!inShutdown) {
            super.sessionDestroyed(event);
        }
    }

    @Override
    public void contextDestroyed(ServletContextEvent event) {
        boolean inShutdown = isInShutdown();
        if (!inShutdown) {
            super.contextDestroyed(event);
        }
    }

    private boolean isInShutdown() {
        MBeanServer server = org.jboss.mx.util.MBeanServerLocator.locateJBoss();
     
        Properties props = new Properties();
        props.put("type", "Server");
        ObjectName name = new ObjectName("jboss.system", props);
        boolean result = (Boolean) (server.getAttribute(name, "InShutdown"));

        return result;
    }
}
{code}


> Shutting down cluster node gracefully, causes NoSuchEJBException on next request
> --------------------------------------------------------------------------------
>
>                 Key: JBSEAM-3172
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3172
>             Project: Seam
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.3.CR1
>         Environment: OS: Linux (RHEL 5), JBoss 4.2.2, Seam 2.0.3-SNAPSHOT (same for 2.0.2.SP1, 2.0.3.CR1)
>            Reporter: Nikolay Elenkov
>
> Application (ear) is  deployed to a two node JBoss cluster.
> Setup:
> 1. two nodes (node1, node2)
> 2. load balancing/failover by Apache with mod_jk
> 3. sticky sessions
> 4. session replication confirmed to work for http session and SFSB (by JBoss trace log)
> 5. shared database
> Steps to reproduce:
> 1. login to app, go to same page backed by a SFSB, start new conversation
> 2. enter some data (saved in SFSB fields)
> 3. stop JBoss on node1 gracefully (shutdown.sh)
> 4. click submit
> 5. NoSuchEJBException: "Could not find stateful bean: 4sv1g5o-jqzric-fhyhsk09-1-fhyhunhd-9"
> The next request, creates a new SFSB/conversation and it works as expected from there.
> Note that if I kill -s 9 JBoss, SFSB's are not removed and failover works as expected. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list