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

JGroups(RMI)を使ったユニキャスト

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

Liferay Supportは、特定のサードパーティ製品を他の製品よりも推奨または承認するものではありません。 Liferayは、これらの製品に関して、ここに記載または参照されているいかなる指示に対しても責任を負いません。 これらの原則の実行は、加入者の責任において行われるものとします。

この記事では、Liferay Portal 6.1でTCP Unicastを設定する方法について、特にTomcat 7.0.25を使用する場合の概要を説明します。

解像度

まず、以下の手順を実行するために、Liferay 6.1 EE のインスタンスが 2 台必要です。
1. ${TOMCAT_HOME}/webapps/ROOT/WEB-INF/lib/portal-impl.jarで、ehcache フォルダを探し、以下の 2 つのファイルを展開します:
- liferay-multi-vm-clustered.xml
- hibernate-clustered.xml
あるいは、これらのファイルは Liferay Source Code の ${SOURCE_CODE}/portal-impl/src/ehcacheにあります。
2. ${TOMCAT_HOME}/webapps/ROOT/WEB-INF/asses に、「ehcache」というフォルダを作成し、そこに2つのファイルを配置します。
3. 両方のファイルで、このクラスを見つけます。
com.liferay.portal.cache.ehcache.LiferayCacheManagerPeerProviderFactory
と置き換えてください。
net.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProviderFactory
4. hibernate-clustered.xmlについては、置き換えられたクラスのプロパティセクションで、次のように変更します:
"connect=TCP(bind_port=18200;bind_addr=192.168.97.162;stats=true):TCPPING(initial_hosts=192.168.97.162[18200],192.168.97.146[18801];port_range=10;timeout=3000;num_initial_members=2;up_thread=true;down_thread=true;stats=true):VERIFY_SUSPECT(timeout=1500;down_thread=false;up_thread=false):pbcast.NAKACK(down_thread=true;up_thread=true;gc_lag=100;retransmit_timeout=3000):pbcast.GMS(join_timeout=125000;join_retry_timeout=12000;shun=false;print_local_addr=false;down_thread=true;up_thread=true;stats=true)"
上記の変更では、192.168.97.162 と 192.168.97.146 の2つのノードが存在します。 162はポート18200を、146はポート18801を使用しています。 これらのポートは変更可能ですが、ポートの衝突を避けるため、互いに離れた場所に設置する必要があるという注意点があります。
他のノードに適用する場合、プロパティìbind_addrîだけが変更されます。 ìinitial_hostsîプロパティは、両方のノードで同じものになります。 順番と関連するポートは、すべてのノードで同じままです。
また、propertySeparator=", "をpropertySeparator=":: "に変更します。
5. liferay-multi-vm-clustered.xmlについては、置き換えられたクラスのプロパティセクションで、次のように変更します:
"connect=TCP(bind_port=19200;bind_addr=192.168.97.162;stats=true):TCPPING(initial_hosts=192.168.97.162[19200],192.168.97.146[17801];port_range=10;timeout=3000;num_initial_members=2;up_thread=true;down_thread=true;stats=true):VERIFY_SUSPECT(timeout=1500;down_thread=false;up_thread=false):pbcast.NAKACK(down_thread=true;up_thread=true;gc_lag=100;retransmit_timeout=3000):pbcast.GMS(join_timeout=125000;join_retry_timeout=12000;shun=false;print_local_addr=false;down_thread=true;up_thread=true;stats=true)"
上記の変更では、192.168.97.162 と 192.168.97.146 の2つのノードが存在します。 162はポート19200を、146はポート17801を使用しています。 これらのポートは変更可能ですが、ポートの衝突を避けるため、互いに離れた場所に設置する必要があるという注意点があります。
他のノードに適用する場合、プロパティìbind_addrîだけが変更されます。 ìinitial_hostsîプロパティは、両方のノードで同じものになります。 順番と関連するポートは、すべてのノードで同じままです。
また、propertySeparator=", "をpropertySeparator=":: "に変更します。
6. 両ファイルとも、このクラスをコメントアウトしてください:
net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory
7. 両方のファイルで、このクラスを見つけます。
com.liferay.portal.cache.ehcache.LiferayCacheEventListenerFactory
と置き換えてください。
net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicatorFactory
このクラスのインスタンスは、liferay-multi-vm-clustered.xmlに約39個、hibernate-clustered.xmlに2個存在することになる。
8. 両方のファイルで、このクラスを見つけます。
com.liferay.portal.cache.ehcache.LiferayBootstrapCacheLoaderFactory
と置き換えてください。
net.sf.ehcache.distribution.jgroups.JGroupsBootstrapCacheLoaderFactory
このクラスのインスタンスは、liferay-multi-vm-clustered.xmlに約39個、hibernate-clustered.xmlに2個存在することになる。
9. liferay-multi-vm-clustered.xmlの中に、このクラスを見つけてください:
com.liferay.portal.kernel.dao.orm.EntityCache
で、対応するプロパティセクションで、"false "引数を "true "に変更します。
properties="replicatePuts=false,replicateUpdatesViaCopy=true" -> properties="replicatePuts=true,replicateUpdatesViaCopy=true"
10. もう一方のノードで繰り返します。 ユニキャストからマルチキャストのデフォルトに戻すには、この2つのファイルを削除するだけです。

追加情報

重要:Liferayが作成したものではない製品に関する情報は、情報提供のみを目的としており、Liferay Supportの推奨や推薦を意味するものではありません。
did-this-article-resolve-your-issue

legacy-knowledge-base