|
Facilities Guide |
This chapter describes the SilverCmd utilities, in alphabetical order. It discusses the purpose, syntax, and arguments for each utility. It also describes how to run SilverCmd and presents the associated security and authentication issues. It includes the following sections:
SilverStream's command line tool, SilverCmd, provides a way to perform SilverStream operations without accessing the SilverStream Designer. You can use SilverCmd to automate many of the tasks associated with managing the components of a SilverStream application, or to incorporate application objects built outside the SilverStream Designer.
Separate ports The SilverStream server lets you define separate runtime, design, and administration ports for different types of users and operations. In most cases you will need to specify the design port when running SilverCmd. As noted in the description of each SilverCmd later in this chapter, you will need to specify the administration port for any command that will add/delete databases or change security properties. Specifying an inappropriate port will result in a security error code.
For more information about using separate ports, see the chapter on running the server in the Administrator's Guide.
The following table summarizes the commands available through SilverCmd along with the server permissions required to execute them.
SilverCmd is located in the SilverStreamInstallDir\bin directory. If you will be using SilverCmd frequently, consider adding SilverStreamInstallDir\bin to your system path for convenience.
Authentication If your SilverStream server is running in a restricted production environment (as opposed to a unrestricted design environment) you will need to authenticate yourself using the -U and -P options to run commands that access the server.
Executing SilverCmd from the command prompt To run SilverCmd from the command prompt, use this syntax:
SilverCmd command arguments
SilverCmd arguments The following table describes the arguments you can specify with SilverCmd.
|
Argument |
Description |
|---|---|
Provides general usage information for SilverCmd For usage on an individual command, specify the command followed by the -? argument: SilverCmd command -? Usage messages that include brackets [ ] indicate that the element within the bracket is optional | |
|
When SilverCmd encounters an error, it stops execution, generates detailed error messages explaining the failure, and displays the messages in the command prompt window If you specify -i, SilverCmd ignores the errors and continues execution | |
Specifies a user name and password combination for SilverStream authentication If the SilverStream server is running in a restricted production environment, you will need to authenticate yourself to run commands that access the server SilverStream uses all of the standard SilverStream security mechanisms as though the user were executing the command from the SilverStream design environment or the management console If you run SilverCmd in execute mode, you can specify a different -U and -P per command
|
Running SilverCmd in execute mode You can run one or more SilverCmds from a file. This is called execute mode. To run in execute mode, use this syntax:
SilverCmd Execute command-file
Logging messages to a file By default, SilverCmd logs informational messages, warnings, and errors to the command window. You can write the messages to a file using the standard redirect symbol (>). For example:
SilverCmd Execute command-file -i > SilverCmd.log SilverCmd RebuildJAR localhost MyApp myJar > SilverCmd.log
Some commands require an input file (specified using the -f option); for other commands it is optional and provided as a convenience. For example, the AddDatabase command requires that you supply the database name, the database type, the user name, the password, and the JDBC driver in an input file. The Delete command does not require an input file. You can delete a single item at the command line, or you can specify a list of items to delete within an input file.
Input file format Regardless of whether the command requires the input file or allows its use as a convenience, the input file must be in XML format. Each input file must include a DOCTYPE statement. You do not need to be an XML expert to create input files. SilverStream supplies sample XML files for each of the commands. You can copy and paste the required DOCTYPE statement from the appropriate sample into your own XML input file.
The DTD for each input file is located in the SilverStreamInstallDir\Resources\DTDCatalog directory.
The XML sample for each input file is located in the SilverStreamInstallDir\samples\SilverCmd directory.
The examples and DTDs include are self-documenting. See them for the most up-to-date input file requirements.
Some values can be specified at both the command line and within an input file. Values specified at the command line override input file settings.
The following table lists the DTD and sample input files for each SilverCmd command.
|
Command |
DTD |
Sample input file |
|---|---|---|
Registers a SQL database with the specified SilverStream server.
NOTE If you have configured separate ports, you will need to specify the administration port when running AddDatabase.
SilverCmd AddDatabase server[:port] -f file [options]
AddDatabase Input file The AddDatabase command expects the input file to use the add_database.DTD located in the SilverStream/DTDs directory. It includes nodes for the following:
|
Entry |
Description |
|---|---|
Specifies the user account used by the SilverStream server when accessing this database The account must have read/write permissions for the database | |
Specifies the vendor name for the database, for example, Oracle, DB2, or Sybase System 11.
| |
Specifies the driver type for the database Each database type has a default connection type. If you do not specify a value, SilverStream assumes this type. If you are using a value that is not in the list of database type/connection type values you must specify Other JDBC Driver plus: |
The following nodes are optional.
Valid Database Connection Types To connect to a database, the SilverStream server needs the combination of:
Platform name. Identifies the vendor and version of the database. For example, Oracle 7 or Microsoft SQL Server 7.
Driver set. Identifies the database driver. It must include the package name so the server can locate it.
LDS key. The logical data source key. You can use this in place of the platform name and driver set.
SilverStream has already defined strings that resolve to these values. See add_database_sample.xml in the SilverStreamInstallDir\samples\SilverCmd directory for the complete listing of valid values.
Compiles the items in an entire database, a directory within the database, or a named item within a directory. You can only build the items located in the Forms, Pages, Views, and Objects directories.
Copies the specified item (or set of items) from the server to the following directory on the local disk: SilverStream/compilecache/server/database/source
Compiles the objects (using the Java compiler specified in the Designer's preferences file). Generates warning messages for items that cannot be compiled
Saves (or uploads) the successfully compiled items (.CLASS files) back to the server
SilverCmd Build server[:port] database [item] [options]
Deprecated. For JSP1.1 pages, use the DeployWAR command.
Deploys JavaServer Pages (JSPs) 1.0 authored outside SilverStream to a SilverStream server. This command combines the capabilities of the JSPCompiler and DeployJSP SilverCmd utilities into a single command.
BuildJspJar performs these tasks:
SilverCmd BuildJspJar server[:port] database rootDir -u baseURLList [options]
Constructs a Web Archive (WAR) file using the contents of a specified directory on the local file system (including files and subdirectories). It also constructs the web.xml deployment descriptor and by default adds an entry for each JSPin the directory. You can optionally provide a more detailed web.xml that may include information about any servlets or tag libraries in the WAR. When you provide a web.xml, you must also include the information about the JSPs.
You can use the -n option to specify the location where BuildWAR should create the WAR file. When you do not specify -n, the WAR is created in the Temp directory. It is named agwarXXXX.war.
You can use the -d option to deploy the WAR to a SilverStream server after the WAR is constructed. When you do specify -d, the server and database arguments are required along with the - u option and one or more URLs. If you do not specify the -u option, then you must supply them in a deployment plan file using the -f option.
For more information about the WAR deployment plan requirements, see
Deploying Web Archives (WARs).
SilverCmd BuildWar server[:port] database rootDir [options]
|
Argument |
Description |
|---|---|
Specifies the name of the target SilverStream server and the design-time port | |
Clears the default URL for a database or server.
SilverCmd ClearDefaultURL server[:port] [database] [options]
|
Argument |
Description |
|---|---|
Specifies the name of the target SilverStream server and the design-time port | |
|
Option |
Definition |
|---|---|
Specifies user name and password for SilverStream authentication |
Generates COM-access classes from a COM Typelib.
SilverCmd ComGen typelib_path [options]
|
Argument |
Description |
|---|---|
The type library for the COM component. The type library can be a separate .TLB file or a resource that is linked into the .DLL or .EXE. | |
|
Option |
Description |
|---|---|
|
The output directory is the root directory under which the package directory tree is created. | |
Converts EJB 1.0 serialized deployment descriptors to EJB 1.1 XML deployment descriptors.
SilverCmd ConvertEJB OldEjbJarPath [NewEjbJarPath] [options]
|
Arguments |
Description |
|---|---|
|
Option |
Description |
|---|---|
Creates a Java package of the specified name in the Objects directory of the target database.
SilverCmd CreatePackage server:[port] database package [options]
|
Argument |
Description |
|---|---|
Specifies the name of the target SilverStream server and the design-time port | |
|
Option |
Definition |
|---|---|
Specifies a user name and password for SilverStream authentication |
This example creates the package com.myco.foo in the mydb database on the localhost server:
SilverCmd CreatePackage localhost mydb com.myco.foo
Deletes the named component(s) from the specified database and server.
SilverCmd Delete server[:port] database [item] [options]
|
Argument |
Description |
|---|---|
Specifies the name of the target SilverStream server and the design-time port | |
Deploys a J2EE-compatible application client archive file authored outside SilverStream to the specified SilverStream server.
The archive file must comply with the J2EE specification and must contain a manifest file that includes a Main-Class entry.
The deployed object is given the same name as the archive unless you specify the -d option.
SilverCmd DeployCAR server[:port] database jarfile -f [deployment plan] [options]
|
Argument |
Description |
|---|---|
Specifies the name of the target SilverStream server and the design-time port | |
Specifies the name (and path) of the client application archive to deploy |
Options The valid options are:
Deploys an Enterprise Archive file (EAR) authored outside SilverStream to a SilverStream server.
DeployEAR performs these tasks:
Opens the EAR file and extracts all of the files to a local temporary directory.
Performs the appropriate SilverCmd DeployXXX corresponding to each archive type.
Passes the -o flag (if specified) to each of the DeployXXX commands
SilverCmd DeployEAR server[:port] database [EARFile] -f deploymentPlan [options]
|
Argument |
Description |
|---|---|
Specifies the name of the target SilverStream server and the design-time port | |
Specifies the name and location (on disk) of the EAR file to deploy. This value can also be specified in the deployment plan. When specified in both places, the deploymentPlan value takes precedence. | |
Specifies the name and location (on disk) of the XML-based deployment plan.
|
Options The valid options are:
Deploys an EJB JAR on the named SilverStream server.
The EJBs can be authored using SilverStream tools so the source files and deployment plan reside on the SilverStream server, or the EJBs can be authored using external tools so the sources and deployment plan reside outside of the SilverStream server.
DeployEJB performs these tasks:
Creates implementation classes for the home and remote interfaces, and generates wrapper classes that handle security and transactions.
Generates a deployed object which contains the implementation classes used by the SilverStream server. This object remains on the server.
Generates stub classes and puts them into a remote JAR that is used by the bean's clients. A copy of this remains on the server.
NOTE For external Java clients, you must manually copy this remote JAR to each client that needs to access this deployed EJB, or you can specify the -R option to automatically copy the remote JAR to a single client machine.
Enables the deployedObject for client access when allowed by the deployment plan.
SilverCmd DeployEJB server[:port] database [ejbJar] [-d ejbDeployedObject] [-r ejbRemoteJar] -f file [-R remoteJarPath] [options]
Deprecated. For JSP1.1 pages, use the DeployWAR command.
Uploads a JSP 1.0 JAR file to the specified server and deploys it on that server.
SilverCmd DeployJSP server[:port] database jspJarFile -f file [options]
|
Option |
Description |
|---|---|
If the JAR exists on the server, this flag forces the JAR to be overwritten |
Deploys a J2EE-compatible Web archive (WAR) to a SilverStream server.
DeployWAR performs these tasks:
The deployed WAR can also contain standard servlet classes and other supporting Java source files that were compiled separately, as well as HTML documents, images, and any other files required by the application.
SilverCmd DeployWAR server[:port] database [WARFile] -f deploymentPlan [options]
Options The valid options are:
Copies the .JAVA source file of a single business object from a SilverStream application database to the specified location on disk as a text file.
SilverCmd ExportSource server[:port] database [classname] [javafile] [is-file] [options]
Copies Java .CLASS files to the Objects directory of the specified database.
You can use ImportClass to copy any kind of Java class including utility classes and SilverStream's triggered objects. You cannot use this command to import the class files for any other type of SilverStream object (such as forms, views, or pages).
To import some types of triggered business object, you must provide additional information about the object's trigger. For example: a mail triggered business object requires data about the mail account to which it responds, a servlet requires the URL specification, and so on. Values for mail and table listeners can be specified at the command line; all others must be specified within the input file. Server, cluster, and invoked business objects do not require additional information. Values specified at the command line (specifically, the -t, -m, and -p options) override settings in the input file.
SilverCmd ImportClass server[:port] database classfile [options]
|
Argument |
Description |
|---|---|
Specifies the name and optionally the design-time port number of the target SilverStream server | |
Imports objects to the appropriate Media subdirectory on the SilverStream server. The objects can include images, standard JARs, EJB JARs, and sounds.
NOTE You cannot modify imported JARs using the SilverStream Jar Designer. You must make any modifications to the JAR file before importing it into SilverStream.
Importing JAR files that reference files in other JARs You might have to import a JAR file that contains references to classes in other JAR files. The JAR that you want to import must contain a Class-path entry that lists the JARs containing the referenced classes. When this is true, you:
Import the JARs containing the referenced files (the referenced JARs).
Add the primary JAR to any forms, pages, business objects, or deployment plans that use the components in the primary JAR (added via the File>Jar files menu item.
If the JAR you are importing does not include a manifest file with a Class-path entry listing the referenced JARs, do the following before trying to import the JAR:
Extract the manifest of the primary JAR (making sure that the path on extract matches the manifest's path within the JAR).
Add the Class-path attribute to the manifest of the primary JAR.
For more information on the Class-path attribute, see the chapter on the JAR Designer in the Tools Guide of the server's Classic Development Help.
Follow the steps for importing JARs that already contain the Class-path entry outlined above.
SilverCmd ImportMedia server[:port] database fileOrDir...[options]
Imports a static HTML page to a SilverStream database. You can optionally associate the HTML page with one or more URLs.
SilverCmd ImportPage server[:port] database htmlfile [options]
|
Argument |
Description |
|---|---|
Specifies the name of the target SilverStream server and the design-time port | |
Imports .Java files to the business objects directory of the specified database and server.
You can use ImportSource to copy source code for utility, EJB, and SilverStream's triggered objects. You cannot use this command to import the source for any other type of SilverStream object (such as forms, views, or pages).
To import some types of triggered business objects, you must provide additional information about the object's trigger. For example, a mail triggered business object requires data about the mail account to which it should respond; a servlet requires the URL specification, and so on. Values for mail and table listeners can be specified either at the command line or in the input file; all others must be specified within the input file. Server, cluster, and invoked business objects do not require additional information. Values specified at the command line (specifically the -t, -m, and -p options) override settings in input file. You can also set or modify these values once the object is imported.
SilverCmd ImportSource server[:port] database javafile [options]
|
Argument |
Description |
|---|---|
Specifies the name of the target SilverStream server and the design-time port | |
Deprecated. For JSP1.1 pages, use the DeployWAR command.
Translates a JSP 1.0 page to a Java servlet.
SilverCmd JSPCompiler jspfile | xmldoc jspfiles... [options]
|
Argument |
Description |
|---|---|
The name(s) of additional JSP files to process (in a space-separated list) | |
|
Option |
Description |
|---|---|
Specifies the application root location. This option is used only when compiling a page that contains a JSP include directive with a relative URL that starts with a slash (/) | |
Defines the set of tables available to SilverStream for a specified database. The ModifyTableList command requires an input file to specify the table names.
NOTE If you have configured separate ports, you will need to specify the administration port when running ModifyTableList.
SilverCmd ModifyTableList server[:port] database -f file [options]
|
Option |
Definition |
|---|---|
Specifying tables in the input file Your input file specifies the tables you want to include or make accessible to SilverStream. The input file can include either a list of individual table names to include, a list of table name patterns, or a combination.
When you specify a pattern, you can use the % symbol to match any number of characters and the underscore (_) character to specify that you want to match any one character.
Updates the following compiler settings in the Designer preferences file:
The preferences file contains additional information that is not settable from the Prefs command line. Any compiler values not specified via the command line or in the input file are left unchanged in the preferences file. To change any other settings, such as, the default browser, you must use the Edit>Preferences menu option in the Main Designer.
For more information on changing these setttings, see the chapter on the Main Designer in the Tools Guide in the server's Classic Development Help.
NOTE You should stop the Designer before executing the Prefs command. If the Designer is running, the changes will not take effect.
SilverCmd Prefs [options]
Setting Debug Flags The DebugFlags option is not a directive to the compiler, but to SilverStream. It specifies whether or not AgfForm.debugPrint() should print. An existing preferences file might list the value as 0 or 1, but when you set this flag, you should always set it to a Boolean value (true or false). You cannot change the debug flags option at the command line; you must set it via the XML file specified using the -f option.
Publishes items from one database or server to another.
SilverCmd Publish sourceserver[:port] sourcedatabase targetserver[:port] targetdatabase -f file [options]
|
Argument |
Definition |
|---|---|
Specifies the name of the source SilverStream server and the design-time port | |
Specifies the name of the target SilverStream server and the design-time port | |
Publishes SilverStream components from the specified directory on disk to the appropriate directory on the specified SilverStream server and database. You can only publish items that were downloaded using PublishToFile (not exported) from a SilverStream server because they must be in the expected file format. SilverCmd places the objects in the appropriate server directory. For example, forms are uploaded to the forms directory, pages to the page directory, and so on.
For more information, see
PublishToFile.
If you are publishing items without their .CLASS files, you must build the objects after uploading them.
SilverCmd PublishFromFile server[:port] database [fileorDir] [options]
|
Argument |
Definition |
|---|---|
Specifies the name of the target SilverStream server and the design-time port | |
Downloads the components of an application database from the server to a specified location on disk, or to the current working directory if no directory is specified.
The PublishToFile operation maintains the server's directory structure for the items it downloads. For example, if you specify that the items be downloaded to the C:\test directory, SilverCmd downloads forms to the c:\test\Forms, pages to the c:\test\Pages, business objects to the c:\test\Objects, and so on.
You might use PublishToFile in conjunction with PublishFromFile when you want to transfer application components indirectly between servers. Suppose, for example, that you have created an application that you want to install (not Publish) on another server. You would use PublishToFile to obtain all of the application's files including all of the necessary components (such as Java code, metadata information, and associated data such as HTML for pages, and so on). You might then create a script that runs the SilverCmd PublishFromFile command to put them on the target server.
SilverCmd PublishToFile server[:port] database [item] [options]
|
Argument |
Description |
|---|---|
Specifies the name of the target SilverStream server and the design-time port | |
Compiles and deploys the EJB components that have changed since the last full deployment.
As with DeployEJB, the EJBs can be authored using SilverStream tools or can be authored using external tools. The source files can already reside on the SilverStream server or can reside on disk.
QuickDeployEJB performs these tasks:
Searches the EJB JAR for those classes that have been modified since the last full deployment and determines if they are a home or remote interface of any bean in the EJB JAR.
If there are modified class files:
If the modified classes are not the home or remote interfaces for any of the EJB components, QuickDeployEJB adds the updated classes to the EJB deployed object
If the modified classes are the home or remote interfaces for any of the EJB components, QuickDeployEJB runs RMIC on the modified classes and adds the classes to the deployed object and the generated stubs to the remote JAR
This command is particularly useful during the development phase when you are making small iterative changes to your EJBs. If your changes include deleting or renaming existing classes, you must do a full deployment using DeployEJB or the Deployment Plan Designer.
If you change the deployment plan, you cannot use QuickDeployEJB until you have completed a full deploy using the Deployment Plan Designer or SilverCmd DeployEJB.
SilverCmd QuickDeployEJB server[:port] database deploymentPlan [-j ejbJar] [-d ejbDeployedName] [-r ejbRemoteJar] [-R remoteJarPath] [-s (JSDFile|rootDirectory)] [-U user] [-P password] [-?]
Options The valid options are:
|
Option |
Description |
|---|---|
Specifies the name of the JAR containing the EJBs to deploy. If this argument is not specified on the command line, it must be specified in the deployment plan file. Values specified at the command line override input file settings. This file can reside on the file system or the database. QuickDeployEJB first checks to see if a file of the given name exists locally, then it checks the specified server and database for the JAR. | |
Specifies the name for the deployed object created by the command. If this argument is not specified at the command line, it must be specified in the deployment plan using the <deployedObject> tag. Values specified at the command line override input file settings. | |
Specifies the name for the remote JAR created by the command. If this argument is not specified at the command line, it must be specified in the deployment plan file. Values specified at the command line override input file settings. | |
Creates a copy in the of the generated remote JAR in the directory path given. It will have the same name as the remote JAR generated on the server. | |
Specifies the JAR Source Descriptor file or the root directory containing the source files listed in the EJB JAR file. The JAR Source Descriptor file maps the files on the local file system to their location in the EJB JAR file. The rootDirectory is a local root directory that represents the root of the sources in the EJB JAR file. When -s is not specified, it is assumed that the EJB JAR and its sources are on the server.
| |
JAR Source Descriptor (JSD) files are used to map the location of a file on disk to a resource in an EJB archive or a WAR. The SilverCmd QuickDeployXXX commands use this file.
JSD file format The JSD file format is a two column list where:
RootDir=directoryPath localFilePath resourcePath localFilePath resourcePath localFilePath resourcePath ...
The RootDir=directoryPath directive is optional. It can appear only once at the top of the JSD file.
The directoryPath argument is the root directory to use if the localFilePath arguments are relative instead of absolute.
If the names are relative, then they are interpreted to be relative to this directory. If no RootDir argument is specified then relative file names are assumed to be relative to the current directory.
You should specify the localFilePath using the / path separator.
NOTE You can use the local system's syntax; however, SilverStream recommends against this to ensure portability.
You must specify the resourcePath as it is in the archive. It must always us the / file separator.
To specify a comment line, use the # character. All characters up to the end of the line are ignored.
You can specify an optional recursion marker (**) followed by a wildcard pattern to match file names.
The pattern can contain * to match any number of any characters.
When wildcards are used in the localFilePath, the resourcePath is treated as a directory and the resource is given the same base name as was matched in the local file system. For example if you had the following directory structure:
com myco package1 foo.java foo.class image1.gif package2 foo2.java foo2.class
You might have the following line in your JSD file:
/com/myco/package1/*.* com/myco/package1
In this case, the archive would end up with:
com/myco/package1/foo.java com/myco/package1/foo.class com/myco/package1/image1.gif
To match all directories under a root, use the recursion marker ** as in:
/com/myco/**/*.class com/myco
In this case the archive would contain:
com/myco/package1/foo.class com/myco/package2/foo2.class
The pattern can be a logical expression containing & for logical AND, | for logical OR, ! or logical NOT and parentheses for grouping. Matches are not case sensitive. For example, to include all classes or images in package1 you could specify:
/com/myco/package1/*.class|*.gif
Another way might be:
/com/myco/package1/!*.java
which would match everything that was not a Java source file.
Example files Here is an example of a JSD file for a WAR:
# test.war's Jar Source Descriptor file # Root directory for relative names in left hand column RootDir=/j2ee/wars/testwar # Local file Jar resource # ---------- ------------ META-INF/MANIFEST.MF /META-INF/MANIFEST.MF WARTest1/**/* /WARTest1 WEB-INF/web.xml /WEB-INF/web.xml WEB-INF/classes/**/*.class /WEB-INF/classes WEB-INF/lib/*.jar|*.zip /WEB-INF/lib
Compiles theJSP's implementation class and deploys the classes that have changed since the last full deployment. This command is particularly useful when you are making small iterative changes to your code.
QuickDeployWAR performs these steps:
Searches the source files for the application to find JSPs that have been modified
Deploys JARs that contain the changes made and prepends them to the classpath used by the server
When you run the QuickDeployWAR utility, you need to specify the location of all source files for your Web application so that QuickDeployWAR can check for changes. You do this using the -s option and by specifying one of the following:
A root directory on the local file system that represents the root of the sources in the WAR file
The name of a JAR Source Descriptor (JSD) file that maps the files on the local file system to their location in the WAR file
For more information on writing JSD files, see
Understanding JAR Source Descriptor files.
SilverCmd QuickDeployWAR server[:port] database [WARFile] -f deploymentPlan -s JSDFile|rootDirectory [options]
|
Argument |
Description |
|---|---|
The name of the server where the original WAR file was deployed. | |
The name of the database where the original WAR file was deployed. | |
The name of the XML-based file containing the JSP's deployment information. | |
The Jar Source Descriptor file that maps the files on the local file system to their location in the WAR file. A local root directory that represents the root of the sources in the WAR file.
|
Options The valid options are:
|
Option |
Description |
|---|---|
Ignore JSP compile errors and deploy whatever compiles successfully. |
Rebuilds SilverStream-generated JAR files.
You might use RebuildJAR when certain components of your application that are part of a JAR have changed or when you want to insert new packages or business objects into your JAR. For example, you might have changed a GIF or added a new package as a subpackage. The RebuildJAR operation discards the old items and inserts the new ones. You might think of RebuildJAR as "edit existing JAR and save changes".
You cannot use RebuildJar to add or remove objects from the JAR. RebuildJAR takes the most recent versions of the objects that exist in the current JAR. This means that for specific items, such as Forms/form1 or Views/view1, the newer versions of these items (if any) replace the existing ones. For directories, such as Forms, Views and so on, only the items that were in those directories at the time of the JAR's creation will be reinserted. This is not so for packages, whose contents are dynamically regenerated each time you rebuild. For example, if the user adds any new classes to a package, they will get inserted into the JAR, older versions of existing classes substituted for newer ones, and any deletions reflected in warning messages.
Restrictions You cannot rebuild JAR files created outside the SilverStream IDE.
SilverCmd RebuildJAR server[:port] database jarfile [options]
|
Argument |
Definition |
|---|---|
Specifies the name of the source SilverStream server and the design-time port | |
RebuildJar supports the following options:
|
Options |
Description |
|---|---|
Removes the database from the server's list of accessible databases.
NOTE If you have configured separate ports, you will need to specify the administration port when running RemoveDatabase.
SilverCmd RemoveDatabase server[:port] database [options]
|
Argument |
Definition |
|---|---|
Specifies the name of the source SilverStream server and the administration port | |
|
Option |
Definition |
|---|---|
Manages the server's state. Use it to shut down a server or test whether the server is currently running. For example, you can use this from an installation script.
NOTE ServerState can be run on any (runtime, design-time, or administration) port with the isrunning action, if you have configured separate ports. If you run ServerState with the shutdown action, you must specify the administration port.
SilverCmd ServerState server[:port] action [options]
|
Option |
Definition |
|---|---|
Sets the default URL for a server or database.
For more information about default URLs, see the chapter on the Main Designer in the Tools Guide of the server's Classic Development Help.
SilverCmd SetDefaultURL server[:port] [database] [options]
Setting server-default URLs When setting a server-default URL, do not specify a database name as an argument, and specify an URL using a server-relative URL.
For example, the following command sets a server-default URL for the server myServer:
SilverCmd SetDefaultURL myServer -e /MyDatabase/SilverStream/Pages/pgHome.html
Setting database-default URLs When setting a database-default URL, specify the database name as an argument, and use a database-relative URL.
For example, the following command sets a database-default URL for the database myDatabase on the server myServer:
SilverCmd SetDefaultURL myServer myDatabase -e /SilverStream/Pages/pgHome.html
Sets Read, Write, Protect, Select, and Execute security permissions on the SilverStream server, a database, a directory, or one or more objects. Certain permission types are applicable only for certain types of items. For example, the Select permission is only applicable to tables.
You can also set permissions on the Security directory of a server. The Read permission on this resource rules who can have access to user and group information such as lists of users and groups and user/group properties. The Protect permission rules who can set the permissions on the Security directory.
NOTE If you have configured separate ports, you will need to specify the administration port when running SetSecurity.
SilverCmd SetSecurity server[:port] [database] -f file [options]
|
Option |
Definition |
|---|---|
Specifies user name and password for SilverStream authentication | |
Creates and deletes SilverStream users and groups, adds users to groups, sets properties for both.
NOTE If you have configured separate ports, you will need to specify the administration port when running SetUserGroupInfo to change settings.
SilverCmd SetUserGroupInfo server[:port] [action action-parameters] [options]
|
Argument |
Description |
|---|---|
Specifies the name of the SilverStream server and the administration port | |
Specifies the action to perform--for example, CreateUser or DeleteUser | |
The SetUserGroupInfo options are:
|
Option |
Description |
|---|---|
Specifies the name of a file containing data for the SetUserGroupInfo command | |
The SetUserGroupInfo actions are:
|
Action |
Description |
|---|---|
Deletes a SilverStream user from the specified SilverStream group | |
Adds an existing user from a known security realm (for example, NT) to an existing SilverStream security group.
SilverCmd SetUserGroupInfo server[:port] AddUserToGroup "username" "groupname" [options]
|
Action-parameter |
Description |
|---|---|
Specifies the name of the user to add. The name must be in a valid login format
| |
Specifies the name of the SilverStream group to which you want to add the user |
This example shows how to adds the NT user admin to the SilverStream group Admins.
SilverCmd SetUserGroupInfo localhost AddUserToGroup ntDomain1\admin Admins
This example shows how to add the NT user admin to the SilverStream group "Our NT Administrators".
SilverCmd SetUserGroupInfo localhost AddUserToGroup ntDomain1\admin "Our NT Administrators"
Creates a SilverStream security group for the specified server.
SilverCmd SetUserGroupInfo server[:port] CreateGroup -g "groupname" [-d "description"]
|
Argument |
Description |
|---|---|
Specifies a description for the group. This value is optional. If the description includes spaces, it must be enclosed in quotes. |
The following examples show how to create three different SilverStream groups: one called Developers, one called Our Administrators, and one called Finance.
SilverCmd SetUserGroupInfo localhost CreateGroup -g "Developers" - d "Research and Development Group" SilverCmd SetUserGroupInfo localhost CreateGroup -g "Our Administrators" -d "Our Admins" -l SilverCmd SetUserGroupInfo http://myserver CreateGroup -g "Finance"
Creates a SilverStream user by specifying a user name/password or a certificate user.
SilverCmd SetUserGroupInfo server[:port] CreateUser -u "username" [-p "password"] [-n "full name"] [-d "description"]
SilverCmd SetUserGroupInfo server[:port] CreateUser -c client-certificate-file
This example shows how to create a new user.
SilverCmd SetUserGroupInfo http://myserver CreateUser -u "user1" - p "password" -n "John Brown" -d "Applications Developer" SilverCmd SetUserGroupInfo localhost CreateUser -u "user1" -n "John Brown" SilverCmd SetUserGroupInfo localhost CreateUser -u "user1"
This example shows how to create a certificate user, given a client certificate file.
SilverCmd SetUserGroupInfo localhost CreateUser -c c:\certs\ClientCert1.cer
SilverCmd SetUserGroupInfo server[:port] DeleteGroup "groupname"
|
Argument |
Description |
|---|---|
SilverCmd SetUserGroupInfo localhost DeleteGroup "TestGroup"
SilverCmd SetUserGroupInfo server[:port] DeleteUser "username"
|
Argument |
Description |
|---|---|
SilverCmd SetUserGroupInfo http://myserver DeleteUser "testUser1"
SilverCmd SetUserGroupInfo localhost DeleteUser "CERT\\Jack Brown, DigitalID Class 1 - Microsoft Full Service, VeriSign, Inc. (28f52c889e8d6d8cf21d932d9b71z705)"
You must specify the complete distinguished name of the certificate user.
The constant CERT\\ must be prepended to the distinguished name in order to disambiguate it. CERT means Certificate Security Realm.
The \\ signifies a security authority that is not present in this case.
With NT, for example, the name would look something like this:
NT\domainname\user1
With Certificate Security Realm, no authorities are specified.
You can specify the default security realm (via the SMC or by setting the AgiAdmServer.PROP_DEFAULT_SECURITY_REALM property on the server object). If you set the default to "Certificate Security Realm" (for example, by setting the property value to "CERT"), then there would be no need for the "CERT\\" part because it would be assumed by default.
Deletes a user from a SilverStream group.
SilverCmd SetUserGroupInfo server[:port] DeleteUserFromGroup "username" "groupname"
|
Argument |
Description |
|---|---|
Specifies the name of the SilverStream group from which to delete the user |
SilverCmd SetUserGroupInfo localhost DeleteUserFromGroup ntDomain1\admin Admins
Sets properties for a SilverStream group. Any properties that are not specified retain their original values.
SilverCmd SetUserGroupInfo server[:port] SetGroupProperties -g "groupname" [-d "description" -l "is locksmith"]
SilverCmd SetUserGroupInfo myserver SetGroupProperties -g testGroup -d "This is a test group" SilverCmd SetUserGroupInfo myserver SetGroupProperties -g "Our Administrators" -l false
Modifies properties for a SilverStream or certificate user. Values not specified are not modified.
SilverCmd SetUserGroupInfo server[:port] SetUserProperties -u "username" -p "password" -n "full name" [-d "description"] [-l "is locksmith"]
SilverCmd SetUserGroupInfo server[:port] SetUserProperties -c "certificate-file" [-l "is locksmith"]
SilverCmd SetUserGroupInfo localhost SetUserProperties -u "jsmith" -p "new password" -l false SilverCmd SetUserGroupInfo localhost SetUserProperties -u "jsmith" -n "Jonathan H. Smith" SilverCmd SetUserGroupInfo localhost SetUserProperties -u "jsmith" -d "Principal Engineer" -p "new pwd"
Performs source control tasks.
Before you can run the SourceControl command, you must have one of the SilverStream supported source control software packages installed and your SilverStream application database set up to use it. You cannot set up a database for source control using the SourceControl command line tool. For setup information, see the chapter on source control in the Tools Guide of the server's Classic Development Help.
SilverCmd SourceControl server[:port] database action [item] [options]
You can customize the source control operation (Get, Checkin, and so on) using the options described in the following table.
The following example illustrates how to check in a form called frmCasting:
SilverCmd SourceControl Checkin -c "updated code in FormActivate event"localhost MyApp Forms/frmCasting
Validates the deployment descriptor within the specified EAR file. It reports any deployment descriptor problems, missing application assembly components, and class-related problems. The problems are written to the command window by default.
Use this command when you want to verify that the descriptor is correct before attempting to deploy the enterprise archive on the SilverStream Server with DeployEAR.
SilverCmd ValidateEAR earfile [options]
|
Argument |
Description |
|---|---|
|
Option |
Description |
|---|---|
Validates the deployment descriptor within the specified EJB JAR file. It reports any deployment descriptor problems, missing application assembly components, and class-related problems. The problems are written to the command window by default.
You might want to use this command if you are building your own EJB JAR and its descriptor outside the SilverStream IDE and want to verify that the descriptor is correct before importing the JAR to the SilverStream server.
SilverCmd ValidateEJB ejbJarFile [options]
|
Argument |
Description |
|---|---|
|
Option |
Description |
If -c, -t, -n, or -w is not specified, the default maximum for the given type of error is used.
If a numeric value is specified for the switch, SilverStream allows up to that many errors of the given type per bean and stops validating the bean when the limit is reached. If the string value of all is specified for the switch, the SilverStream will register all errors of the given type.
|
Facilities Guide |
Copyright © 2001, SilverStream Software, Inc. All rights reserved.