wsadmin スクリプトによるプロパティー・ファイルの抽出
このトピックを使用して、ご使用の構成からプロパティー・ファイルを抽出します。 wsadmin ツールを使用して、セル、サーバー、サーバー・サブタイプ、およびノードの構成のプロパティー・ファイルを抽出できます。
このタスクについて
AdminTask オブジェクトの PropertiesBasedConfiguration コマンド・グループを使用すると、構成の属性と値をご使用の環境からプロパティー・ファイルに抽出できます。

AdminTask.extractConfigProperties('-interactive')
手順
- セル構成を抽出します。
- wsadmin スクリプト・ツールを開始します。
- セル構成を抽出します。 以下の Jython 例に示すように、extractConfigProperties コマンドを使用して、オブジェクト構成を抽出します。
AdminTask.extractConfigProperties('[-propertiesFileName ConfigProperties_cell.props]')
以下の例に示すように、システムはプロパティー・ファイルを抽出します。Cell.props # # SubSection 1.0 # Cell level attributes # ResourceType=Cell ImplementingResourceType=Cell ResourceId=Cell=!{cellName} # # #Properties # shortName=null cellType=DISTRIBUTED #ENUM(UDP|TCP|MULTICAST|DISTRIBUTED|STANDALONE),readonly name=!{cellName} multicastDiscoveryAddressEndpointName=null discoveryAddressEndpointName=null cellDiscoveryProtocol=TCP #ENUM(UDP|TCP|MULTICAST) …. … Properties of nodes,servers, clusters, applications, etc. …. EnvironmentVariablesSection # # #Environment Variables #Day Month 17 Time CDT Year cellName=myCell
プロパティー・ファイルはセル、ノード、サーバー、 クラスター、アプリケーション、コア・グループ、またはノード・グループ名を表示しません。 代わりに、 コマンドにより !{cellName} のような変数が作成され、プロパティー・ファイルの末尾にある EnvironmentVariables セクションにそれらが組み込まれます。 プロパティー・ファイルでは、環境変数セクションにそれぞれの変数が含まれています。
- サーバー構成を抽出します。
- wsadmin スクリプト・ツールを開始します。
- 対象のアプリケーション・サーバーの構成を抽出します。 以下の Jython 例に示すように、extractConfigProperties コマンドを使用して、サーバー構成を抽出します。
AdminTask.extractConfigProperties('[-propertiesFileName ConfigProperties_server1.props -configData Server=server1]')
以下の例に示すように、システムはプロパティー・ファイルを抽出します。# # SubSection 1.0 # Server Section # ResourceType=Server ImplementingResourceType=Server ResourceId=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName} # # #Properties # shortName=null serverType=DEPLOYMENT_MANAGER #readonly developmentMode=false #boolean parallelStartEnabled=true #boolean name=!{serverName} clusterName=null uniqueId=null modelId=null … … Properties of other inner objects ( EJBContainer, WebContainer, ORB etc) and subtypes not shown. … EnvironmentVariablesSection # #Environment Variables #Day Month 16 Time CDT Year cellName=myCell nodeName=myNode hostName=myHost.com serverName=dmgr
プロパティー・ファイルはセル、ノード、サーバー、 クラスター、アプリケーション、コア・グループ、またはノード・グループ名を表示しません。 代わりに、 コマンドにより !{cellName} のような変数が作成され、プロパティー・ファイルの末尾にある EnvironmentVariables セクションにそれらが組み込まれます。 プロパティー・ファイルでは、環境変数セクションにそれぞれの変数が含まれています。
- 特定のサーバーのサーバー・サブタイプ構成を抽出します。
- wsadmin スクリプト・ツールを開始します。
- 特定のサーバーの EJB コンテナーおよび Web コンテナーのプロパティーを抽出します。 以下の Jython 例に示すように、extractConfigProperties コマンドを使用して、サーバー構成を抽出します。
AdminTask.extractConfigProperties('[-propertiesFileName ejbcontainer.props -configData Server=server1 -filterMechanism SELECTED_SUBTYPES -selectedSubTypes [EJBContainer WebContainer]]')
以下の例に示すように、システムはプロパティー・ファイルを抽出します。# # SubSection 1.0 # EJBContainer # ResourceType=EJBContainer ImplementingResourceType=EJBContainer ResourceId=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:ApplicationServer= ID#ApplicationServer_1:EJBContainer=ID#EJBConntainer_1 AttributeInfo=components # # #Properties # EJBTimer={} #ObjectName*(null) name=null defaultDatasourceJNDIName=null inactivePoolCleanupInterval=30000 #long passivationDirectory="${USER_INSTALL_ROOT}/temp" enableSFSBFailover=false #boolean server=null parentComponent= WebSphere Application Server Network Deployment Server # # SubSection 1.0 # WebContainer # ResourceType=WebContainer ImplementingResourceType=WebContainer ResourceId=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:ApplicationServer= ID#ApplicationServer_1:WebContainer=ID#WebConntainer_1 AttributeInfo=components # # #Properties # enableServletCaching=false #boolean name=null defaultVirtualHostName=null server=null maximumPercentageExpiredEntries=15 #integer asyncIncludeTimeout=60000 #integer parentComponent=WebSphere Application Server Network Deployment Server disablePooling=false #boolean sessionAffinityFailoverServer=null maximumResponseStoreSize=100 #integer allowAsyncRequestDispatching=false #boolean sessionAffinityTimeout=0 #integer EnvironmentVariablesSection # #Environment Variables #Thu Apr 17 14:17:25 CDT 2008 cellName=myCell nodeName=myNode hostName=myhost.com serverName=dmgr
プロパティー・ファイルはセル、ノード、サーバー、 クラスター、アプリケーション、コア・グループ、またはノード・グループ名を表示しません。 代わりに、 コマンドにより !{cellName} のような変数が作成され、プロパティー・ファイルの末尾にある EnvironmentVariables セクションにそれらが組み込まれます。 プロパティー・ファイルでは、環境変数セクションにそれぞれの変数が含まれています。
EJBContainer=ID#EJBContainer_1 ストリングは、サーバー内の EJBContainer オブジェクトを表します。この XML ID を使用して、構成内のオブジェクトを一意的に識別します。 プロパティー・ファイルを構成に適用する前に、構成内の「名前」フィールドが myContainer に設定された場合は、このフィールドを EJBContainer=myContainer に変更できます。
- ノードのサブタイプを全探索しないでノード・プロパティーを抽出します。
- wsadmin スクリプト・ツールを開始します。
- サーバーとリソースの特定のサブタイプ・プロパティーを除く、ノード・プロパティーを抽出します。 以下の Jython 例に示すように、extractConfigProperties コマンドを使用して、ノード構成プロパティーを抽出します。
AdminTask.extractConfigProperties('[-propertiesFileName node.props -configData Node=myNode -filterMechanism NO_SUBTYPES]')
以下の例に示すように、システムはプロパティー・ファイルを抽出します。# # SubSection 1.0 # Node Section # ResourceType=Node ImplementingResourceType=Node ResourceId=Cell=!{cellName}:Node=!{nodeName} # # #Properties # shortName=null name=!{nodeName} maxFilePermissionForApps=".*¥.dll=755#.*¥.so=755#.*¥.a=755#.*¥.sl=755 " discoveryProtocol=TCP #ENUM(UDP|TCP|MULTICAST) hostName=!{hostName} # ## Section 1.0_1#Cell=!{cellName}:Node=!{nodeName} # ResourceType=Node ImplementingResourceType=Node ExtensionId=NodeMetadataExtension ResourceId=Cell=!{cellName}:Node=!{nodeName} # nodeOS=distributed nodeVersion=7.0.0.0 # # End of Section 1.0_1# Cell=!{cellName}:Node=!{nodeName} # # # End of Section 1.0# Cell=!{cellName}:Node=!{nodeName} # EnvironmentVariablesSection # #Environment Variables #Day Month 17 Time CDT Year cellName=myCell nodeName=myNode
プロパティー・ファイルはセル、ノード、サーバー、 クラスター、アプリケーション、コア・グループ、またはノード・グループ名を表示しません。 代わりに、 コマンドにより !{cellName} のような変数が作成され、プロパティー・ファイルの末尾にある EnvironmentVariables セクションにそれらが組み込まれます。 プロパティー・ファイルの環境変数セクションには、ファイルのそれぞれの変数が含まれています。
- ノードのサブタイプを全探索せずに、または拡張機能を呼び出さずに、ノード・プロパティーを抽出します。
- wsadmin スクリプト・ツールを開始します。
- サーバーとリソースの特定のサブタイプ・プロパティーを除いて、拡張機能を呼び出さずに、ノード・プロパティーを抽出します。 以下の Jython 例に示すように、extractConfigProperties コマンドを使用して、ノード構成プロパティーを抽出します。
AdminTask.extractConfigProperties('[-propertiesFileName node.props -configData Node=myNode -filterMechanism NO_SUBTYPES_AND_EXTENSIONS]')
以下の例に示すように、システムはプロパティー・ファイルを抽出します。# # SubSection 1.0 # Node Section # ResourceType=Node ImplementingResourceType=Node ResourceId=Cell=!{cellName}:Node=!{nodeName} # # #Properties # shortName=null name=!{nodeName} maxFilePermissionForApps=".*¥.dll=755#.*¥.so=755#.*¥.a=755#.*¥.sl=755 " discoveryProtocol=TCP #ENUM(UDP|TCP|MULTICAST) hostName=!{hostName} # ## Section 1.0_1#Cell=!{cellName}:Node=!{nodeName} # ResourceType=Node ImplementingResourceType=Node ExtensionId=NodeMetadataExtension ResourceId=Cell=!{cellName}:Node=!{nodeName} # nodeOS=distributed nodeVersion=7.0.0.0 # # End of Section 1.0_1# Cell=!{cellName}:Node=!{nodeName} # # # End of Section 1.0# Cell=!{cellName}:Node=!{nodeName} # EnvironmentVariablesSection # #Environment Variables #Day Month 17 Time CDT Year cellName=myCell nodeName=myNode
このコマンドは、ノード・リソースの拡張機能である NodeMetadataExtension セクションを、抽出したプロパティー・ファイルから除外します。 プロパティー・ファイルはセル、ノード、サーバー、 クラスター、アプリケーション、コア・グループ、またはノード・グループ名を表示しません。 代わりに、 コマンドにより !{cellName} のような変数が作成され、プロパティー・ファイルの末尾にある EnvironmentVariables セクションにそれらが組み込まれます。 プロパティー・ファイルの環境変数セクションには、ファイルのそれぞれの変数が含まれています。
次のタスク
プロパティー・ファイルを抽出したら、以下も含めてさまざまな目的にこの機能を使用します。
- 複数の管理コンソール・パネルを構成したり多くのコマンドを実行したりする代わりに、既存の構成を 1 つのロケーションで変更する場合
- アプリケーション開発のライフサイクルを改善する場合
プロパティー・ファイルを使用して、ご使用環境の次のサーバー・サブタイプを管理できます。
- アプリケーション・サーバー
- ノード
- プロファイル
- 仮想ホスト
- アプリケーション
- 許可テーブル
- データ複製ドメイン
- 変数マップ
- Java™ Database Connectivity (JDBC) プロバイダー
- Uniform Resource Locator (URL) プロバイダー
- メール・プロバイダー
- リソース環境プロバイダー
- Java™ 2 Connector (J2C) リソース・アダプター
サブトピック
WCCM オブジェクト・プロパティーの抽出または変更
既存の WCCM (WebSphere Common Configuration Model) オブジェクトのプロパティーを抽出または変更するには、wsadmin ツールを使用します。


http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=txml_7extractprops
ファイル名:txml_7extractprops.html