merge_props

Description

Merges or deletes property values for an entity.

Syntax

Local mode support: Yes.

Command line:

merge_props [ connect-args | local-args ] entity \
    [-verbose true|false] { [mergeop name value] | [file] } 

Ant build file: There are three syntax forms for Ant commands. You can specify a merge command for a single property with this syntax:

<jag_merge_props entity=”entity” [ verbose=” true|false” ] 
mergeop=”mergeop” name=”name” value=”value” >
</jag_merge_props>

You can specify merge commands for multiple properties with this syntax:

<jag_merge_props entity="entity" [ verbose="true|false" ]>
  <mergeproperty mergeop="mergeop" name="name"
     value="value" />
  <mergeproperty mergeop="mergeop" name="name"
     value="value" />
  ...
</jag_merge_props>

You can specify the name of a file that contains merge commands with this syntax:

<jag_merge_props entity=”entity” [ verbose=” true|false” ] 
  file=”file” ></jag_merge_props>

Option

Description

Required

connect-args | local-args

Arguments to specify a connection to the server or to run in local mode. See “Local versus connected mode”.

Yes

entity

The entity identifier for the target entity. Valid entity types include Agent, Application, Cluster, Component, ConnCache, Connector, DatabaseType, EntityCollection, Filter, InstancePool, Listener, ManagedConnectionFactory, Package, Role, Security, Server, Servlet, and WebApplication.

The entity types Connector, Filter, and ManagedConnectionFactory are available only for J2EE 1.3-enabled servers.

Yes

verbose

Whether to execute in verbose mode. The default is false.

No

mergeop

The merge operation, one of:

When not specifying a file containing merge commands.

name

The name of the property of interest.

When not specifying a file containing merge commands.

value

The property value to merge.

When not specifying a file containing merge commands.

file

The name of a text file containing merge commands. The file must be a text file containing lines of the form:

mergeop:name=value

Where mergeop, name, and value follow the syntax rules above.

When not specifying a merge operation and property name.

Examples

Example 1

To add a service to the list of services for server “Jaguar,” you can run the following on the command line:

jagtool merge_props Server:Jaguar AppendToList com.sybase.jaguar.server.services MyNewService

Example 2

The following Ant example appends a value to the Java classes setting for a package:

<target name="test_merge_props" depends="connect">
<jag_merge_props entity="Package:Foo"
  verbose="true" mergeop="AppendToList"
  name="com.sybase.jaguar.package.java.classes"
  value="com.foo.MyClass">
</jag_merge_props>
</target>

Example 3

This Ant example merges several properties for a package:

<target name="test_merge_props" depends="connect">
<jag_merge_props entity="Package:Foo" verbose="true">
  <mergeproperty mergeop="AppendToList"
    name="com.sybase.jaguar.package.description" value="more stuff"/>
  <mergeproperty mergeop="PrependToList" 
    name="com.sybase.jaguar.package.someprop" value="newvalue3"/>
  <mergeproperty mergeop="RemoveFromList" 
    name="com.sybase.jaguar.package.someprop" value="original"/>
  <mergeproperty mergeop="SetDefault" 
    name="com.sybase.jaguar.package.someprop" value="newvalue4"/>
  <mergeproperty mergeop="Delete" 
    name="com.sybase.jaguar.package.someprop"/>
</jag_merge_props>
</target>

Example 4

This Ant example specifies the name of a file that contains merge commands:

<target name="test_merge_props" depends="connect">
<jag_merge_props entity="Package:Foo"
  verbose="true" file="C:\EAServer\MergeProps.txt">
</jag_merge_props>
</target>

See also

props, set_props