1

我目前正在尝试使从头开始编写的应用程序可部署在 Tomcat 6.0.32 集群上,并具有会话/状态复制功能。

一切正常,除了一件事:如果集群的一个节点失败并且请求被重定向到另一个节点,我将不再登录。重新登录后,会话和对话范围 bean 的状态将恢复,所以除了登录部分之外,复制基本上可以工作。

我已经尝试了一切,但我真的没有想法了。有人可以给我一个提示吗?

我的配置如下:Apache HTTPD and modjk, Apache Tomcat 6.0.32 ,Seam 2.2.2.Final

我在 web.xml 中标记了可分发的应用程序:

<distributable />

在 components.xml 中:

...
<core:init debug="false" distributable="true" />
...
<security:identity authenticate-method="#{authenticator.authenticate}" />
...

身份验证器类(基本上您现在可以在没有用户/密码的情况下登录):

@Name("authenticator")
@Scope(ScopeType.EVENT)
public class ResidentAuthenticator implements Serializable {

private static final long serialVersionUID = 4655419361907742527L;

    public boolean authenticate() {

        return true;
    }
}

那么,有人有想法吗?谢谢 !

4

0 回答 0