set_props

Description

Sets properties for an entity in the repository. Properties can be set by specifying either a names and values or a properties file.

Syntax

Local mode support: Yes.

Command line:

set_props [ connect-args | local-args ] entity [ name value ] | [ file ]

Ant build file, specifying a property file to read:

<jag_set_props entity=”entity” file=”file” />

Ant build file, specifying properties directly:

<jag_set_props entity=”entity” />
  <property name=”name” value=”value”>
  ...
</jag_set_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 entity whose properties are being set.

Always.

name

The property name. In an Ant build file, you may specify multiple properties as <property> elements.

When setting properties directly.

value

The property value.

When setting properties directly.

file

The name of a property file. Files must specify properties in the format of an EAServer properties file.

When setting properties using a properties file.

Returns

Return value

Indicates

0

The command ran successfully; the result is true/success.

2

The command did not run successfully; an exception was thrown.

Examples

Example 1

This example sets the description for the entity Package:SVU.

Example 2

This example sets the properties for Package:SVU from the file SVU.props.

Example 3

You can use the Ant build file to specify multiple properties. For example, this declaration sets the values for the com.sybase.jaguar.description and com.sybase.jaguar.package.roles properties for Package:SVU.

Example 4

This example sets the host, port, and network protocol values for “MyListener”:

Example 5

This jagtool example shows how special characters can be escaped when running commands in DOS or Windows. In this case, the = in the value set must be escaped by quoting:

jagtool set_props WebApplication:onepage com.sybase.jaguar.webapplication.session-config=(session-timeout"="30) 

This syntax is equivalent:

jagtool set_props WebApplication:onepage com.sybase.jaguar.webapplication.session-config="(session-timeout=30)"

See also

Appendix B, “Repository Properties Reference”