PropertiesBasedConfiguration command group for the AdminTask object using wsadmin scripting
You can use scripting to customize part of your system configuration using properties files. The WebSphere configuration repository stores many different types of configurations. You can use properties files to customize some of these configurations. You can customize some configurations that are created by the WebSphere Common Configuration Model (WCCM) or configurations that are deployed as Java EE applications.
The WebSphere Common Configuration Model is configured using the AdminConfig
command in scripting. AdminConfig.types()
lists the types in WCCM, and
AdminConfig.attributes("type")
lists the attributes for a
specific type. Customizing these types using properties files is often easier than writing a script
to make the same changes. In a production environment, Java EE applications are often deployed
through the AdminApp command in scripting. For a development environment, the use
of a properties file offers an easier to understand syntax when constructing the parameters needed
to manage the application. Note that application deployment uses its own set of WCCM types.
- SIBus
- Business-level applications
- Key and trust store files
- Web services policy set files
- File based user registry
- Examine samples documented in Managing specific configuration objects using properties files.
- Copy and paste applicable samples into a text file, edit the samples as needed, and apply the samples to your environment with suitable variable substitutions. There are many samples to cover a wide range of commonly used configurations.
- For a supported WCCM type, you can extract that type from an existing cell as the
starting point, edit the extracted file, and apply it back to the existing cell.
For supported WCCM types that are not Cell, Node, Server, or ServerCluster, extract the specific type from an existing cell with the option
-options [[PortablePropertiesFile true]]
to create a portable file format. Then, edit the properties file and apply the portable file format with appropriate variable substitutions to a cell. The cell can be the same cell or a different cell. You might use this approach to move commonly used configuration subsets such as resource definitions and Java virtual machine (JVM) settings from one environment to another.
AccessPointGroup | ActivationSpec | ActivationSpecTemplateProps | ActivitySessionService |
---|---|---|---|
AdminObject | AdminObjectTemplateProps | AdminServerAuthentication | AdminService |
AllActivePolicy | AllAuthenticatedUserExt | AllAuthenticatedUsersInTrustedRealmsExt | ApplicationProfileService |
ApplicationServer | Audit | AuditEventFactory | AuditNotificationMonitor |
AuditPolicy | AuditServiceProvider | AuditSpecification | AuthenticationMechanism |
AuthenticationTarget | AuthorizationConfig | AuthorizationGroup | AuthorizationGroupMember |
AuthorizationProvider | AuthorizationTableExt | AuthorizationTableImpl | BackupCluster |
BridgeInterface | CACertificate | CAClient | CMPConnectorFactory |
CacheProvider | Cell | Certificate | Chain |
Classloader | ClusterMember | CommonSecureInterop | CompensationService |
ConfigSynchronizationService | ConnectionDefTemplateProps | ConnectionDefinition | ConnectionPool |
ConnectionTest | Connector | Cookie | CoreGroup |
CoreGroupAccessPoint | CoreGroupBridgeService | CoreGroupBridgeSettings | CoreGroupServer |
CryptoHardwareToken | CustomAuthMechanism | CustomService | CustomUserRegistry |
DCSInboundChannel | DPClonableDeviceSettings | DPClonableDeviceSettingsVersion | DPDevice |
DPDomain | DPDomainVersion | DPFirmware | DPFirmwareVersion |
DPManagedSet | DPManager | DRSConnectionPool | DRSPartition |
DataReplicationDomain | DataSource | DebugService | DiagnosticProviderService |
DigestAuthentication | DiskCacheCustomPerformanceSettings | DiskCacheEvictionPolicy | DistributionQueue |
DynamicCache | EJBCache | EJBContainer | EJBTimer |
EndPoint | ExternalCacheGroup | EveryoneExt | ExtensionMBean |
ExtensionMBeanProvider | GenericChannelFactory | ExternalCacheGroupMember | FileTransferService |
Filter | GenericOutboundChannel | GenericInboundChannel | GenericJMSConnectionFactory |
GenericJMSDestination | HTTPOutboundChannel | HAManagerService | HTTPConnector |
HTTPInboundChannel | HostAlias | HTTPTransport | HTTPTunnelInboundChannel |
HTTPTunnelOutboundChannel | IconType | I18NService | IIOPSecurityProtocol |
IIOPTransport | InvalidationSchedule | IdentityAssertionLayer | IdentityAssertionQOP |
IdentityAssertionTypeAssociation | J2EEResourcePropertySet | J2CActivationSpec | J2CAdminObject |
J2CResourceAdapter | JAASLoginModule | JAASAuthData | JAASConfiguration |
JAASConfigurationEntry | JFAPOutboundChannel | JDBCProvider | JFAPFactory |
JFAPInboundChannel | JavaVirtualMachine | JMSProvider | JMSTransport |
JavaProcessDef | KeyReference | KRB | Key |
KeyManager | KeyStoreFile | KeySet | KeySetGroup |
KeyStore | Library | LDAPSearchFilter | LDAPUserRegistry |
LTPA | MOfNPolicy | LibraryRef | ListenerPort |
LocalOSUserRegistry | MQQueue | MQConnectionFactory | MQFAPInboundChannel |
MQFAPOutboundChannel | MailProvider | MQQueueConnectionFactory | MQTopic |
MQTopicConnectionFactory | MemoryCacheEvictionPolicy | MailSession | ManagementScope |
MappingModule | MessageQOP | MessageLayer | MessageListener |
MessageListenerService | NoOpPolicy | MimeEntry | MonitoringPolicy |
NameServer | ObjectCacheInstance | Node | NodeGroup |
ORBInboundChannel | ObjectPoolService | ObjectPool | ObjectPoolManagerInfo |
ObjectPoolProvider | OutputRedirect | ObjectRequestBroker | OneOfNPolicy |
OutboundResourceAdapter | PMIService | PME51ServerExtension | PMEServerExtension |
PMIModule | PluginConfigService | PMRClusterExtension | PeerAccessPoint |
PeerCoreGroup | PreferredServerPolicy | PluginProperties | PluginServerClusterProperties |
PortletContainer | ProxyInboundChannel | PrimaryAdminExt | ProcessExecution |
ProtocolProvider | RMQOutboundChannel | RASLoggingService | RMIConnector |
RMQChannelFactory | ResourceAdapter | RSAToken | Referenceable |
RepositoryService | ServerEntry | ResourceEnvironmentProvider | RoleAssignmentExt |
SecurityRoleExt | SIPContainerInboundChannel | ServerExt | ServerIndex |
SIPContainer | SOAPConnector | SIPInboundChannel | SIPOutboundChannel |
SIPProxyInboundChannel | SSLInboundChannel | SPNEGO | SSLConfig |
SSLConfigGroup | SchedulerProvider | SSLOutboundChannel | SWAMAuthentication |
SchedulerConfiguration | Security | SchedulerService | SecureAssociationService |
SecureSocketLayer | Server | SecurityDomain | SecurityPermission |
SecurityProtocolQOP | ServletCacheInstance | ServerCluster | ServerIdentity |
ServiceLog | SingleSignon | SessionBeanConfig | SessionDatabasePersistence |
SessionManager | StaticPolicy | StartupBeansService | StateManageable |
StatefulSessionBeanConfig | SystemMessageServer | StatisticsProvider | StreamRedirect |
StringNameSpaceBinding | TCPOutboundChannel | TAInterceptor | TCPFactory |
TCPInboundChannel | TimerManagerInfo | TPVService | TaskProvider |
ThreadPool | TransactionService | TimerManagerProvider | TraceLog |
TraceService | TransportQOP | TransportChannelFactory | TransportChannelService |
TransportLayer | TuningParams | TrustAssociation | TrustManager |
TrustedAuthenticationRealm | UDPInboundChannel | TunnelAccessPointGroup | TunnelPeerAccessPoint |
TunnelTemplate | UserExt | UDPOutboundChannel | URL |
URLProvider | WAS40DataSource | VariableMap | VirtualHost |
WAS40ConnectionPool | WASTopicConnectionFactory | WASQueue | WASQueueConnectionFactory |
WASTopic | WSSchedule | WIMUserRegistry | WLMCoreGroupBridgePlugin |
WSNotification | WebModuleDeployment | WebContainer | WebContainerInboundChannel |
WebModuleConfig | WorkAreaPartition | WebServer | WebserverPluginSettings |
WeightAdvisor | WorkManagerProvider | WorkAreaPartitionService | WorkAreaService |
WorkManagerInfo | WorkManagerService |
applyConfigProperties
The applyConfigProperties command applies properties in a specific properties file to the configuration. The system adds attributes or configuration data to the configuration if a specific properties do not exist. If the properties exist in the configuration, the system sets the new values for the attributes.
Target object
None.
Required parameters
- -propertiesFileName
- Specifies the name of the properties file to apply. (String, required)
Optional parameters
- -variablesMapFileName
- Specifies the name of the variables map file. This file contains values for variables that the system uses from the properties file. (String, optional)
- -variablesMap
- Specifies the values of the variables to use with the properties file. (Properties, optional)
- -reportFileName
- Specifies the name of a report file that contains the output for the applyConfigProperties command. (String, optional)
- -reportFilterMechanism
- Specifies the type of report filter mechanism. Specify
All
to display all report information. SpecifyErrors
to display error information. SpecifyErrors_And_Changes
to display error and change information. (String, optional) - -validate
- Specifies whether to validate the properties file before applying the changes. If the properties file has been validated already with no error reported, disabling the properties file validation reduces the overall command execution time. By default, the
command validates the properties file. Specify
false
to disable validation. (Boolean, optional) - -zipFileName
- Specifies the name of the compressed file that contains the policy sets that you want applied to the cell. (String, optional)
Return value
The command does not return output.
Batch mode example usage
- Using Jython string:
AdminTask.applyConfigProperties('-propertiesFileName myPropFile.props -zipFileName myZipFile.zip -validate true')
- Using Jython list:
AdminTask.applyConfigProperties(['-propertiesFileName', 'myPropFile.props', '-zipFileName', 'myZipFile.zip', '-validate', 'true'])
Interactive mode example usage
- Using Jython:
AdminTask.applyConfigProperties('-interactive')
createPropertiesFileTemplates
The createPropertiesFileTemplates command creates template properties files to use to create or delete specific object types. The command stores the template properties file in the properties file specified by the propertiesFileName parameter.
Target object
None.
Required parameters
- -propertiesFileName
- Specifies the name of the properties file where the template is stored. (String, required)
- -configType
- Specifies the resource type for the template to create. (String, required)
- Specify
Server
to create a server type properties file template. - Specify
ServerCluster
to create a server cluster type properties file template. - Specify
Application
to create an application type properties file template. - Specify
AuthorizationGroup
to create an authorization group type properties file template.
- Specify
Optional parameters
NoneReturn value
The command does not return output.
Batch mode example usage
- Using Jython string:
AdminTask.createPropertiesFileTemplates('-propertiesFileName serverTemplate.props -configType Server')
- Using Jython list:
AdminTask.createPropertiesFileTemplates(['-propertiesFileName', 'serverTemplate.props', '-configType', 'Server'])
Interactive mode example usage
- Using Jython:
AdminTask.createPropertiesFileTemplates('-interactive')
deleteConfigProperties
The deleteConfigProperties command deletes properties in your configuration as designated in a properties file. The system removes the attributes or configuration data that corresponds to each property in the properties file.
Target object
None.
Required parameters
- -propertiesFileName
- Specifies the name of the properties file to delete. (String, required)
Optional parameters
- -variablesMapFileName
- Specifies the name of the variables map file. This file contains values for variables that the system uses from the properties file. (String, optional)
- -variablesMap
- Specifies the values of the variables to use with the properties file. (Properties, optional)
- -reportFileName
- Specifies the name of a report file that contains the output for the command. (String, optional)
- -reportFilterMechanism
- Specifies the type of report filter mechanism. Specify
All
to display all report information. SpecifyErrors
to display error information. SpecifyErrors_And_Changes
to display error and change information. (String, optional) - -validate
- Specifies whether to validate the properties file before applying the changes. By default, the
command validates the properties file. Specify
false
to disable validation. (Boolean, optional)
Return value
The command does not return output.
Batch mode example usage
- Using Jython string:
AdminTask.deleteConfigProperties('-propertiesFileName myPropFile.props')
- Using Jython list:
AdminTask.deleteConfigProperties(['-propertiesFileName', 'myPropFile.props'])
Interactive mode example usage
- Using Jython:
AdminTask.deleteConfigProperties('-interactive')
extractConfigProperties
The extractConfigProperties command extracts configuration data in the form of a properties file. The system exports the most commonly used configuration data and attributes, converts the attributes to properties, and saves the data to a file. You can specify the resource of interest with the target object or the configData parameter. Use the configData parameter to specify a server, node, cluster, policy set, or application instance. If no configuration object is specified, the command extracts the profile configuration data.
Target object
Specify the object name of the configuration object of interest in the format:
Node=nodeName:Server=serverName
Required parameters
- -propertiesFileName
- Specifies the name of the properties file to extract. (String, required)
Optional parameters
- -configData
- Specifies the configuration object instance in the format
Node=node1
. (String, optional) - -options
- Specifies additional configuration options, such as
GENERATETEMPLATE=true
. (Properties, optional) - -filterMechanism
- Specifies filter information for extracting configuration properties. (String, optional)
- -selectedSubTypes
- Specifies the configuration properties to include when the command extracts the
properties. Specify this parameter if you set the filterMechanism parameter
SELECTED_SUBTYPES
. The following strings are examples of subtypes: ApplicationServer, EJBContainer. (String, optional)Table 2. extractConfigProperties -selectedSubTypes subtypes and extensions. You can configure properties of the object types and subtypes. Configuration object type Subtypes Extensions AdminService None None Deployment ApplicationName None ApplicationServer TransactionService, DynamicCache, WebContainer, EJBContainer, PortletContainer, SIPContainer, WebserverPluginSettings None AuthorizationGroup None None AuthorizationTableExt None None Cell VirtualHost, DataReplicationDomain, ServerCluster, CoreGroup, NodeGroup, AuthorizationGroup, AuthorizationTableExt, Security, J2CResourceAdapter, JDBCProvider, JMSProvider, MailProvider, URLProvider, EventInfrastructureProvider, ObjectPoolProvider, WorkManagerProvider, TimerManagerProvider, SchedulerProvider, Node, VariableMap None CoreGroup None None CoreGroupBridgeService None None DynamicCache None None EJBContainer None None EventInfrastructureProvider None None EventInfrastructureService None None HAManagerService None None J2CResourceAdapter None None JDBCProvider None None JMSProvider None None JavaVirtualMachine None None Library None None MailProvider None None NameServer None None Node Server, J2CResourceAdapter, JDBCProvider, JMSProvider, MailProvider, URLProvider, EventInfrastructureProvider, ObjectPoolProvider, WorkManagerProvider, TimerManagerProvider, SchedulerProvider, VariableMap The NodeMetadata Extension extracts node Metadata properties. NodeGroup None None ObjectPoolProvider None None ObjectRequestBroker None None PMEServerExtension None None PMIModule None None PMIService None None PortletContainer None None SIPContainer None None SchedulerProvider None None Security JAASAuthData None Server PMIService, AdminService, CoreGroupBridgeService, TPVService, ObjectRequestBroker, ApplicationServer, NameServer, J2CResourceAdapter, JDBCProvider, JMSProvider, MailProvider, URLProvider, EventInfrastructureProvider, ObjectPoolProvider, WorkManagerProvider, TimerManagerProvider, SchedulerProvider, VariableMap, EventInfrastructureService, PMEServerExtension, Library, HAManagerService, PMIModule, Security The extension lists deployed applications for a specific server. ServerCluster J2CResourceAdapter, JDBCProvider, JMSProvider, MailProvider, URLProvider, ObjectPoolProvider, WorkManagerProvider, TimerManagerProvider, SchedulerProvider, VariableMap The extension lists deployed applications for a specific cluster. TPVService None None TimerManagerProvider None None TransactionService None None URLProvider None None VariableMap None None VirtualHost None None WebContainer None None WebserverPluginSettings None None WorkManagerProvider None None - -zipFileName
- Specifies the name of the compressed file into which you want to extract policy sets. (String, optional)
Return value
The command returns the name of the properties file that the system creates.
Batch mode example usage
- Using Jython string:
AdminTask.extractConfigProperties('-configData Node=myNode -propertiesFileName myNodeProperties.props -zipFileName myZipFile.zip')
- Using Jython list:
AdminTask.extractConfigProperties(['-configData', 'Node=myNode', '-propertiesFileName', 'myNodeProperties.props', '-zipFileName', 'myZipFile.zip'])
Interactive mode example usage
- Using Jython string:
AdminTask.extractConfigProperties('-interactive')
for vhost in AdminConfig.list( 'VirtualHost' ).splitlines() :
name = AdminConfig.showAttribute( vhost, 'name' )
parms = '[-propertiesFileName ' + name + '.properties -configData VirtualHost=' + name + '
-options [[PortablePropertiesFile true]] ]'
AdminTask.extractConfigProperties(parms)
This
example produces a <VIRTUALHOSTNAME>.properties file for each virtualHost in the
cell.validateConfigProperties
The validateConfigProperties command verifies that the properties in the properties file are valid and can be successfully applied to the new configuration.
Target object
None.
Required parameters
- -propertiesFileName
- Specifies the name of the properties file to validate. (String, required)
Optional parameters
- -variablesMapFileName
- Specifies the name of the variables map file. This file contains values for variables that the system uses from the properties file. (String, optional)
- -variablesMap
- Specifies the values of the variables to use with the properties file. (Properties, optional)
- -reportFileName
- Specifies the name of a report file that contains the output for the applyConfigProperties command. (String, optional)
- -reportFilterMechanism
- Specifies the type of report filter mechanism. Specify
All
to display all report information. SpecifyErrors
to display error information. SpecifyErrors_And_Changes
to display error and change information. (String, optional) - -zipFileName
- Specifies the name of the compressed file that contains the policy sets that you want applied to the cell. (String, optional)
Return value
The command returns a value of true
if the system validates the properties file
or policy set .zip file.
Batch mode example usage
- Using Jython string:
AdminTask.validateConfigProperties('-propertiesFileName myNodeProperties.props -zipFileName myZipFile.zip -reportFileName report.txt')
- Using Jython list:
AdminTask.validateConfigProperties(['-propertiesFileName', 'myNodeProperties.props', '-zipFileName', 'myZipFile.zip', '-reportFileName', 'report.txt'])
Interactive mode example usage
- Using Jython:
AdminTask.validateConfigProperties('-interactive')