legacy-knowledge-base
公開されました Sep. 10, 2025

LiferayポータルでWeblogicのセッションレプリケーションを設定する

written-by

Liferay Support

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

この記事では、Weblogicを使用してLiferay Portalでセッションレプリケーションをセットアップする方法を概説します。

解決策

  1. Liferay Portal .war を解凍エディターで開く。
  2. 次のファイルへ行きます: /WEB-INF/weblogic.xml
  3. セクションにこのコードを追加します。
    <session-descriptor>
        <persistent-store-type>async-replicated-if-clustered</persistent-store-type>
    
  4. weblogic.xml ファイルは、Weblogic 10.3.6 以降では、次のようになります:
    <xml version="1.0"?>
    
    <weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.2/weblogic-web-app.xsd">
    	<jsp-descriptor><keepgenerated>true</keepgenerated><page-check-seconds>60</page-check-seconds><precompile>true</precompile><precompile-continue>true</precompile-continue>
    	</jsp-descriptor>
    	<container-descriptor>
    		<prefer-application-packages>package-name>org.mozilla.*
    		</prefer-application-packages>
    		<optimistic-serialization>true</optimistic-serialization>
    		<show-archived-real-path-enabled>true</show-archived-real-path-enabled>
    	</container-descriptor>
    	<session-descriptor>
    		<persistent-store-type>async-replicated-if-clustered</persistent-store-type>
    	</session-descriptor>
    	<context-root>/</context-root>
    </weblogic-web-app>
    
  5. ファイルを保存します。
  6. War を Weblogic Application Server にデプロイします。
  7. 各ノードについて、この手順を繰り返します。

Weblogic 10.3.2以前を使用している場合、Liferay Portal prefer-application-packagesの代わりに prefer-web-inf-classes を使用しなければなりません。

利用者は、ポータル.warをアプリケーションサーバにデプロイする前に、以下の追加のステップに従わなければなりません。

  1. weblogic.xml ファイルのセクションで、 prefer-application-packages を以下に置き換えます:
    <prefer-web-inf-classes>true
  2. WEB-INF/libにある以下の jar を削除してください:
    • jaxrpc.jar
    • stax.jar
    • wstx.jar
    • xml-apis.jar
  3. 修正したwarをアプリケーションサーバーにデプロイします。
  4. 各ノードについて、この手順を繰り返します。

ロードバランシング

理想的には、クラスターはロードバランサーで最適化するのがベストです。 ただし、ロードバランサーの設定は本記事やLiferay Supportの管轄外です。 ロードバランサーに関する資料は、ApacheなどのWebサーバーのベンダーから入手することができます。

did-this-article-resolve-your-issue

legacy-knowledge-base