Add composition units. Use the addCompUnit
command to add composition units to business-level applications.
Use the following command example to add the
asset1 asset
as a composition unit in the
myBLA business-level
application, and map the deployment to the
server1 server:
AdminTask.addCompUnit('-blaID myBLA –cuSourceID asset1 -CUOptions [[.* .*
compositionUnit1 "composition unit that is backed by asset1" 0]] -MapTargets
[[.* server1]]
–ActivationPlanOptions [.* specname=actplan0+specname=actplan1]')
Use
the following command to add the
asset2 asset as
a composition unit in the
myBLA business-level application,
and map the deployment to the
server1 and
testServer servers:
AdminTask.addCompUnit('-blaID myBLA –cuSourceID asset2 -CUOptions [[.* .*
compositionUnit2 "composition unit that is backed by asset2" 0]] -MapTargets [[.*
server1+testServer]] –ActivationPlanOptions [.* specname=actplan0+specname=actplan1]')
Use
the following command to add the
J2EEAsset asset
as a composition unit in the
myBLA business-level
application, and map the deployment to the
server1 and
testServer servers:
AdminTask.addCompUnit('[-blaID myBLA –cuSourceID J2EEAsset
–defaultBindingOptions defaultbinding.ejbjndi.prefix=ejb# defaultbinding.virtual.host=default_host#
defaultbinding.force=yes –AppDeploymentOptions [-appname defaultapp -installed.ear.destination
application_root/myCell/defaultapp.ear] –MapModulesToServers [[defaultapp.war
.* WebSphere:cell=cellName,node=nodeName,server=server1][Increment.jar .*
Websphere:cell=cellName,node=nodeName,server=testServer]] -CtxRootForWebMod [[defaultapp.war .*
myctx/]]]')
If you are editing
a composition unit to update a shared library, you must first manually
stop all Java EE applications that depend on that shared library.
After updating the shared library, manually restart the Java EE applications.
Java EE applications do not automatically restart when a shared library
is updated.
The command returns the configuration
IDs of the composition unit and the new composition unit created for
the asset in the asset relationship, as the following example displays:
WebSphere:cuname=compositionUnit1 WebSphere:cuname=compositionUnit2
WebSphere:cuname=J2EEAsset