付録C.12 設定ファイル格納ディレクトリの見直し

Cosminexus Portal Framework 06-10以前のバージョンからバージョンアップする場合は,設定ファイルおよびポートレット配置情報ファイルの格納ディレクトリを見直します。

J2EEサーバモードの場合,設定ファイルおよびポートレット配置情報ファイルの格納ディレクトリを変更すると,ポータルサーバを再起動するだけで,設定ファイルおよびポートレット配置情報ファイルでの設定変更を反映できるようになります。設定ファイルおよびポートレット配置情報ファイルの格納ディレクトリを変更しない場合は,設定ファイルおよびポートレット配置情報ファイルを変更したあとで,ポータルプロジェクトのWebアプリケーションファイルを再作成する必要があります。

設定ファイルおよびポートレット配置情報ファイルの格納ディレクトリの移行手順を次に示します。

  1. 設定ファイルを任意のディレクトリに移動します。
    対象となるファイルは{PROJECT_HOME}¥WEB-INF¥confディレクトリ配下の次のファイルです。
    • controllers.xml
    • EmPowerment.xml
    • formbase-auth.cfg
    • jetspeed-config.jcfg
    • JetspeedResources.properties
    • PortalResources.properties
    • PortletGroup.xml
    • Repository.xml
    • TurbineResources.properties
    • UserAgentType.xml
  2. web.xmlを編集します。
    web.xmlで定義しているjetspeedサーブレットのプロパティ値のTurbineResources.propertiesファイルを指定しているパスを,移動したパスに変更します。ここでは,C:¥portal¥confディレクトリに移動した場合とします。

    [図データ]

  3. PortalResources.propertiesファイルのプロパティを修正します。
    修正前および修正後のプロパティ内容を次の表に示します。なお,修正後の太字部分は,修正が必要な個所です。

    表C-11 PortalResources.propertiesファイルの修正内容

    項番修正前/修正後プロパティ内容
    1修正前jp.co.hitachi.soft.portal.services.controllers.filename=${webapp.dir}/WEB-INF/conf/controllers.xml
    修正後jp.co.hitachi.soft.portal.services.controllers.filename=${config.dir}/controllers.xml
    2修正前jp.co.hitachi.soft.portal.services.empowerment.filename=${webapp.dir}/WEB-INF/conf/EmPowerment.xml
    修正後jp.co.hitachi.soft.portal.services.empowerment.filename=${config.dir}/EmPowerment.xml
    3修正前jp.co.hitachi.soft.portal.services.portletgroup.filename=${webapp.dir}/WEB-INF/conf/PortletGroup.xml
    修正後jp.co.hitachi.soft.portal.services.portletgroup.filename=${config.dir}/PortletGroup.xml
    4修正前jp.co.hitachi.portal.services.repository.filename=${webapp.dir}/WEB-INF/conf/Repository.xml
    修正後jp.co.hitachi.portal.services.repository.filename=${config.dir}/Repository.xml
    追加するプロパティ内容を次の表に示します。

    表C-12 PortalResources.propertiesファイルへの追加内容

    項番プロパティ内容
    1jp.co.hitachi.soft.portal.webapp.formbase.cfg=${config.dir}/formbase-auth.cfg
  4. JetspeedResources.propertiesファイルのプロパティを修正します。
    修正前および修正後のプロパティ内容を次の表に示します。なお,修正後の太字部分は,修正が必要な個所です。

    表C-13 JetspeedResources.propertiesファイルの修正内容

    項番修正前/修正後プロパティ内容
    1修正前services.RegistryManager.url=/WEB-INF/conf/jetspeed-config.jcfg
    修正後services.RegistryManager.url=${config.dir}/jetspeed-config.jcfg
    2修正前UserAgentType.xml.url=${webapp.dir}/WEB-INF/conf/UserAgentType.xml
    修正後UserAgentType.xml.url=${config.dir}/UserAgentType.xml
    3修正前customization.psml=/WEB-INF/psml/customize.psml
    修正後customization.psml=${psml.dir}/customize.psml
    4修正前customization.admin.psml=/WEB-INF/psml/portaladmin.psml
    修正後customization.admin.psml=${psml.dir}/portaladmin.psml
    5修正前customization.section.psml=/WEB-INF/psml/portalsection.psml
    修正後customization.section.psml=${psml.dir}/portalsection.psml
  5. ポートレット配置情報ファイル(PSMLファイル)を移動します。
    {PROJECT_HOME}¥WEB-INF¥psml配下のすべてのファイル(サブディレクトリを含みます)を任意のディレクトリに移動します。ここでは,C:¥portal¥psmlに設定する場合とします。
  6. psmlファイルディレクトリを設定します。
    PortalResources.propertiesファイルのjp.co.hitachi.soft.portal.access.psml.dirプロパティに5.で移動したディレクトリを設定します。
    <設定例>

    jp.co.hitachi.soft.portal.access.psml.dir=C:/portal/psml/