The following examples demonstrate how to install an application in WebSphere Application Server V4.0 and V5.x:
set modhost1 [list mtcomps.war default_host] set modhosts [list $modhost1]
set resref1 [list mtcomps.war::mail/MailSession9 mail/DefaultMailSession] set resref2 [list deplmtest.jar::MailEJBObject::mail/MailSession9 mail/DefaultMailSession] set resrefs [list $resref1 $resref2]
EnterpriseApp install /Node:mynode/ c:/WebSphere/AppServer/installableApps/jmsample.ear -appname MailSampleApp -defappserver /Node:$mynode/ApplicationServer:myserv/ -modvirtualhosts $modhosts -resourcereferences $resrefs
The following command sequence accomplishes approximately the same thing as the V4.0 commands previously presented, but simpler ways exist:
Using Jacl:
set modtovh1 [list "JavaMail Sample WebApp" mtcomps.war,WEB-INF/web.xml default_host] set modtovh [list $modtovh1]
Using Jacl:
set resreftoejb1 [list deplmtest.jar MailEJBObject deplmtest.jar,META-INF/ejb-jar.xml mail/MailSession9 javax.mail.Session mail/DefaultMailSession] set resreftoejb2 [list "JavaMail Sample WebApp" "" mtcomps.war,WEB-INF/web.xml mail/MailSession9 javax.mail.Session mail/bozo] set resreftoejb [list $resreftoejb1 $resreftoejb2]
Using Jacl:
set attrs [list -MapWebModToVH $modtovh -MapResRefToEJB $resreftoejb -node mynode -server myserv -appname MailSampleApp]
Using Jacl:
$AdminApp install c:/WebSphere/AppServer/installableApps/jmsample.ear $attrs
$AdminConfig save