Use the Jython or Jacl scripting language to implement
pattern matching when installing, updating, or editing an application.
Pattern matching simplifies the task of supplying required values
for certain complex options by allowing you to pass in asterisk (*)
to all of the required values that cannot be edited.
Before you begin
There are two ways to complete this task. This topic uses
the AdminApp object to install enterprise applications. Alternatively,
you can use the scripts in the AdminApplication script library to
install, uninstall, and administer your application configurations
with many options, including pattern matching.
스크립트 라이브러리는 가장 일반적인 관리 기능을
자동화하는 프로시저 세트를 제공합니다. 각 스크립트 프로시저를 개별적으로
실행하거나 여러 프로시저를 결합하여 새 스크립트를 신속하게 개발할 수 있습니다.
Procedure
- Install each web application archive (WAR) and Java™ archive file to the application server.
- wsadmin 스크립트 도구를 시작하십시오.
- Install each web application archive (WAR) and Java archive file to the application server,
as the following examples demonstrate:
- Using Jython:
AdminApp.install('DefaultApplication.ear', ['-appname', 'TEST', '-MapModulesToServers', [['.*',
'.*', 'WebSphere:cell=myCell,node=myNode,server=myServer']]])
- Using Jacl:
$AdminApp install DefaultApplication.ear {-appname TEST -MapModulesToServers
{{.* .* WebSphere:cell=myCell,node=myNode,server=myServer}}}
- Save your configuration changes.
다음 명령 예제를 사용하여 구성 변경사항을 저장하십시오.
AdminConfig.save()
- Install each WAR file to the myServer server
on the myNode node and each JAR file to the yourServer server
on the yourNode node.
- wsadmin 스크립트 도구를 시작하십시오.
- Install the WAR and JAR files to different application
server management scopes, as the following examples demonstrate:
Using Jython:
AdminApp.install('DefaultApplication.ear', ['-appname', 'TEST', '-MapModulesToServers', [['.*',
'.*.war,.*', 'WebSphere:cell=myCell,node=myNode,server=myServer'], ['.*', '.*.jar,.*',
'WebSphere:cell=myCell,node=yourNode,server=yourServer']]])
Using Jacl:
$AdminApp install DefaultApplication.ear {-appname TEST -MapModulesToServers
{{.* .*.war,.* WebSphere:cell=myCell,node=myNode,server=myServer}
{.* .*.jar,.* WebSphere:cell=myCell,node=yourNode,server=yourServer}}}
- Save your configuration changes.
다음 명령 예제를 사용하여 구성 변경사항을 저장하십시오.
AdminConfig.save()