BEA ホーム | 製品 | dev2dev | support | askBEA
 ドキュメントのダウンロード   サイト マップ   Glossary 
検索

WebLogic Server 7.0 へのアップグレード

 Previous Next Contents PDF で侮ヲ  

Pet Store アプリケーションおよびサンプル サーバのアップグレード

この付録では、以下のプロセスの例を示します。

注意: WebLogic Server 7.0 のサンプルと Pet Store は、デフォルトのセキュリティ コンフィグレーションを使用するようにコンフィグレーションされています。WebLogic Server 7.0 のサンプルと Pet Store を互換性セキュリティで実行することはできません。

 


このドキュメントで使用する用語

説明に 3 つのバージョンがすべて登場する場合は、WebLogic ホーム ディレクトリに対してバージョンごとに個別の用語を使用します。この規則は、ドメイン コンフィグレーションの移植方法の説明をわかりやすくするために、このドキュメントで使用します。

このドキュメントでは、WL_HOME を WebLogic Server 6.x および 7.0 のホームとして定義します。

6.0 の場合 WL_HOME=D:¥WLS_6.0¥wlserver6.0

6.1 の場合 WL_HOME=D:¥WLS_6.1¥wlserver6.1

7.0 の場合 WL_HOME=D:¥WLS_7.0¥weblogic700

 


Pet Store アプリケーションの WebLogic 6.1 サービス パック 3 から WebLogic Server 7.0 へのアップグレード

WebLogic 6.1 サービス パック 3 から Pet Store アプリケーションを WebLogic Server 7.0 にアップグレードする必要はありません。この節では、アプリケーションを 6.1 から 7.0 へアップグレードする方法の例として、その手順を説明します。WebLogic 6.1 サービス パック 3 Pet Store アプリケーションを WebLogic Server 7.0 で使用するためにアップグレードするには、以下の作業を行います。

  1. WebLogic Server 7.0 をインストールする.

  2. 6.1 サービス パック 3 のドメイン コンフィグレーションで WebLogic Server 7.0 の環境を設定する.

  3. WebLogic Server 7.0 で Pet Store アプリケーションを起動する.

WebLogic Server 7.0 をインストールする

WebLogic Server 7.0 をインストールします。『インストール ガイド』を参照してください。

注意: 古いバージョンと同じ場所に新しいバージョンをインストールしようとすると、インストーラにより警告が出されます。

6.1 サービス パック 3 のドメイン コンフィグレーションで WebLogic Server 7.0 の環境を設定する

WebLogic 6.1 サービス パック 3 の Pet Store アプリケーションを WebLogic Server 7.0 にアップグレードするには、以下の作業を行います。

  1. WebLogic Server 6.x では受け入れられていたが WebLogic Server 7.0 のパーサでは拒否される Pet Store のタグ ライブラリ エラーを修正します。

  2. WL_HOME/config/petstore ディレクトリを、WebLogic Server 6.1 から、インストールされている WebLogic Server 7.0 内の場所にコピーします。次回のアップグレードの際にドメインを移動しなくても済むように、ディレクトリを WL_HOME にコピーしないことをお勧めします。

注意: Pet Store をコピーする WebLogic Server 7.0 のディレクトリが、Pet Store の WebLogic Server 6.1 でのディレクトリの位置と同じ場合は、新しいディレクトリ位置を反映するために config.xml ファイルを編集する必要はありません。異なるディレクトリ位置に Pet Store をコピーする場合は、config.xml ファイルですべてのファイルおよびディレクトリの絶対パスを見つけて、相対パスに変更する必要があります。

  1. startPetstore.cmd スクリプトを編集して、新しい WebLogic Server 7.0 のインストールと、新しいディレクトリ位置 (存在する場合) を反映します。

  2. config.xml ファイルを編集して、新しい WebLogic Server 7.0 のインストールと、新しいディレクトリ位置 (存在する場合) を反映します。

この節には以下のものが含まれています。

注意: Pet Store アプリケーションを WebLogic Server 7.0 にアップグレードするために、weblogic.xml および web.xml ファイルの DTD を更新する必要はありません。WebLogic Server 7.0 の DTD については、『WebLogic エンタープライズ JavaBeans プログラマーズ ガイド』の「weblogic-ejb-jar.xml 文書型定義」を参照してください。

JSP 解析エラーの修正

以前のバージョンの WebLogic Server で解析可能だった軽微なエラーは、JDK 1.4 では受け入れられないため、WebLogic Server 8.1 においてはエラーの原因となります。この節で修正されるエラーは、メソッドとセッターのプロパティが一致しないプロパティ設定です。

エラーの修正には、次のソース ファイルに対する変更が必要となります。

ListTag.java
CartListTag.java
MyListTag.java
ProductItemListTag.java
ProductListTag.java
SearchListTag.java

これらのファイルはすべて、WL_HOME\samples\petStore\src\petstore\src\com\sun\j2ee\blueprints\petstore\taglib\list ディレクトリ (WL_HOME は WebLogic Server のインストール ディレクトリ) に置かれています。

ListTag.java で置換を行うには、次の手順を使用します。

  1. コマンド コンソールで、WL_HOME\samples\petStore\src\petstore\src\com\sun\j2ee\blueprints\petstore\taglib\list に移動します。次に例を示します。

    C:¥> cd WL_HOME\samples\petStore\src\petstore\src\com\sun\j2ee\blueprints\petstore\taglib\list

  2. テキスト エディタで ListTag.java を開きます。次に例を示します。

    WL_HOME\samples\petStore\src\petstore\src\com\sun\j2ee\blueprints\petstore\taglib\list>notepad ListTag.java.

  3. 次の箇所を変更します。
    public void setNumItems(String numItemsStr) {

    numItems = Integer.parseInt(numItemsStr);

    }

    この行を次のように変更します。

    public void setNumItems(int numItemsIn) {
    numItems = numItemsIn;
    }

  4. 次の箇所を変更します。
    public void setStartIndex(String startIndexStr) {
    startIndex = Integer.parseInt(startIndexStr);
    }

    この行を次のように変更します。

    public void setStartIndex(int startIndexIn) {
    startIndex = startIndexIn;
    }

  5. ListTag.java を保存して閉じます。

その他のファイルでの置換を、次のように行います。

  1. コマンド コンソールで、WL_HOME\samples\petStore\src\petstore\src\com\sun\j2ee\blueprints\petstore\taglib\list に移動します。次に例を示します。

    C:\>cd WL_HOME\samples\petStore\src\petstore\src\com\sun\j2ee\blueprints\petstore\taglib\list

  2. テキスト エディタで CartListTag.java を開きます。次に例を示します。

    WL_HOME\samples\petStore\src\petstore\src\com\sun\j2ee\blueprints\petstore\taglib\list>notepad CartListTag.java.

  3. CartListTag.java から、次の行を削除します。
    public void setNumItems(String numItemsStr) {
    super.setNumItems(numItemsStr);
    }
      public void setStartIndex(String startIndexStr) {
    super.setNumItems(startIndexStr);
    }

  4. 次の行と置き換えます。
    public void setNumItems(int numItems) {
    super.setNumItems(numItems);
    }
    public void setStartIndex(int startIndex) {
    super.setNumItems(startIndex);
    }

  5. ProductListTag.java を保存して閉じます。

  6. 残りのファイルについても、手順 1 から 5 を繰り返します。
    MyListTag.java
    ProductItemListTag.java
    ProductListTag.java
    SearchListTag.java

Pet Store の再構築

Pet Store に対する修正を行った後、アプリケーションを再構築します。

  1. コマンド コンソールで、WebLogic Server 6.x の WL_HOME\config\examples ディレクトリに移動し、環境を設定します。

    WL_HOME\config\examples> setexamplesenv.cmd (or .sh)

  2. 同じコンソール内で、WL_HOME\samples\petStore\src\petstore\src ディレクトリに移動して、次のように再構築を行います。

    WL_HOME\samples\petStore\src\petstore\src> build

    スクリプトにより、petstore.earWL_HOME\samples\petStore\src\petstore\build に構築されます。

WebLogic Server 6.1 サービス パック 3 の起動に使用する startPetstore.cmd スクリプト

@echo off
@rem This script can be used to start WebLogic Server for the purpose
@rem of running the PetStore application. This script ensures that the server is started
@rem using the config.xml file found in this directory and that the CLASSPATH
@rem is set appropriately. This script contains the following variables:
@rem
@rem JAVA_HOME - Determines the version of Java used to start
@rem WebLogic Server. This variable must point to the
@rem root directory of a JDK installation. and will be set
@rem for you by the WebLogic Server installer. Note that
@rem this script uses the hotspot VM to run WebLogic Server.
@rem If you choose to use a JDK other than the one
@rem included in the disribution, make sure that the JDK
@rem includes the hotspot VM. See the WebLogic platform
@rem support page (http://e-docs.bea.com/wls/platforms/index.html)
@rem for an up-to-date list of supported JVMs on Windows NT.
@rem
@rem When setting these variables below, please use short file names (8.3).
@rem To display short (MS-DOS) filenames, use "dir /x". File names with
@rem spaces will break this script.
@rem
@rem jDriver for Oracle users: This script assumes that native libraries
@rem required for jDriver for Oracle have been installed in the proper
@rem location and that your system PATH variable has been set appropriately.
@rem For additional information, refer to Installing and Setting up WebLogic
@rem Server (http://e-docs.bea.com/wls/docs61/install/index.html).
SETLOCAL
cd ..¥..
@rem Set user-defined variables.
set JAVA_HOME=d:¥610sp2¥jdk131
@rem Check that script is being run from the appropriate directory
if not exist lib¥weblogic.jar goto wrongplace
goto checkJDK
@rem :wrongplace
@rem echo startPetStore.cmd must be run from the config¥petStore directory. 1>&2
@rem goto finish
:checkJDK
if exist "%JAVA_HOME%/bin/javac.exe" goto runWebLogic
echo.
echo Javac wasn't found in directory %JAVA_HOME%/bin.
echo Please edit the startPetStoreServer.cmd script so that the JAVA_HOME
echo variable points to the root directory of your JDK installation.
goto finish
:runWebLogic
echo on
set PATH=.¥bin;"%JAVA_HOME%¥bin";%PATH%
set CLASSPATH=.;.¥lib¥weblogic_sp.jar;.¥lib¥weblogic.jar;.¥
samples¥eval¥cloudscape¥lib¥cloudscape.jar;.¥config¥petStore¥serverclasses
echo off
echo.
echo ***************************************************
echo * To start WebLogic Server, use the password *
echo * assigned to the system user. The system *
echo * username and password must also be used to *
echo * access the WebLogic Server console from a web *
echo * browser. *
echo ***************************************************
@rem Set WLS_PW equal to your system password for no password prompt server startup.
set WLS_PW=
@rem Set Production Mode.  When set to true, the server starts up in production mode.
@rem When set to false, the server starts up in development mode. The default is false.
set STARTMODE=true
echo on
"%JAVA_HOME%¥bin¥java" -hotspot -ms64m -mx64m -classpath "%CLASSPATH%"
-Dweblogic.Domain=petstore -Dweblogic.Name=petstoreServer
-Dbea.home="d:¥610sp2" -Dweblogic.management.password=%WLS_PW%
-Dweblogic.ProductionModeEnabled=%STARTMODE%
-Dcloudscape.system.home=./samples/eval/cloudscape/data
-Djava.security.policy=="d:¥610sp2¥wlserver6.1/lib/weblogic.policy" weblogic.Server
goto finish
:finish
cd config¥petStore
ENDLOCAL

WebLogic Server 7.0 を起動するために変更された上記の startPetstore.cmd スクリプト

@echo off
@rem This script can be used to start WebLogic Server for the purpose
@rem of running the PetStore application. This script ensures that
@rem the server is started using the config.xml file found in
@rem this directory and that the CLASSPATH is set appropriately.
@rem This script contains the following variables:
@rem
@rem JAVA_HOME - Determines the version of Java used to start
@rem WebLogic Server. This variable must point to the
@rem root directory of a JDK installation. and will be set
@rem for you by the WebLogic Server installer. Note that
@rem this script uses the hotspot VM to run WebLogic Server.
@rem If you choose to use a JDK other than the one
@rem included in the disribution, make sure that the JDK
@rem includes the hotspot VM. See the WebLogic platform
@rem support page (http://e-docs.bea.com/wls/platforms/index.html)
@rem for an up-to-date list of supported JVMs on Windows NT.
@rem
@rem When setting these variables below, please use short file names (8.3).
@rem To display short (MS-DOS) filenames, use "dir /x". File names with
@rem spaces will break this script.
@rem
@rem jDriver for Oracle users: This script assumes that native libraries
@rem required for jDriver for Oracle have been installed in the proper
@rem location and that your system PATH variable has been set appropriately.
@rem For additional information, refer to Installing and Setting up WebLogic
@rem Server (http://e-docs.bea.com/wls/docs61/install/index.html).
SETLOCAL
cd ..¥..
@rem Set user-defined variables.
@rem 1. SET THE NEW JAVA HOME APPROPRIATELY
set JAVA_HOME=D:¥70bea¥jdk131
@rem 2.  FOR SIMPLICITY, CREATE AND SET BEA_HOME AND WL_HOME70
set BEA_HOME=d:¥wls70
set WL_HOME70=%BEA_HOME%¥weblogic700
@rem 3.  REMOVE THIS ENTIRE CHECK AND ITS TAG SINCE
@rem NEITHER IS RELEVANT ANY LONGER
@rem Check that script is being run from the appropriate directory
@rem if not exist lib¥weblogic.jar goto wrongplace
@rem goto checkJDK
@rem :wrongplace
@rem echo startPetStore.cmd must be run from the config¥petStore directory. 1>&2
@rem goto finish
:checkJDK
if exist "%JAVA_HOME%/bin/javac.exe" goto runWebLogic echo.
echo Javac wasn't found in directory %JAVA_HOME%/bin.
echo Please edit the startPetStoreServer.cmd script so that the JAVA_HOME
echo variable points to the root directory of your JDK installation.
goto finish
@rem 4.  SET THE PATH VARIABLE APPROPRIATELY USING WL_HOME70 YOU DEFINED IN STEP 2 ABOVE
:runWebLogic
echo on
set PATH=%WL_HOME70%¥server¥bin;"%JAVA_HOME%¥bin";%PATH%
@rem 5.  SET YOUR CLASSPATH SO THE NEW WLS70 CLASSES ARE USED WHILE RETAINING ALL CLASS LOCATIONS
@rem RELEVANT TO YOUR APPLICATION. TO DO THIS, USE WL_HOME70 YOU SET IN STEP 2.
set CLASSPATH=.;%WL_HOME70%¥server¥lib¥weblogic.jar;.¥samples¥
eval¥cloudscape¥lib¥cloudscape.jar;.¥config¥petStore¥serverclasses
echo off
echo.
echo ***************************************************
echo * To start WebLogic Server, use the password *
echo * assigned to the system user. The system *
echo * username and password must also be used to *
echo * access the WebLogic Server console from a web *
echo * browser. *
echo ***************************************************
@rem Set WLS_PW equal to your system password for no password prompt server startup.
set WLS_PW=
@rem Set Production Mode.  When set to true, the server starts up in production mode.
@rem When set to false, the server starts up in development mode. The default is false.
set STARTMODE=true
@rem 6.  SET THE -Dbea.home COMMAND LINE OPTION USING THE BEA_HOME VARIABLE YOU SET IN STEP 2.
echo on
"%JAVA_HOME%¥bin¥java" -hotspot -ms64m -mx64m -classpath "%CLASSPATH%"
-Dweblogic.Domain=petstore -Dweblogic.Name=petstoreServer -Dbea.home="%BEA_HOME%"
-Dweblogic.management.password=%WLS_PW% -Dweblogic.ProductionModeEnabled=%STARTMODE%
-Dcloudscape.system.home=./samples/eval/cloudscape/data
-Djava.security.policy=="d:¥610sp2¥wlserver6.1/lib/weblogic.policy" weblogic.Server
goto finish
:finish
cd config¥petStore
ENDLOCAL

WebLogic Server 6.1 サービス パック 3 で使用する config.xml ファイル

<Domain
Name="petstore">
<JDBCTxDataSource
JNDIName="jdbc.EstoreDB"
Name="EstoreDB"
PoolName="petstorePool"
Targets="petstoreServer"/>
<JDBCTxDataSource
JNDIName="jdbc.InventoryDB"
Name="InventoryDB"
PoolName="petstorePool"
Targets="petstoreServer"/>
<JDBCTxDataSource
JNDIName="jdbc.SignOnDB"
Name="SignOnDB"
PoolName="petstorePool"
Targets="petstoreServer"/>
<Application
Deployed="true"
Name="tour"
Path="D:¥WLS 6.1¥wlserver6.1/config/petstore/applications/tour.war">
<WebAppComponent
Name="tour"
Targets="petstoreServer"
URI="tour.war"/>
</Application>
<Application
Deployed="true"
Name="petstore"
Path="D:¥WLS 6.1¥wlserver6.1/config/petstore/applications/petstore.ear">
<EJBComponent
Name="customerEjb"
Targets="petstoreServer"
URI="customerEjb.jar"/>
<EJBComponent
Name="inventoryEjb"
Targets="petstoreServer"
URI="inventoryEjb.jar"/>
<EJBComponent
Name="mailerEjb"
Targets="petstoreServer"
URI="mailerEjb.jar"/>
<EJBComponent
Name="personalizationEjb"
Targets="petstoreServer"
URI="personalizationEjb.jar"/>
<EJBComponent
Name="signonEjb"
Targets="petstoreServer"
URI="signonEjb.jar"/>
<EJBComponent
Name="shoppingcartEjb"
Targets="petstoreServer"
URI="shoppingcartEjb.jar"/>
<EJBComponent
Name="petstoreEjb"
Targets="petstoreServer"
URI="petstoreEjb.jar"/>
<WebAppComponent
Name="petstore"
Targets="petstoreServer"
URI="petstore.war"/>
</Application>
<Application
Deployed="true"
Name="petstoreAdmin"
Path="D:¥WLS 6.1¥wlserver6.1/config/petstore/applications/petstoreAdmin.ear>
<EJBComponent
Name="petstoreAdminEjb"
Targets="petstoreServer"
URI="petstoreadminEjb.jar"/>
<WebAppComponent
Name="petstoreadmin"
Targets="petstoreServer"
URI="petstoreadmin.war"/>
</Application>
<Server
JavaCompiler="D:¥WLS 6.1¥jdk131/bin/javac"
ListenPort="7001"
Name="petstoreServer"
RootDirectory="D:¥WLS 6.1¥wlserver6.1"
ThreadPoolSize="15"
TransactionLogFilePrefix="config/petstore/logs/"
IIOPEnabled="false">
<WebServer
DefaultWebApp="tour"
LogFileName="./config/petstore/logs/access.log"
LoggingEnabled="true"
Name="petstoreServer"/>
<SSL
CertificateCacheSize="3"
Enabled="true"
ListenPort="7002"
ServerCertificateChainFileName="./config/petstore/ca.pem"
ServerCertificateFileName="./config/petstore/democert.pem"
ServerKeyFileName="./config/petstore/demokey.pem"
TrustedCAFileName="./config/petstore/ca.pem"
Ciphersuites="SSL_RSA_EXPORT_WITH_RC4_40_MD5,SSL_RSA_WITH_DES_CBC_SHA,
SSL_RSA_EXPORT_WITH_DES_40_CBC_SHA,SSL_NULL_WITH_NULL_NULL"/>
<Log FileName="./config/petstore/logs/weblogic.log"/>
</Server>
<Log FileName="./config/petstore/logs/wl-domain.log"/>
<JDBCConnectionPool
CapacityIncrement="1"
DriverName="COM.cloudscape.core.JDBCDriver"
InitialCapacity="1"
MaxCapacity="1"
Name="petstorePool"
Properties="user=none;password=none;server=none"
Targets="petstoreServer"
URL="jdbc:cloudscape:petStore"/>
<FileRealm
Name="myFileRealm"/>
<Security
Realm="myRealm"/>
<Realm
FileRealm="myFileRealm"
Name="myRealm"/>
<MailSession
Name="mailSession"
Targets="petstoreServer"
JNDIName="mail.Session"
Properties="mail.from=orders@javapetstoredemo.com;mail.host=san-francisco.beasys.com"/>
<StartupClass
Arguments="port=7001"
ClassName="com.bea.estore.startup.StartBrowser"
FailureIsFatal="false"
Name="StartBrowser"
Targets="petstoreServer"
Notes="On Windows, this class automatically starts a browser after the server has finished booting."/>
</Domain>

WebLogic Server 7.0 で使用する上記の config.xml ファイル

  1. 7.0 の petstore.ear ファイルを指すようにパスを変更します。
    <Domain ConfigurationVersion="7.0.0.0"
    Name="petstore" Path="D:¥700sp0¥weblogic700¥samples¥server¥config¥petstore¥applications¥
    petstore.ear" StagedTargets="" TwoPhase="false">
    <JDBCTxDataSource
    JNDIName="jdbc.EstoreDB"
    Name="EstoreDB"
    PoolName="petstorePool"
    Targets="petstoreServer"/>
    <JDBCTxDataSource
    JNDIName="jdbc.InventoryDB"
    Name="InventoryDB"
    PoolName="petstorePool"
    Targets="petstoreServer"/>
    <JDBCTxDataSource
    JNDIName="jdbc.SignOnDB"
    Name="SignOnDB"
    PoolName="petstorePool"
    Targets="petstoreServer"/>
    <Application
    Deployed="true"
    Name="tour"

    Path="D:¥WLS 6.1¥wlserver6.1/config/petstore/applications/tour.war">
    <WebAppComponent
    Name="tour"
    Targets="petstoreServer"
    URI="tour.war"/>
    </Application>
    <Application
    Deployed="true"
    Name="petstore"
    Path="D:¥WLS 6.1¥wlserver6.1/config/petstore/applications/petstore.ear">
    <EJBComponent
    Name="customerEjb"
    Targets="petstoreServer"
    URI="customerEjb.jar"/>
    <EJBComponent
    Name="inventoryEjb"
    Targets="petstoreServer"
    URI="inventoryEjb.jar"/>
    <EJBComponent
    Name="mailerEjb"
    Targets="petstoreServer"
    URI="mailerEjb.jar"/>
    <EJBComponent
    Name="personalizationEjb"
    Targets="petstoreServer"
    URI="personalizationEjb.jar"/>
    <EJBComponent
    Name="signonEjb"
    Targets="petstoreServer"
    URI="signonEjb.jar"/>
    <EJBComponent
    Name="shoppingcartEjb"
    Targets="petstoreServer"
    URI="shoppingcartEjb.jar"/>
    <EJBComponent
    Name="petstoreEjb"
    Targets="petstoreServer"
    URI="petstoreEjb.jar"/>
    <WebAppComponent
    Name="petstore"
    Targets="petstoreServer"
    URI="petstore.war"/>
    </Application>

  2. petstoreAdmin.ear ファイルを指すようにパスを変更します。
    <Application
    Deployed="true"
    Name="petstoreAdmin"
    Path="D:¥700sp0¥weblogic700¥samples¥server¥config¥petstore¥applications¥
    petstoreAdmin.ear" StagedTargets="" TwoPhase="false">
    <EJBComponent
    Name="petstoreAdminEjb"
    Targets="petstoreServer"
    URI="petstoreadminEjb.jar"/>
    <WebAppComponent
    Name="petstoreadmin"
    Targets="petstoreServer"
    URI="petstoreadmin.war"/>
    </Application>

  3. WebLogic Server 7.0 Java コンパイラの場所を指すようにパスを変更します。
    <Server
    JavaCompiler="D:¥700sp0¥jdk131_02/bin/javac"
    ListenPort="7001"
    Name="petstoreServer"
    RootDirectory="D:¥700sp0"
    ThreadPoolSize="15"
    TransactionLogFilePrefix="config/petstore/logs/"
    IIOPEnabled="false">
    <WebServer
    DefaultWebApp="tour"
    LogFileName="./config/petstore/logs/access.log"
    LoggingEnabled="true"
    Name="petstoreServer"/>
    <SSL
    CertificateCacheSize="3"
    Enabled="true"
    ListenPort="7002"
    ServerCertificateChainFileName="./config/petstore/ca.pem"
    ServerCertificateFileName="./config/petstore/democert.pem"
    ServerKeyFileName="./config/petstore/demokey.pem"
    TrustedCAFileName="./config/petstore/ca.pem"
    Ciphersuites="SSL_RSA_EXPORT_WITH_RC4_40_MD5,SSL_RSA_WITH_DES_CBC_SHA,
    SSL_RSA_EXPORT_WITH_DES_40_CBC_SHA,SSL_NULL_WITH_NULL_NULL"/>
    <Log FileName="./config/petstore/logs/weblogic.log"/>
    </Server>
    <Log FileName="./config/petstore/logs/wl-domain.log"/>
    <JDBCConnectionPool
    CapacityIncrement="1"
    DriverName="COM.cloudscape.core.JDBCDriver"
    InitialCapacity="1"
    MaxCapacity="1"
    Name="petstorePool"
    Properties="user=none;password=none;server=none"
    Targets="petstoreServer"
    URL="jdbc:cloudscape:petStore"/>
    <FileRealm
    Name="myFileRealm"/>
    <Security
    Realm="myRealm"/>
    <Realm
    FileRealm="myFileRealm"
    Name="myRealm"/>
    <MailSession
    Name="mailSession"
    Targets="petstoreServer"
    JNDIName="mail.Session"
    Properties="mail.from=orders@javapetstoredemo.com;mail.host=san-francisco.beasys.com"/>
    <StartupClass
    Arguments="port=7001"
    ClassName="com.bea.estore.startup.StartBrowser"
    FailureIsFatal="false"
    Name="StartBrowser"
    Targets="petstoreServer"
    Notes="On Windows, this class automatically starts a browser after the server has finished booting."/>
    </Domain>

WebLogic Server 7.0 で Pet Store アプリケーションを起動する

WebLogic Server 7.0 で Pet Store アプリケーションを起動するには、次の手順に従います。

  1. 新しい Web ブラウザ ウィンドウを開きます。

  2. http://localhost:7001/estore/index.html に移動します。

  3. [Enter the Store] をクリックします。

 


WebLogic 6.0 サービス パック 2 サンプル サーバの WebLogic Server 7.0 へのアップグレード

WebLogic 6.0 サンプル サーバを WebLogic Server 7.0 にアップグレードする必要はありません。この節では、サーバを 6.0 から 7.0 へアップグレードする方法の例として、その手順を説明します。WebLogic 6.0 サンプル サーバのドメイン コンフィグレーションを WebLogic Server 7.0 で使用するためにアップグレードするには、以下の作業を行います。

WebLogic Server 7.0 をインストールする

WebLogic Server 7.0 をインストールします。『インストール ガイド』を参照してください。

注意: 古いバージョンと同じ場所に新しいバージョンをインストールしようとすると、インストーラにより警告が出されます。

6.0 サービス パック 2 のドメイン コンフィグレーションで WebLogic Server 7.0 の環境を設定する

6.0 の WL_HOME/config/examples ディレクトリを 7.0 のディレクトリにコピーするときは、引き続き、config ディレクトリ内に examples ドメイン ディレクトリが含まれるようにすることが大切です。たとえば、次のようなディレクトリ構造を使用できます。

c:¥my_application_domains¥config¥examples

WebLogic 6.0 のサンプル サーバを WebLogic Server 7.0 にアップグレードするには、以下の 2 つのスクリプトを編集する必要があります。

setExamplesEnv.cmd
startExamplesServer.cmd

これらのスクリプトは DOS 版 (.cmd) と UNIX 版 (.sh) の両方が用意されています。

SAMPLES_HOME¥server¥config¥examples にある setExamplesEnv スクリプトでは、開発用のシェル (サンプルをビルドおよび実行するコマンド ウィンドウ) で、一部の環境変数を設定します。

setExamplesEnv では以下の変数を設定します。

java および javac コマンドは、CLASSPATH 変数を使用して、ソース ファイルのコンパイルとサンプルの実行に必要な Java クラスを見つけます。CLASSPATH には、サンプルをコンパイルおよび実行するための適切なクラスが含まれなければなりません。

サンプル サーバを WebLogic Server 6.0 から WebLogic Server 7.0 へアップグレードするには、WebLogic Server 6.0 クラス、WebLogic Server 7.0 クラス、および WebLogic Server 7.0 で使用するネイティブ ライブラリにアクセスできるように、WebLogic Server 7.0 の setExamplesEnv.cmd スクリプトを編集する必要があります。

WebLogic Server 7.0 を起動するための手順は、WebLogic Server 6.0 を起動するための手順と同じです。

この節には以下のものが含まれています。

WebLogic 6.0 サービス パック 2 サンプル サーバの起動に使用する setExamplesEnv.cmd スクリプト

@echo on
@rem This script should be used to set up your environment for
@rem compiling and running the examples included with WebLogic
@rem Server. It contains the following variables:
@rem
@rem WL_HOME - This must point to the root directory of your WebLogic
@rem installation.
@rem JAVA_HOME - Determines the version of Java used to compile
@rem and run examples. This variable must point to the
@rem root directory of a complete JDK installation. See
@rem the WebLogic platform support page
@rem (http://e-docs.bea.com/wls/platforms/index.html)
@rem for an up-to-date list of supported JVMs on
@rem Windows NT.
@rem
@rem When setting these variables below, please use short file names(8.3).
@rem To display short (MS-DOS) filenames, use "dir /x". File
@rem names with
@rem spaces will break this script.
@rem
@rem jDriver for Oracle users: This script assumes that native libraries
@rem required for jDriver for Oracle have been installed in the proper
@rem location and that your system PATH variable has been set appropriately.
@rem For additional information, refer to Installing and Setting up WebLogic
@rem Server (/install/index.html in your local documentation set or on the
@rem Internet at
@rem http://e-docs.bea.com/wls/docs60/install/index.html).
@rem Set user-defined variables.
set WL_HOME=D:¥WLS_6.0¥wlserver6.0
set JAVA_HOME=D:¥WLS_6.0¥jdk130
@if exist %WL_HOME%¥lib¥weblogic.jar goto checkJava
@echo.
@echo The WebLogic Server wasn't found in directory %WL_HOME%.
@echo Please edit the setExamplesEnv.cmd script so that the
@echo WL_HOME
@echo variable points to the WebLogic Server installation
@echo directory.
@echo Your environment has not been set.
@goto finish
:checkJava
@if exist %JAVA_HOME%¥bin¥java.exe goto setEnv
@echo.
@echo The JDK wasn't found in directory %JAVA_HOME%.
@echo Please edit the setEnv.cmd script so that the JAVA_HOME
@echo variable points to the location of your JDK.
@echo Your environment has not been set.
@goto finish
:setEnv
set APPLICATIONS=%WL_HOME%¥config¥examples¥applications
set CLIENT_CLASSES=%WL_HOME%¥config¥examples¥clientclasses
set SERVER_CLASSES=%WL_HOME%¥config¥examples¥serverclasses
set EX_WEBAPP_CLASSES=%WL_HOME%¥config¥examples¥applications¥examplesWebApp¥WEB-INF¥classes
set CLASSPATH=%JAVA_HOME%¥lib¥tools.jar;%WL_HOME%¥lib¥weblogic_sp.
jar;%WL_HOME%¥lib¥weblogic.jar;%WL_HOME%¥lib¥xmlx.jar;%WL_HOME%
¥samples¥eval¥cloudscape¥lib¥cloudscape.jar;%CLIENT_CLASSES%;
%SERVER_CLASSES%;%EX_WEBAPP_CLASSES%;D:¥WLS 6.0
set PATH=%WL_HOME%¥bin;%JAVA_HOME%¥bin;%PATH%
@echo.
@echo Your environment has been set.
:finish

WebLogic 7.0 サンプル サーバを起動するために変更された上記の setExamplesEnv.cmd スクリプト

@echo on
@rem This script should be used to set up your environment for
@rem compiling and running the examples included with WebLogic
@rem Server. It contains the following variables:
@rem
@rem WL_HOME - This must point to the root directory of your WebLogic
@rem installation.
@rem JAVA_HOME - Determines the version of Java used to compile
@rem and run examples. This variable must point to the
@rem root directory of a complete JDK installation. See
@rem the WebLogic platform support page
@rem (http://e-docs.bea.com/wls/platforms/index.html)
@rem for an up-to-date list of supported JVMs on Windows NT.
@rem
@rem When setting these variables below, please use short file @rem names(8.3).
@rem To display short (MS-DOS) filenames, use "dir /x". File
@rem names with
@rem spaces will break this script.
@rem
@rem jDriver for Oracle users: This script assumes that native libraries
@rem required for jDriver for Oracle have been installed in the proper
@rem location and that your system PATH variable has been set appropriately.
@rem For additional information, refer to Installing and Setting up WebLogic
@rem Server (/install/index.html in your local documentation set or on the
@rem Internet at
@rem http://e-docs.bea.com/wls/docs60/install/index.html).
@rem Set user-defined variables.
@rem changed: set WL_HOME=C:¥bea60sp2¥wlserver6.0

  1. WebLogic Server 6.0 クラスにアクセスできるように WL60_HOME 変数を設定します。
    set WL60_HOME=C:¥bea60sp2¥wlserver6.0

  2. WebLogic Server 7.0 クラスにアクセスできるように WL_HOME 変数を設定します。
    set WL_HOME=C:¥bea700¥weblogic700
    @rem changed: set JAVA_HOME=C:¥bea60sp2¥jdk130

  3. WebLogic Server 7.0 の JDK を指すようにします。
    set JAVA_HOME=c:¥bea700¥jdk131

  4. サンプルをビルドするときに作成されるアプリケーション アーカイブを指すようにします。
    set APPLICATIONS=%WL60_HOME%¥config¥examples¥applications

  5. クライアント クラスの格納に使用するディレクトリを指すようにします。
    set CLIENT_CLASSES=%WL60_HOME%¥config¥examples¥clientclasses

  6. サーバサイド クラスの格納に使用するディレクトリを指すようにします。
    set SERVER_CLASSES=%WL60_HOME%¥config¥examples¥serverclasses

  7. サンプル Web アプリケーションで使用するクラスを格納するためのディレクトリを指すようにします。
    set EX_WEBAPP_CLASSES=%WL60_HOME%¥config¥examples¥applications¥examplesWebApp¥WEB-INF¥classes

  8. WebLogic Server 6.0 および WebLogic Server 7.0 のクラスを指すようにします。
    set CLASSPATH=%JAVA_HOME%¥lib¥tools.jar;%WL_HOME%¥lib¥weblogic_sp.
    jar;%WL_HOME%¥lib¥weblogic.jar;%WL_HOME%¥lib¥xmlx.jar;%WL60_
    HOME%¥samples¥eval¥cloudscape¥lib¥cloudscape.jar;%CLIENT_
    CLASSES%;%SERVER_CLASSES%;%EX_WEBAPP_CLASSES%

  9. %WL_HOME% 7.0 のホームを指すようにします。
    set PATH=%WL_HOME%¥bin;%JAVA_HOME%¥bin;%PATH%

    @echo.
    @echo Your environment has been set.

WebLogic 6.0 サービス パック 2 サンプル サーバの起動に使用する startExamplesServer.cmd スクリプト

@echo off
@rem This script can be used to start WebLogic Server for the 
@rem purpose
@rem of running the examples. This script ensures that the server is started
@rem using the config.xml file found in this directory and that the CLASSPATH
@rem is set appropriately. This script contains the following
@rem variable:
@rem
@rem JAVA_HOME - Determines the version of Java used to start
@rem WebLogic Server. This variable must point to the
@rem root directory of a JDK installation and will be set
@rem for you by the WebLogic Server installer. Note that
@rem this script uses the hotspot VM to run WebLogic Server.
@rem If you choose to use a JDK other than the one
@rem included in the disribution, make sure that the JDK
@rem includes the hotspot VM. See the WebLogic platform
@rem support page
@rem (http://e-docs.bea.com/wls/platforms/index.html)
@rem for an up-to-date list of supported JVMs @rem on Windows NT.
@rem
@rem When setting the variable below, please use short file names (8.3).
@rem To display short (MS-DOS) filenames, use "dir /x". File
@rem names with
@rem spaces will break this script.
@rem
@rem jDriver for Oracle users: This script assumes that native
@rem libraries
@rem required for jDriver for Oracle have been installed in the
@rem proper
@rem location and that your system PATH variable has been set
@rem appropriately.
@rem For additional information, refer to Installing and Setting up WebLogic
@rem Server
@rem (http://e-docs.bea.com/wls/docs60/install/index.html).
SETLOCAL
cd ..¥..
@rem Set user-defined variables.
set JAVA_HOME=D:¥WLS 6.0¥jdk130
if exist %JAVA_HOME%¥lib¥nul goto runWebLogic
echo.
echo The JRE wasn't found in directory %JAVA_HOME%.
echo Please edit the startExamplesServer.cmd script so that the JAVA_HOME
echo variable points to the root directory of your Java installation.
goto finish
:runWebLogic
echo on
set PATH=.¥bin;%PATH%
set CLASSPATH=.;.¥lib¥weblogic_sp.jar;.¥lib¥weblogic.jar;.¥samples
¥eval¥cloudscape¥lib¥cloudscape.jar;.¥config¥examples¥server
classes
%JAVA_HOME%¥bin¥java -hotspot -ms64m -mx64m -classpath %CLASSPATH% -Dweblogic.Domain=examples -Dweblogic.
Name=examplesServer -Dbea.home=D:¥WLS 6.0 -Dcloudscape.system.home=./samples/eval/cloudscape/
data -Djava.security.policy==D:¥WLS 6.0¥wlserver6.0/lib/weblogic.policy weblogic.Server
goto finish
:finish
cd config¥examples
ENDLOCAL

WebLogic 7.0 サンプル サーバを起動するために変更された上記の startExamplesServer.cmd スクリプト

@echo off
SETLOCAL
@rem Set user-defined variables.
@rem original:set JAVA_HOME=C:¥bea60sp2¥jdk130

  1. JAVA_HOME を WebLogic Server 7.0 の新しい JDK に設定します。
    set JAVA_HOME=C:¥bea700¥jdk131
    @rem added:

  2. WebLogic Server 6.0 クラスにアクセスできるようにするため、WL60_HOME を設定します。
    set WL60_HOME=c:¥bea60sp2¥wlserver6.0

  3. WebLogic Server 7.0 クラスにアクセスできるようにするため、以下のように設定します。
    set WL_HOME=c:¥bea700¥weblogic700
    :checkJRE
    if exist %JAVA_HOME%¥lib¥nul goto runWebLogic
    echo.
    echo The JRE wasn't found in directory %JAVA_HOME%.
    echo Please edit the startExamplesServer.cmd script so that the JAVA_HOME
    echo variable points to the root directory of your Java installation.
    goto finish
    :runWebLogic
    echo on
    @rem original: set PATH=.¥bin;%PATH%

  4. 使用している %WL_HOME% 7.0 ホームに合わせて PATH を設定します。これを設定していないと、サーバは起動しません。
    set PATH=%WL_HOME%¥bin;%PATH%
    @rem original: set
    @rem CLASSPATH=.;.¥lib¥weblogic_sp.jar;
    @rem .¥lib¥weblogic.jar;.¥samples¥eval¥cloudscape¥
    @rem lib¥cloudscape.
    @rem jar;.¥config¥examples¥serverclasses

  5. 必要な古いクラスと新しいクラスを指すように CLASSPATH を設定します。
    set CLASSPATH=%WL_HOME%¥lib¥weblogic_sp.jar;%WL_HOME%¥lib¥weblogic.jar;
    %WL60_HOME%¥samples¥eval¥cloudscape¥lib¥
    cloudscape.jar;%WL60_HOME%¥config¥examples¥serverclasses
    echo CLASSPATH=%CLASSPATH%
    @rem original: %JAVA_HOME%¥bin¥java -hotspot -ms64m -mx64m
    @rem -classpath %CLASSPATH% -Dweblogic.Domain=examples
    @rem -Dweblogic.Name=examplesServer -Dbea.home=C:¥bea60sp2
    @rem -Dcloudscape.system.home
    @rem =./samples/eval/cloudscape/data
    @rem -Djava.security.policy==C:¥bea60sp2¥wlserver6.0
    @rem /lib/weblogic.policy weblogic.Server
    %JAVA_HOME%¥bin¥java -hotspot -ms64m -mx64m -classpath %CLASSPATH% -Dweblogic.Name=examplesServer
    -Dweblogic.ProductionModeEnabled=true -Dbea.home=C:¥bea700 -Dcloudscape.system.home=%WL60_HOME%/
    samples/eval/cloudscape/data -Djava.security.policy==%WL60_HOME%/lib/weblogic.policy weblogic.Server
    goto finish
    :finish
    ENDLOCAL

WebLogic Server 7.0 でサンプル サーバを起動する

WebLogic Server 7.0 でサンプル サーバを起動するには、次の手順に従います。

Windows の場合

  1. タスクバーで、[スタート] をクリックします。

  2. [プログラム] を選択します。

  3. [BEA WebLogic E-Business Platform] を選択します。

  4. [WebLogic Server 7.0] を選択します。

  5. [Examples] を選択します。

  6. [Start Examples Server] を選択します。

  7. [Out-of-the-Box Examples Index Page] が表示されます。

または

  1. Windows エクスプローラで、SAMPLES_HOME¥server¥config¥examples ディレクトリに移動します。

  2. startExamplesServer のアイコンをダブルクリックします。

  3. [Out-of-the-Box Examples Index Page] が表示されます。

UNIX Bourne シェルの場合

  1. cd $SAMPLES_HOME/server/config/examples

  2. sh startExamplesServer.sh

 


WebLogic 6.1 サービス パック 2 サンプル サーバの WebLogic Server 7.0 へのアップグレード

WebLogic 6.1 サンプル サーバを WebLogic Server 7.0 にアップグレードする必要はありません。この節では、サーバを 6.1 から 7.0 へアップグレードする方法の例として、その手順を説明します。WebLogic 6.1 サンプル サーバのドメイン コンフィグレーションを WebLogic Server 7.0 で使用するためにアップグレードするには、以下の作業を行います。

WebLogic Server 7.0 をインストールする

WebLogic Server 7.0 をインストールします。『インストール ガイド』を参照してください。

注意: 古いバージョンと同じ場所に新しいバージョンをインストールしようとすると、インストーラにより警告が出されます。

6.1 サービス パック 2 のドメイン コンフィグレーションで WebLogic Server 7.0 の環境を設定する

6.1 の WL_HOME/config/examples ディレクトリを新しい場所にコピーするときは、引き続き、config ディレクトリ内に examples ドメイン ディレクトリが含まれるようにすることが大切です。たとえば、次のようなディレクトリ構造を使用できます。

c:¥my_application_domains¥config¥examples

WebLogic 6.1 のサンプル サーバを WebLogic Server 7.0 にアップグレードするには、以下の 2 つのスクリプトを編集する必要があります。

setExamplesEnv.cmd
startExamplesServer.cmd

これらのスクリプトは DOS 版 (.cmd) と UNIX 版 (.sh) の両方が用意されています。

SAMPLES_HOME¥server¥config¥examples にある setExamplesEnv スクリプトでは、開発用のシェル (サンプルをビルドおよび実行するコマンド ウィンドウ) で、一部の環境変数を設定します。

setExamplesEnv では以下の変数を設定します。

java および javac コマンドは、CLASSPATH 変数を使用して、ソース ファイルのコンパイルとサンプルの実行に必要な Java クラスを見つけます。CLASSPATH には、サンプルをコンパイルおよび実行するための適切なクラスが含まれなければなりません。

サンプル サーバを WebLogic Server 6.1 から WebLogic Server 7.0 へアップグレードするには、WebLogic Server 6.1 クラス、WebLogic Server 7.0 クラス、および WebLogic Server 7.0 で使用するネイティブ ライブラリにアクセスできるように、WebLogic Server 7.0 の setExamplesEnv.cmd スクリプトを編集する必要があります。

WebLogic Server 7.0 を起動するための手順は、WebLogic Server 6.1 を起動するための手順と同じです。

この節には以下のものが含まれています。

WebLogic 6.1 サービス パック 2 サンプル サーバの起動に使用する setExamplesEnv.cmd スクリプト

@echo on
@rem This script should be used to set up your environment for
@rem compiling and running the examples included with WebLogic
@rem Server. It contains the following variables:
@rem
@rem WL_HOME - This must point to the root directory of your WebLogic
@rem installation.
@rem JAVA_HOME - Determines the version of Java used to compile
@rem and run examples. This variable must point to the
@rem root directory of a complete JDK installation. See
@rem the WebLogic platform support page
@rem (http://e-docs.bea.com/wls/platforms/index.html)
@rem for an up-to-date list of supported JVMs on Windows NT.
@rem When setting these variables below, please use short file names(8.3).
@rem To display short (MS-DOS) filenames, use "dir /x". File
@rem names with spaces will break this script.
@rem
@rem jDriver for Oracle users: This script assumes that native libraries
@rem required for jDriver for Oracle have been installed in the @rem proper location and that your system PATH variable
@rem has been set appropriately.
@rem For additional information, refer to Installing and Setting up WebLogic
@rem Server (/install/index.html in your local documentation set or on the Internet at
@rem http://e-docs.bea.com/wls/docs61/install/index.html).
@rem Set user-defined variables.
set WL_HOME=D:¥WLS 6.1¥wlserver6.1
set JAVA_HOME=D:¥WLS 6.1¥jdk131
@dir %WL_HOME%¥lib > nul
if errorlevel 0 goto checkJava
@echo.
@echo The WebLogic Server wasn't found in directory %WL_HOME%.
@echo Please edit the setExamplesEnv.cmd script so that the
@echo WL_HOME variable points to the WebLogic Server installation @echo directory.
@echo Your environment has not been set.
@goto finish
:checkJava
@dir %JAVA_HOME%¥jre¥bin¥java.exe > nul
if errorlevel 0 goto setEnv
@echo.
@echo The JDK wasn't found in directory %JAVA_HOME%.
@echo Please edit the setEnv.cmd script so that the JAVA_HOME
@echo variable points to the location of your JDK.
@echo Your environment has not been set.
@goto finish
:setEnv
set APPLICATIONS=%WL_HOME%¥config¥examples¥applications
set CLIENT_CLASSES=%WL_HOME%¥config¥examples¥clientclasses
set SERVER_CLASSES=%WL_HOME%¥config¥examples¥serverclasses
set EX_WEBAPP_CLASSES=%WL_HOME%¥config¥examples¥applications¥
examplesWebApp¥WEB-INF¥classes
set CLASSPATH=%JAVA_HOME%¥lib¥tools.jar;%WL_HOME%¥lib¥
weblogic_sp.jar;%WL_HOME%¥lib¥weblogic.jar;%WL_HOME%¥lib¥
xmlx.jar;%WL_HOME%¥samples¥eval¥cloudscape¥lib¥cloudscape.jar;
%CLIENT_CLASSES%;%SERVER_CLASSES%;%EX_WEBAPP_CLASSES%;
D:¥WLS 6.1
set PATH=%WL_HOME%¥bin;%JAVA_HOME%¥bin;%PATH%
@echo.
@echo Your environment has been set.
:finish

WebLogic Server 7.0 を起動するために変更された上記の setExamplesEnv.cmd スクリプト

@echo on
@rem This script should be used to set up your environment for
@rem compiling and running the examples included with WebLogic
@rem Server. It contains the following variables:
@rem
@rem WL_HOME - This must point to the root directory of your WebLogic
@rem installation.
@rem JAVA_HOME - Determines the version of Java used to compile
@rem and run examples. This variable must point to the
@rem root directory of a complete JDK installation. See
@rem the WebLogic platform support page
@rem (http://e-docs.bea.com/wls/platforms/index.html)
@rem for an up-to-date list of supported JVMs on Windows NT.
@rem
@rem When setting these variables below, please use short file @rem names(8.3).
@rem To display short (MS-DOS) filenames, use "dir /x". File
@rem names with spaces will break this script.
@rem
@rem jDriver for Oracle users: This script assumes that native libraries
@rem required for jDriver for Oracle have been installed in the proper
@rem location and that your system PATH variable has been set appropriately.
@rem For additional information, refer to Installing and Setting up WebLogic
@rem Server (/install/index.html in your local documentation set or on the
@rem Internet at http://e-docs.bea.com/wls/docs61/install/index.html).
@rem Set user-defined variables.
@rem changed: set WL_HOME=C:¥bea61sp2¥wlserver6.1

  1. WebLogic Server 6.1 クラスにアクセスできるように WL61_HOME 変数を設定します。
    set WL61_HOME=C:¥bea61sp2¥wlserver6.1

  2. WebLogic Server 7.0 クラスにアクセスできるように WL_HOME 変数を設定します。
    set WL_HOME=C:¥bea700¥weblogic700

  3. WebLogic Server 7.0 の JDK を指すようにします。
    @rem changed: set JAVA_HOME=C:¥bea61sp2¥jdk130
    set JAVA_HOME=c:¥bea700¥jdk131

  4. サンプルをビルドするときに作成されるアプリケーション アーカイブを指すようにします。
    set APPLICATIONS=%WL61_HOME%¥config¥examples¥applications

  5. クライアント クラスの格納に使用するディレクトリを指すようにします。
    set CLIENT_CLASSES=%WL61_HOME%¥config¥examples¥clientclasses

  6. サーバサイド クラスの格納に使用するディレクトリを指すようにします。
    set SERVER_CLASSES=%WL61_HOME%¥config¥examples¥serverclasses

  7. サンプル Web アプリケーションで使用するクラスを格納するためのディレクトリを指すようにします。
    set EX_WEBAPP_CLASSES=%WL61_HOME%¥config¥examples¥applications¥examplesWebApp¥WEB-INF¥classes

  8. WebLogic Server 6.1 および WebLogic Server 7.0 のクラスを指すようにします。
    set CLASSPATH=%JAVA_HOME%¥lib¥tools.jar;%WL_HOME%¥lib¥weblogic_sp.
    jar;%WL_HOME%¥lib¥weblogic.jar;%WL_HOME%¥lib¥xmlx.jar;%WL61_
    HOME%¥samples¥eval¥cloudscape¥lib¥cloudscape.jar;%CLIENT_
    CLASSES%;%SERVER_CLASSES%;%EX_WEBAPP_CLASSES%

  9. %WL_HOME% 7.0 のホームを指すようにします。
    set PATH=%WL_HOME%¥bin;%JAVA_HOME%¥bin;%PATH%

    @echo.
    @echo Your environment has been set.

WebLogic 6.1 サービス パック 2 サンプル サーバの起動に使用する startExamplesServer.cmd スクリプト

@echo off
@rem This script can be used to start WebLogic Server for the purpose
@rem of running the examples. This script ensures that the server is started
@rem using the config.xml file found in this directory and that the CLASSPATH
@rem is set appropriately. This script contains the following variable:
@rem
@rem JAVA_HOME - Determines the version of Java used to start
@rem WebLogic Server. This variable must point to the
@rem root directory of a JDK installation and will be set
@rem for you by the WebLogic Server installer. Note that
@rem this script uses the hotspot VM to run WebLogic Server.
@rem If you choose to use a JDK other than the one
@rem included in the disribution, make sure that the JDK
@rem includes the hotspot VM. See the WebLogic platform
@rem support page (http://e-docs.bea.com/wls/platforms/index.html)
@rem for an up-to-date list of supported JVMs on Windows NT.
@rem
@rem When setting the variable below, please use short file names (8.3).
@rem To display short (MS-DOS) filenames, use "dir /x". File names with
@rem spaces will break this script.
@rem
@rem jDriver for Oracle users: This script assumes that native libraries
@rem required for jDriver for Oracle have been installed in the proper
@rem location and that your system PATH variable has been set appropriately.
@rem For additional information, refer to Installing and Setting up WebLogic
@rem Server (http://e-docs.bea.com/wls/docs61/install/index.html).
SETLOCAL
cd ..¥..
@rem Set user-defined variables.
set JAVA_HOME=D:¥WLS 6.1¥jdk131
@rem Check that script is being run from the appropriate directory
if not exist lib¥weblogic.jar goto wrongplace
goto checkJDK
:wrongplace
echo startExamplesServer.cmd must be run from the config¥examples directory. 1>&2
goto finish
:checkJDK
if exist %JAVA_HOME%/bin/javac.exe goto runWebLogic
echo.
echo Javac wasn't found in directory %JAVA_HOME%/bin.
echo Please edit the startExamplesServer.cmd script so that the JAVA_HOME
echo variable points to the root directory of your JDK installation.
goto finish
:runWebLogic
echo on
set PATH=.¥bin;%PATH%
set CLASSPATH=.;.¥lib¥weblogic_sp.jar;.¥lib¥weblogic.jar;.¥samples
eval¥cloudscape¥lib¥cloudscape.jar;.¥config¥examples¥serverclasses
echo off
echo.
echo ***************************************************
echo * To start WebLogic Server, use the password *
echo * assigned to the system user. The system *
echo * username and password must also be used to *
echo * access the WebLogic Server console from a web *
echo * browser. *
echo ***************************************************
@rem Set WLS_PW equal to your system password for no password prompt server startup.
set WLS_PW=
echo on
"%JAVA_HOME%¥bin¥java" -hotspot -ms64m -mx64m -classpath
"%CLASSPATH%" -Dweblogic.Domain=examples
-Dweblogic.Name=examplesServer
-Dweblogic.management.password=%WLS_PW% -Dbea.home="D:¥WLS 6.1"
-Dcloudscape.system.home=./samples/eval/cloudscape/data
-Djava.security.policy=="D:¥WLS
6.1¥wlserver6.1/lib/weblogic.policy" weblogic.Server
goto finish
:finish
cd config¥examples
ENDLOCAL

WebLogic Server 7.0 を起動するために変更された上記の startExamplesServer.cmd スクリプト

@echo off
SETLOCAL
@rem Set user-defined variables.
@rem original:set JAVA_HOME=C:¥bea61sp2¥jdk130

  1. JAVA_HOME を WebLogic Server 7.0 の新しい JDK に設定します。
    set JAVA_HOME=C:¥bea700¥jdk131
    @rem added:

  2. WebLogic Server 6.1 クラスにアクセスできるようにするため、以下のように設定します。
    set WL61_HOME=c:¥bea61sp2¥wlserver6.1

  3. WebLogic Server 7.0 クラスにアクセスできるようにするため、以下のように設定します。
    set WL_HOME=c:¥bea700¥weblogic700
    :checkJRE
    if exist %JAVA_HOME%¥lib¥nul goto runWebLogic
    echo.
    echo The JRE wasn't found in directory %JAVA_HOME%.
    echo Please edit the startExamplesServer.cmd script so that the JAVA_HOME
    echo variable points to the root directory of your Java installation.
    goto finish
    :runWebLogic
    echo on
    @rem original: set PATH=.¥bin;%PATH%

  4. 使用している %WL_HOME% 7.0 ホームに合わせて PATH を設定します。これを設定していないと、サーバは起動しません。
    set PATH=%WL_HOME%¥bin;%PATH%
    @rem original: set
    @rem CLASSPATH=.;.¥lib¥weblogic_sp.jar;
    @rem .¥lib¥weblogic.jar;.¥samples¥eval¥cloudscape¥
    @rem lib¥cloudscape.
    @rem jar;.¥config¥examples¥serverclasses
    set CLASSPATH=%WL_HOME%¥lib¥weblogic_sp.jar;%WL_HOME%¥lib¥weblogic.jar;
    %WL61_HOME%¥samples¥eval¥cloudscape¥lib¥cloudscape.jar;
    %WL61_HOME%¥config¥examples¥serverclasses

  5. 必要な古いクラスと新しいクラスを指すように CLASSPATH を設定します。
    echo CLASSPATH=%CLASSPATH%
    @rem original: %JAVA_HOME%¥bin¥java -hotspot -ms64m -mx64m
    @rem -classpath %CLASSPATH% -Dweblogic.Domain=examples
    @rem -Dweblogic.Name=examplesServer -Dbea.home=C:¥bea61sp2
    @rem -Dcloudscape.system.home
    @rem =./samples/eval/cloudscape/data
    @rem -Djava.security.policy==C:¥bea61sp2¥wlserver6.1
    @rem /lib/weblogic.policy weblogic.Server
    %JAVA_HOME%¥bin¥java -hotspot -ms64m -mx64m -classpath %CLASSPATH% -Dweblogic.Name=examplesServer
    -Dweblogic.ProductionModeEnabled=true -Dbea.home=C:¥bea700 -Dcloudscape.system.home=%WL61_HOME%/
    samples/eval/cloudscape/data -Djava.security.policy==%WL61_HOME%/lib/weblogic.policy weblogic.Server
    goto finish
    :finish
    ENDLOCAL

WebLogic Server 7.0 でサンプル サーバを起動する

WebLogic Server 7.0 でサンプル サーバを起動するには、次の手順に従います。

Windows の場合

  1. タスクバーで、[スタート] をクリックします。

  2. [プログラム] を選択します。

  3. [BEA WebLogic E-Business Platform] を選択します。

  4. [WebLogic Server 7.0] を選択します。

  5. [Examples] を選択します。

  6. [Start Examples Server] を選択します。

  7. [Out-of-the-Box Examples Index Page] が表示されます。

または

  1. Windows エクスプローラで、SAMPLES_HOME¥server¥config¥examples ディレクトリに移動します。

  2. startExamplesServer のアイコンをダブルクリックします。

  3. [Out-of-the-Box Examples Index Page] が表示されます。

UNIX Bourne シェルの場合

  1. cd $SAMPLES_HOME/server/config/examples

  2. sh startExamplesServer.sh

 

Back to Top Previous Next