Creates a new entity in the repository.
create [ connect-args | local-args ] entity [file]
Ant build file, specifying properties from an optional file:
<jag_create entity=”entity” [ file=”file”] />
Ant build file, specifying properties directly:
<jag_create entity=”entity” > <property name=”name” value=”value” /> .... </jag_create>
Option |
Description |
Required |
---|---|---|
connect-args | local-args |
Arguments to specify a connection to the server or run in local mode. See “Local versus connected mode”. |
Yes |
entity |
The name of the entity being created, in the form EntityType:EntityName. |
Yes |
file |
An optional file containing properties for the entity. The file must specify properties in the form of an EAServer repository properties file. |
No |
name |
The property name. In an Ant build file,
you may specify multiple properties as |
When setting properties directly in Ant. |
value |
The property value. |
When setting properties directly in Ant. |
Return value |
Indicates |
---|---|
0 |
The command ran successfully; the result is true/success. |
2 |
The command did not run successfully; an exception was thrown. |
This example creates a package named NewPackage with the properties defined in the file NewPackage.props.
Command line:
jagtool create Package:NewPackage NewPackage.props
Ant build file:
<jag_create entity="Package:NewPackage" file="NewPackage.props" />
This example creates a package named NewPackage2 and sets the given properties. This alternate syntax allows properties for the new entity to be specified in the command.
Ant build file:
<jag_create entity="NewPackage2"> <property name="com.sybase.jaguar.description" value=Sample Package" /> <property name="com.sybase.jaguar.package.roles" value="role1" /> </jag_create>
This example creates a listener called MyListener for the Jaguar server:
Command line:
jagtool create Listener:Jaguar/MyListener
Ant build file:
<jag_create entity="Listener:Jaguar/MyListener" />
The create command does not perform the installation steps required to run an entity in a particular server. For example, a package or application must be installed in a server before running on that server, and a listener must be installed in the server that it is associated with. Use the install command to install entities into a parent entity.
Copyright © 2005. Sybase Inc. All rights reserved. |