Weblogic会话复制

时间:2012-04-30 17:59:29

标签: session weblogic replication

我似乎无法让Weblogic的会话复制工作。 我在我的web.xml中进行了设置,以便所有请求都需要管理员凭据:

<security-constraint>
    <web-resource-collection>
        <web-resource-name>redirect</web-resource-name>
        <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
        <role-name>Admin</role-name>
    </auth-constraint>
    <user-data-constraint>
        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
</security-constraint>
<login-config>
    <auth-method>FORM</auth-method>
    <realm-name>myrealm</realm-name>
    <form-login-config>
        <form-login-page>
            /login.jsp
        </form-login-page>
        <form-error-page>
            /login.jsp
        </form-error-page>
    </form-login-config>
</login-config>

在我的weblogic.xml中,我设置了:

<session-descriptor>
    <persistent-store-type>replicated_if_clustered</persistent-store-type>
</session-descriptor>

我的测试用例是两个托管服务器。

  1. 导航到我的网页。
  2. 关闭一个托管服务器。 (我目前所连接的那个)
  3. 发生故障转移,我被要求提供我的凭据。
  4. 我希望无故障地进行故障转移,而不必让我重新进入。

1 个答案:

答案 0 :(得分:0)

尝试在Weblogic管理控制台中启用会话复制选项...

登录管理员

console -> goto cluster -> goto advanced -> tick Session replication.

注意:触摸.xml文件以更改任何属性都不是一个好习惯....