BEA ホーム | 製品 | dev2dev | support | askBEA |
![]() |
![]() |
|
![]() |
e-docs > WebLogic Server > WebLogic Server 7.0 へのアップグレード > Pet Store アプリケーションおよびサンプル サーバのアップグレード |
WebLogic Server 7.0 へのアップグレード
|
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 で使用するためにアップグレードするには、以下の作業を行います。
WebLogic Server 7.0 をインストールします。『インストール ガイド』を参照してください。
6.1 サービス パック 3 のドメイン コンフィグレーションで WebLogic Server 7.0 の環境を設定する
WebLogic 6.1 サービス パック 3 の Pet Store アプリケーションを WebLogic Server 7.0 にアップグレードするには、以下の作業を行います。
注意: Pet Store をコピーする WebLogic Server 7.0 のディレクトリが、Pet Store の WebLogic Server 6.1 でのディレクトリの位置と同じ場合は、新しいディレクトリ位置を反映するために config.xml ファイルを編集する必要はありません。異なるディレクトリ位置に Pet Store をコピーする場合は、config.xml ファイルですべてのファイルおよびディレクトリの絶対パスを見つけて、相対パスに変更する必要があります。
注意: Pet Store アプリケーションを WebLogic Server 7.0 にアップグレードするために、weblogic.xml および web.xml ファイルの DTD を更新する必要はありません。WebLogic Server 7.0 の DTD については、『WebLogic エンタープライズ JavaBeans プログラマーズ ガイド』の「weblogic-ejb-jar.xml 文書型定義」を参照してください。
以前のバージョンの 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 で置換を行うには、次の手順を使用します。
public void setNumItems(String numItemsStr) {
public void setStartIndex(String startIndexStr) {
startIndex = Integer.parseInt(startIndexStr);
}
public void setStartIndex(int startIndexIn) {
startIndex = startIndexIn;
}
public void setNumItems(String numItemsStr) {
super.setNumItems(numItemsStr);
}
public void setStartIndex(String startIndexStr) {
super.setNumItems(startIndexStr);
}
public void setNumItems(int numItems) {
super.setNumItems(numItems);
}
public void setStartIndex(int startIndex) {
super.setNumItems(startIndex);
}
MyListTag.java
ProductItemListTag.java
ProductListTag.java
SearchListTag.java
Pet Store に対する修正を行った後、アプリケーションを再構築します。
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 ファイル
<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>
<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>
<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 アプリケーションを起動するには、次の手順に従います。
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 をインストールします。『インストール ガイド』を参照してください。
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 スクリプトでは、開発用のシェル (サンプルをビルドおよび実行するコマンド ウィンドウ) で、一部の環境変数を設定します。
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
set WL60_HOME=C:¥bea60sp2¥wlserver6.0
set WL_HOME=C:¥bea700¥weblogic700
@rem changed: set JAVA_HOME=C:¥bea60sp2¥jdk130
set JAVA_HOME=c:¥bea700¥jdk131
set APPLICATIONS=%WL60_HOME%¥config¥examples¥applications
set CLIENT_CLASSES=%WL60_HOME%¥config¥examples¥clientclasses
set SERVER_CLASSES=%WL60_HOME%¥config¥examples¥serverclasses
set EX_WEBAPP_CLASSES=%WL60_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;%WL60_
HOME%¥samples¥eval¥cloudscape¥lib¥cloudscape.jar;%CLIENT_
CLASSES%;%SERVER_CLASSES%;%EX_WEBAPP_CLASSES%
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
set JAVA_HOME=C:¥bea700¥jdk131
@rem added:
set WL60_HOME=c:¥bea60sp2¥wlserver6.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%
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;
%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 でサンプル サーバを起動するには、次の手順に従います。
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 をインストールします。『インストール ガイド』を参照してください。
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 スクリプトでは、開発用のシェル (サンプルをビルドおよび実行するコマンド ウィンドウ) で、一部の環境変数を設定します。
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
set WL61_HOME=C:¥bea61sp2¥wlserver6.1
set WL_HOME=C:¥bea700¥weblogic700
@rem changed: set JAVA_HOME=C:¥bea61sp2¥jdk130
set JAVA_HOME=c:¥bea700¥jdk131
set APPLICATIONS=%WL61_HOME%¥config¥examples¥applications
set CLIENT_CLASSES=%WL61_HOME%¥config¥examples¥clientclasses
set SERVER_CLASSES=%WL61_HOME%¥config¥examples¥serverclasses
set EX_WEBAPP_CLASSES=%WL61_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;%WL61_
HOME%¥samples¥eval¥cloudscape¥lib¥cloudscape.jar;%CLIENT_
CLASSES%;%SERVER_CLASSES%;%EX_WEBAPP_CLASSES%
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
set JAVA_HOME=C:¥bea700¥jdk131
@rem added:
set WL61_HOME=c:¥bea61sp2¥wlserver6.1
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%
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
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 でサンプル サーバを起動するには、次の手順に従います。
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |