Oracle WebCenter Framework WebCenterアプリケーションの構築 - ステップ・バイ・ステップ 10g(10.1.3.2.0) E05617-02 |
|
この章の手順では、Application Server Controlコンソールを使用してアプリケーションをデプロイする方法を示します。本番環境にアプリケーションをデプロイする方法は、『Oracle WebCenter Framework開発者ガイド』を参照してください。
SRDemoアプリケーションをOracle Application ServerまたはスタンドアロンOC4Jにデプロイするには、次の手順を実行します。
汎用EARファイルを作成するには、次の手順を実行します。
SRDemoSample_WebCenter.deploy
と入力し(図10-1を参照)、「OK」をクリックします。
---- Deployment started. ---- May 29, 2007 1:24:32 PM Target platform is Standard J2EE. Exporting portlet metadata and customizations Wrote EJB JAR file to C:¥SRDemo¥wc_starter¥SRDemoSample_WCS¥DataModel¥deploy¥SRFacade.jar Wrote WAR file to C:¥SRDemo¥wc_starter¥SRDemoSample_WCS¥UserInterface¥deploy¥SRDemoSample_WebCenter.war Wrote EAR file to C:¥SRDemo¥wc_starter¥SRDemoSample_WCS¥UserInterface¥deploy¥SRDemoSample_WebCenter.ear Elapsed time for deployment: 25 seconds ---- Deployment finished. ---- May 29, 2007 1:24:57 PM
今度は、Oracle Application Serverがインストールされているマシンに切り替えて、次の手順を実行します。
C:¥java¥srdemo_oc4j>C:¥java¥jdev¥jdk¥bin¥java -jar C:¥java¥srdemo_oc4j¥adfp¥lib¥portlet-client-deploy.jar -predeploy -source C:¥Temp¥SRDemoSample_WebCenter.ear -target C:¥Temp¥SRDemoSample_WC_target.ear
ソース・ファイルは、すでに作成した汎用EARファイルです。
デプロイ前ツールを実行すると、様々な設定を指定するように要求されます。出力は、
例10-2のようになります(ユーザー定義の設定は太字で表示)。
Processing Arguments Run Mode : 1 Source : C:¥Temp¥SRDemoSample_WebCenter.ear Target : C:¥Temp¥SRDemoSample_WC_target.ear Deployed App : null Mapping File : null Deployed App : null Cleaning up C:¥DOCUME~1¥ADMINI~1¥LOCALS~1¥Temp¥predeploy¥ May 16, 2007 12:25:33 PM oracle.adf.share.config.ADFConfigFactory findOrCreateADF Config INFO: oracle.adf.share.config.ADFConfigFactory No META-INF/adf-config.xml found Processing source EAR file Source EAR file processed Processing adf-config.xml adf-config.xml processed Processing connections.xml connections.xml processed Creating a new Deployment Profile for : C:¥Temp¥SRDemoSample_WebCenter.ear Development MDS Repository Path : ../../mds/;../../ Enter new MDS Repository Path : C:¥java¥srdemo_oc4j¥mds¥SRDemo Producer : OmniPortletProducer_11743434494566c52fb80-0111-1000-8001-a9fe02025106 Current Service URL : http://pdtsdemo1.us.oracle.com:8888/portalTools/omniPortl et/providers/omniPortlet Current Proxy URL : Current Proxy Port : 0 Do you want to modify this connection? (Y/N [default=N]) : N Validating producer OmniPortletProducer_11743434494566c52fb80-0111-1000-8001-a9fe02025106 . . . Do you wish to save this new Deployment Profile (Y/N [default=N]) : y Enter a name for this Deployment Profile (e.g. 'Production') : srdemo_deploy Enter the path for the Deployment Profile XML file (e.g. 'C:¥profile.xml'): C:¥temp¥srdemo_deploy.xml Saving to C:¥temp¥srdemo_deploy.xml Cleaning up C:¥DOCUME~1¥ADMINI~1¥LOCALS~1¥Temp¥predeploy¥ Extracting View Documents, MDS and connections.xml from source EAR file Examining contents of SRDemoSample_WebCenter.war Moving C:¥DOCUME~1¥ADMINI~1¥LOCALS~1¥Temp¥predeploy¥tmppkg¥views¥SRDemoSample_WebCenter¥WEB-IN F to C:¥DOCUME~1¥ADMINI~1¥LOCALS~1¥Temp¥predeploy¥view¥UserInterface¥public_html¥WEB-INF . . . MDS extracted from source EAR file Creating target EAR file Processing source EAR file . . . Source EAR file processed Processing adf-config.xml adf/META-INF/adf-config.xml [Recreated] adf-config.xml processed Processing connections.xml Validating producer OmniPortletProducer_11743434494566c52fb80-0111-1000-8001-a9fe02025106 . . . adf/META-INF/connections.xml [Recreated] connections.xml processed Processing SRDemoSample_WebCenter.war WEB-INF/lib/META-INF/adf-config.xml [Recreated in WAR file] WEB-INF/classes/META-INF/connections.xml [Recreated in WAR file] WEB-INF/lib/META-INF/connections.xml [Recreated in WAR file] SRDemoSample_WebCenter.war [Recreated] WAR file processed Creating target EAR file WAR file processed source MDS Path (temp) : C:¥DOCUME~1¥ADMINI~1¥LOCALS~1¥Temp¥predeploy¥mds Production MDS Path : C:¥java¥srdemo_oc4j¥mds¥SRDemo Connections.xml Path : C:¥DOCUME~1¥ADMINI~1¥LOCALS~1¥Temp¥predeploy¥connections.xml.new Export ID : /export May 16, 2007 12:25:58 PM oracle.mds NOTIFICATION: "oracle.portlet.client.persistenceimpl.mds.ImportListener"::"preOperation" is being invoked. . . . NOTIFICATION: Transferring the document /UserInterface/public_html/app/staff/SRS taffSearch.jspx. NOTIFICATION: import is completed. Total number of documents successfully proces sed : 24, total number of documents failed : 0. Moving C:¥DOCUME~1¥ADMINI~1¥LOCALS~1¥Temp¥predeploy¥SRDemoSample_WC_target.ear t o C:¥Temp¥SRDemoSample_WC_target.ear Target EAR C:¥Temp¥SRDemoSample_WC_target.ear created Cleaning up C:¥DOCUME~1¥ADMINI~1¥LOCALS~1¥Temp¥predeploy¥
注意
例10-2では、すべてのポートレット・プロデューサに対する既存の設定をそのまま変更せずにおいてあります。これらの設定は、 |
SRDemoのユーザーおよびロールは、アプリケーションをデプロイするOracle Application Serverにまだ存在していないため、JAZN移行ツールをレルム・モードで実行して、アプリケーション・サーバーまたはスタンドアロンOC4Jのsystem-jazn-data.xml
グローバル・ファイルを更新する必要があります。
SRDemoのユーザーおよびロールを追加するには、次の手順を実行します。
system-jazn-data-starter.xml
ファイルを開始時にダウンロードしたZIPファイルで探します。このファイルには、ユーザーおよびロールが格納されています。
system-jazn-data.xml
ファイルをバックアップします。このファイルは、ORACLE_HOME
¥j2ee¥home¥config¥system-jazn-data.xmlにあります。
set CLASSPATH = ORACLE_HOME/j2ee/home/jazn.jar;ORACLE_HOME/BC4J/lib/adfshare.jar
たとえば、ORACLE_HOMEがC:¥java¥srdemo_oc4j
の場合、次のようにクラスパスを設定します。
set CLASSPATH = C:¥java¥srdemo_oc4j/j2ee/home/jazn.jar; C:¥java¥srdemo_oc4j/BC4J/
lib/adfshare.jar
java oracle.security.jazn.tools.JAZNMigrationTool -sr jazn.com -dr jazn.com -st xml -dt xml -sf C:¥Temp¥system-jazn-data-starter.xml -df C:¥java¥srdemo_ oc4j¥j2ee¥home¥config¥system-jazn-data.xml -m realm
開発環境と同じ方法で、Oracle Application Serverのホスト・システムにサンプル・コンテンツを設定する必要があります。そのためには、srcontentrepository.zip
の内容をC:¥SDemo_App_Download
からC:¥srdemo
に抽出します。
ターゲットEARファイルの生成は済んでいるので、デプロイする準備ができました。デプロイは、次のようにApplication Server Controlコンソールを使用して行います。
http://
<host_name>.<domain>:<port>
/em.
に移動します。たとえば、http://test.acme.com:8888/em
などです。
Application Server Controlコンソールの正確のURLを見つけるには、readme.txt
を参照してください。インストール後、このテキスト・ファイルは、次のOracle Application Serverの場所に保存されます。
UNIXの場合: ORACLE_HOME
/install/readme.txt
Windowsの場合: ORACLE_HOME
¥install¥readme.txt
[May 16, 2007 5:05:11 PM] Application Deployer for SRDemo STARTS. [May 16, 2007 5:05:11 PM] Copy the archive to C:¥java¥srdemo_oc4j¥j2ee¥home¥applications¥SRDemo.ear [May 16, 2007 5:05:12 PM] Initialize C:¥java¥srdemo_ oc4j¥j2ee¥home¥applications¥SRDemo.ear begins... [May 16, 2007 5:05:12 PM] Unpacking SRDemo.ear [May 16, 2007 5:05:15 PM] Done unpacking SRDemo.ear [May 16, 2007 5:05:15 PM] Unpacking SRDemoSample_WebCenter.war [May 16, 2007 5:05:25 PM] Done unpacking SRDemoSample_WebCenter.war [May 16, 2007 5:05:26 PM] Initialize C:¥java¥srdemo_ oc4j¥j2ee¥home¥applications¥SRDemo.ear ends... [May 16, 2007 5:05:26 PM] Starting application : SRDemo [May 16, 2007 5:05:26 PM] Initializing ClassLoader(s) [May 16, 2007 5:05:26 PM] Initializing EJB container [May 16, 2007 5:05:26 PM] Loading connector(s) [May 16, 2007 5:05:27 PM] Starting up resource adapters [May 16, 2007 5:05:27 PM] Processing EJB module: SRFacade.jar [May 16, 2007 5:05:29 PM] Initializing EJB sessions [May 16, 2007 5:05:29 PM] Committing ClassLoader(s) [May 16, 2007 5:05:29 PM] Initialize SRDemoSample_WebCenter begins... [May 16, 2007 5:05:29 PM] Initialize SRDemoSample_WebCenter ends... [May 16, 2007 5:05:29 PM] Started application : SRDemo [May 16, 2007 5:05:29 PM] Binding web application(s) to site default-web-site begins... [May 16, 2007 5:05:29 PM] Binding SRDemoSample_WebCenter web-module for application SRDemo to site default-web-site under context root SRDemo [May 16, 2007 5:06:54 PM] Initializing Servlet: javax.faces.webapp.FacesServlet for web application SRDemoSample_WebCenter [May 16, 2007 5:06:55 PM] Initializing Servlet:oracle.adfinternal.view.faces.renderkit.html.portlet.ADFPortletServlet for web application SRDemoSample_WebCenter [May 16, 2007 5:06:55 PM] Binding web application(s) to site default-web-site ends... [May 16, 2007 5:06:55 PM] Application Deployer for SRDemo COMPLETES. Operation time: 103484 msecs
これで、アプリケーションはデプロイされましたが、まだアクセスできません。まず、セキュリティ・ポリシーをデプロイする必要があります。
セキュリティ・ポリシーは、app-jazn-data.xml
ファイル内のアプリケーションのEARファイルにバンドルされます。アプリケーションのポリシーをデプロイするには、次の手順を実行します。
app-jazn-data.xml
ファイルを探します。ORACLE_HOMEがC:¥java¥srdemo_oc4j
である場合、このファイルは、C:¥java¥srdemo_oc4j¥j2ee¥home¥applications¥SRDemo¥adf¥META-INF¥app-jazn-data.xml
にあります。
set CLASSPATH = ORACLE_HOME/j2ee/home/jazn.jar;ORACLE_HOME/BC4J/lib/adfshare.jar
たとえば、ORACLE_HOMEがC:¥java¥srdemo_oc4j
の場合、次のようにクラスパスを設定します。
set CLASSPATH = C:¥java¥srdemo_oc4j/j2ee/home/jazn.jar; C:¥java¥srdemo_oc4j/BC4J/
lib/adfshare.jar
C:¥java¥srdemo_oc4j
がOracleホームの場所であることが前提です)。
java oracle.security.jazn.tools.JAZNMigrationTool -sr jazn.com -dr jazn.com -st xml -dt xml -sf C:¥java¥srdemo_ oc4j¥j2ee¥home¥applications¥SRDemo¥adf¥META-INF¥app-jazn-data.xml -df C:¥java¥srdemo_oc4j¥j2ee¥home¥config¥system-jazn-data.xml -m policy
ポリシー情報が移行されます。これで、アプリケーションの実行準備ができました。
今度は、SRDemoにアクセスできます。そのためには、次の手順を実行します。
http://appserver_host_name:appserver_port_number/SRDemo/faces/app/SRWelcome.jspx
この章では、アプリケーションを取得してデプロイする方法を示しました。この時点で、アプリケーションを実行し、このマニュアルを通して作成したページおよびコンポーネントを表示できます。また、作成したアプリケーションとサンプル・ファイル内に付属する完成バージョンを比較することもできます。比較するには、install.htmlファイルの指示に従って完成したデモを実行します。
|
![]() Copyright © 2007 Oracle Corporation. All Rights Reserved. |
|