You can add merge files to EAServer JAR files so that property files are merged rather than being overwritten. Normally, an EAServer JAR file contains all the properties for the entities exported in the archive. In some cases, you may not want to overwrite existing property files. For example, if you create an entity collection that contains a server, you may not want to overwrite the existing server properties when the archive is imported.
You can also add “cleaner” files, which cause entities to be removed entirely when an archive is exported.
Creating an archive that contains merge files
Create the merge and cleaner files for the entities to be exported.
For each entity that requires a merge or cleaner file, add the file name to the entities .files property (that is, the property that ends in .files, such as com.sybase.jaguar.component.files).
Create the archive using jagtool or EAServer Manager.
Merge files must exist in the same directory as the properties file to merge with, and have the same base name with the .merge extension. For example, to merge properties for server Jaguar, the JAR file must contain these files:
Server/Jaguar.props Server/Jaguar.merge
If a property is set in the merge file and in the .props file, the value is merged based on the merge-file setting, and the .props file setting is ignored. If a property is not set by either the merge file or in the .props file, it is left as is when the archive is imported. Merge files are text files, with one merge operation per line. Each merge operation uses the syntax:
MergeOperation:Property=NewValue
Where:
MergeOperation is an operation listed in Table 9-2.
Property is the property name.
NewValue is the value to be merged with or removed from the existing value.
This example uses the AppendToList and RemoveFromList operations. For a server, this syntax could be used to remove an old version of a package and install a new version:
RemoveFromList:com.sybase.jaguar.server.packages=OEMPackageVersion1 AppendToList:com.sybase.jaguar.server.packages=OEMPackageVersion2
This example deletes the com.sybase.jaguar.server.timeout property:
Delete:com.sybase.jaguar.server.timeout
If present in an EAServer JAR file, cleaner files cause an entity to be removed entirely when an JAR file is imported. Cleaner files must exist in the same directory as the properties file for the entity to be deleted, and have the same base name with the .clean extension. For example, to cause deletion of the component MyStuff/Account, the JAR file must contain these files:
Component/MyStuff/Account.props Component/MyStuff/Account.clean
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |