Extract the properties
for a deployed enterprise application. Run the extractConfigProperties command
to extract the configuration attributes and values of a deployed enterprise
application to a properties file:
AdminTask.extractConfigProperties('[-propertiesFileName myApp.props -configData Application=MyApplication]')
Running
this Jython example produces a file named myApp.props that
lists the properties of an Application configuration object named MyApplication.
You can use the extracted properties file to view and edit the properties
of the application. The MapModulesToServers section of the properties
file resembles the following:
#
# SubSection 1.0.2
# MapModulesToServers Section. taskName and row0 should not be edited. row0 contains column names for the task.
#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Cell=!{cellName}:Deployment=!{applicationName}
#
#
#Properties
#
taskName=MapModulesToServers
row2={"My Web Application" MyWebApplication.war,WEB-INF/web.xml WebSphere:cell=!{cellName},
node=!{nodeName},server=!{serverName}
23 moduletype.web "Web Module"}
row1={"My Enterprise Java Bean" My.jar,META-INF/ejb-jar.xml WebSphere:cell=!{cellName},node=!{nodeName},
server=!{serverName} 20 moduletype.ejb "EJB Module"}
mutables={false false true false false false} #readonly
row0={module uri server ModuleVersion moduletype moduletypeDisplay} #readonly
By
default, the extractConfigProperties command produces
output that displays all columns, including hidden and non-hidden
columns, of install task and task data values in separate rows. The mutables row
shows which columns you can edit (true) and which
you cannot edit (false).
New feature: To enhance the output of application properties,
run the AdminTask
extractConfigProperties command
with the
SimpleOutputFormat option. When the option
is set to
true, the output displays non-hidden columns
of application properties in
columnName=value pairs.
Hidden columns of application properties are not included in the output.
The enhanced output makes it easier for you to find and edit application
property values. You can use an edited properties file to install
or update an application. The following example specifies the
SimpleOutputFormat option
in the
extractConfigProperties command:
AdminTask.extractConfigProperties('[-propertiesFileName myApp.props -configData Application=MyApplication
-option [[SimpleOutputFormat true]]]')
newfeat
With
the SimpleOutputFormat option, the MapModulesToServers
section of the extracted application properties file resembles the
following:
#
# SubSection 1.0.2
# MapModulesToServers Section. taskName and lines marked as "#readonly" should not be edited.
#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Cell=!{cellName}:Deployment=!{applicationName}
#
#
#Properties
#
taskName=MapModulesToServers
row0={ module="My Enterprise Java Bean" #readonly
uri=My.jar,META-INF/ejb-jar.xml #readonly
server=WebSphere:cell=!{cellName},node=!{nodeName},server=!{serverName} }
row1={ module="My Web Application" #readonly
uri=MyWebApplication.war,WEB-INF/web.xml #readonly
server=WebSphere:cell=!{cellName},node=!{nodeName},server=!{serverName} }
Replace, add, or delete multiple files of
a deployed enterprise application. This option specifies
to update multiple files of an installed application by uploading
a compressed file. Depending on the contents of the compressed file,
a single use of this option can replace files in, add new files to,
and delete files from the installed application. Each entry in the
compressed file is treated as a single file and the path of the file
from the root of the compressed file is treated as the relative path
of the file in the installed application.
To replace a file,
a file in the compressed file must have the same relative path as
the file to be updated in the installed application.
To add
a new file to the installed application, a file in the compressed
file must have a different relative path than the files in the installed
application.
The relative path of a file in the installed application
is formed by concatenation of the relative path of the module (if
the file is inside a module) and the relative path of the file from
the root of the module separated by /.
To remove a file from
the installed application, specify metadata in the compressed file
using a file named META-INF/ibm-partialapp-delete.props at
any archive scope. The ibm-partialapp-delete.props file
must be an ASCII file that lists files to be deleted in that archive
with one entry for each line. The entry can contain a string pattern
such as a regular expression that identifies multiple files. The file
paths for the files to be deleted must be relative to the archive
path that has the META-INF/ibm-partialapp-delete.props file.
For
more information on the metadata .props file
to include in compressed files, see the "Replace, add, or delete
multiple files" section in Preparing for application update settings.
- Edit the application properties file so that it specifies
the compressed file.
Edit the properties of an Application
configuration object. Specify Update=true, operationType=update,
and contentType=partialapp in the Properties section.
The following example uses the myAppPartial.zip compressed
file to update a deployed application named hello:
#
# Header
#
ResourceType=Application
ImplementingResourceType=Application
CreateDeleteCommandProperties=true
ResourceId=Deployment=hello
#
#
# Properties
#
Name=hello
Update=true
operationType=update
contentType=partialapp
contentFile= c:/temp/MyApp/myAppPartial.zip
- Run the applyConfigProperties command
to update the application.
Running the applyConfigProperties command
applies the properties file. For an example, see the install step.