Use the create command to create classes of virtual servers, virtual servers, and listen sockets.
Use the options shown in Options with the create command to create classes, listen sockets, virtual servers, and resources.
Table A–4 Create command options
Option |
Value |
---|---|
-c |
Creates a virtual server class. |
-l |
Creates a listen socket. |
-v |
Creates a virtual server. |
-r |
Creates a resource. |
Each of these options in turn has its own parameters, which are shown in the following sections.
Use this option of the create command to create a virtual server class.
HttpServerAdmin create -c -cl classname -docroot document_root [-obj obj.conf_file] [-acptlang accept_language] -d server_root -sinst http_instance
Use the parameters shown in Parameters with the create -c command option to create classes.
Table A–5 Create virtual server class parameter
Parameter |
Value |
---|---|
-cl classname |
The name of the class you want to create. |
-docroot document_root |
The document root for the class. This has to be an absolute path. |
-obj obj.conf_file |
(optional) The obj.conf file for the class. If you do not specify this parameter, the server creates the obj.conf file as classname.obj.conf. If you want a different name for the class’ obj.conf file, specify it here. |
-acptlang accept_language |
(optional) If you do not specify this parameter, acptlang will be off by default. |
HttpServerAdmin create -c -cl myclass1 -docroot /docs -d /export/sun/servers -sinst https-sun.com
Use this option of the create command to create a listen socket.
HttpServerAdmin create -l -ip ip_address -port port_number -sname server_name -id default_virtual_server [-sec security] [-acct number_of_accept_threads] -d server_root -sinst http_instance
Use the parameters shown in Parameters with the create -l command option to create listen sockets.
Table A–6 Create listen socket parameters
Parameter |
Value |
---|---|
-ip ip_address |
The IP address for the listen socket. |
-port port_number |
The port number for the listen socket. |
-sname server_name |
The server name to associate with the listen socket. |
-id default_virtual_server |
The ID of the default virtual server. This virtual server must exist before you can use it to create a listen socket. |
-acct number_of_accept_threads |
(optional) The number of accept threads for the listen socket. |
-sec on |
(optional) If specified, use on to enable security for the listen socket. If not specified, security is not enabled. |
HttpServerAdmin create -l -id ls3 -ip 0.0.0.0 -port 1333 -sname austen -defaultvs vs2 -sec on -acct 4 -d /export/carey/server6 -sinst https-austen.com
Use this option of the create command to create a virtual server.
Please note that if you do not include values for some of the optional parameters, default values are provided. You can always change the default values after the virtual server is created.
HttpServerAdmin create -v -id virtual_server -cl classname -urlh urlhosts [-state state][-docroot document_root] [-mime mime_types_file] [-aclid acl_ID] -d server_root -sinst http_instance
Use the parameters shown in Parameters with the create -v command option to create virtual servers.
Table A–7 Create listen socket parameters
Parameter |
Value |
---|---|
-id virtual_server |
The ID of the virtual server you are creating. |
-cl classname |
The class of which the virtual server will be a member. |
-urlh URL_hosts |
The URL hosts for the virtual server. You can specify more than one URL host, separated by a comma. |
-state state |
(optional) Valid values are on, off, and disable. |
(optional) If you want to specify a document root for a virtual server, use this parameter. You must use an absolute path name. |
|
(optional) The name of the MIME types file for the virtual server. |
|
(optional) The ACL file ID <ACLID> used in the server.xml file |
HttpServerAdmin create -v -id vs3 -cl class1 -urlh annh -d /export/sun/server6 -sinst https-sun.com HttpServerAdmin create -v -id vs4 -cl class1 -urlh annh,annh2 -state off -mime mime.types -d /export/sun/server6 -sinst https-sun.com
Use the create -r command to create a new JDBC connection pool using the Command Line Interface.
HttpServerAdmin -create -r -jdbcconnectionpool -poolname jdbcpoolname -classname classname [-steadypoolsize steadypoolsize] [-maxpoolsize maxpoolsize] [-poolresizequantity poolresizequantity] [-idletimeout idletimeout] [-maxwaittime maxwaittime] [-connectionvalidation true/false] [-connectionvalidationmethod connectionvalidationmethod] [-validationtablename validationtablename] [-failall true/false] [-desc description] [[-property propertyname=value],...]
The following table summarizes all the options that you need to create connection pools with the create -r command option.
Table A–8 Create connection pool parameters
Parameter |
Value |
---|---|
poolname jdbcpoolname |
The pool name for the JDBC connection pool. |
classname classname |
The vendor-specific classname that implements the data source. |
steadypoolsize steadypoolsize |
The minimum number of connections that must be maintained in the pool |
maxpoolsize maxpoolsize |
The maximum number of connections allowed in the pool. |
poolresizequantity poolresizequantity |
The size of the batch by which the pool is resized when the steadypoolsize value is approached. |
idletimeout idletimeout |
The maximum time in seconds that a connection can remain idle in the pool. |
maxwaittime maxwaittime |
The amount of time the caller will wait before getting a connection timeout. |
connectionvalidation true/false |
Specifies whether connections will be validated before they are passed to the application. |
connectionvalidationmethod connectionvalidationmethod |
The methods that can employ to validate database connections. Legal values are auto-commit, meta-data, and table. |
validationtablename validationtablename |
The name of the table if connectionvalidationmethod is set to table. |
failall true/false |
Specifies whether to fail all connections in the pool and re-establish them if a single connection is determined to have failed. |
desc description |
The description of the pool. |
property propertyname=value |
The name-value pairs that specify standard and proprietary JDBC connection pool properties |
HttpServerAdmin create -r -jdbcconnectionpool -poolname testpool -classname "oracle.jdbc.pool.OracleDataSource" -property "URL=jdbc:oracle:thin:@dbhost:1521:ORCL,user=scott,password=tige r" -d /opt/Sun/S1WS6.1 -sinst testinstance
Use the create -r command to create a new JDBC resource using the Command Line Interface.
HttpServerAdmin -create -r -jdbc -jndiname jndiname -poolname poolname [-desc description] [-enabled true/false]
The following table summarizes all the options that you need to create a new JDBC resource with the create -r command option.
Table A–9 Create JDBC resource parameters
Parameter |
Value |
---|---|
jndiname jndiname |
The JNDI name of the resource. |
poolname poolname |
The pool name for the JDBC connection pool. |
desc description |
The description of the pool. |
enabled true/false |
Specifies whether the resource is enabled or disabled. If a JDBC resource is disabled, no application component can connect to it, but its configuration remains in the server instance. |
HttpServerAdmin create -r -jdbc -jndiname "jdbc/testjdbcresource" -poolname testpool -d /opt/Sun/S1WS6.1 -sinst testinstance
Use the create -r command to create a new custom resource using the Command Line Interface.
HttpServerAdmin -create -r -custom -jndiname jndiname -resourcetype resourcetype -factoryclass factoryclassname [-enabled true/false] [-desc description] [[-property propertyname=value],...]
The following table summarizes all the options that you need to create a new JDBC resource with the create -r command option.
Table A–10 Create custom resource parameters
Parameter |
Value |
---|---|
jndiname jndiname |
The JNDI name of the resource. |
resourcetype resourcetype |
The resource type. |
factoryclassname factoryclassname |
The classname of the object factory. |
enabled true/false |
Specifies whether the resource is enabled or disabled. |
desc description |
The description of the pool. |
property propertyname=value |
The name-value pairs that specify the properties of the custom resource. |
HttpServerAdmin create -r -custom -jndiname "testcustomresource" -resourcetype "java.lang.String" -factoryclass "com.mycom.test.StringFactory" -d /opt/Sun/S1WS6.1 -sinst testinstance
Use the create -r command to create a new external JNDI resource using the Command Line Interface.
HttpServerAdmin -create -r -external -jndiname jndiname -jndilookupname jndilookupname -restype restype -factoryclass factoryclass [-enabled true/false] [-desc description] [[-property propertyname=value],...]
The following table summarizes all the options that you need to create a new external JNDI resource with the create -r command option.
Table A–11 Create external JNDI resource parameters
Parameter |
Value |
---|---|
jndiname jndiname |
The JNDI name of the resource. |
jndilookupname jndilookupname |
The JNDI lookup name for the resource. |
restype restype |
The resource type. |
factoryclass factoryclass |
The classname of the object factory. |
enabled true/false |
Specifies whether the resource is enabled or disabled. |
desc description |
The description of the pool. |
property propertyname=value |
The name-value pairs that specify the properties of the custom resource. |
HttpServerAdmin create -r -external -jndiname "testexternalresource" -jndilookupname "rmiconverter" -restype "samples.rmi.simple.ejb.ConverterHome" -factoryclass "com.sun.jndi.cosnaming.CNCtxFactory" -property "java.naming.provider.url=iiop://localhost:3700" -d /opt/Sun/S1WS6.1 -sinst testinstance
Use the create -r command to create a new mail resource using the Command Line Interface.
HttpServerAdmin -create -r -mail -jndiname jndiname -host host -user user -from from [-storeprotocol storeprotocol] [-storeprotocolclass storeprotocolclass] [-transportprotocol transportprotocol] [-transportprotocolclass transportprotocolclass] [-enabled true/false] [-desc description] [[-property propertyname=value]...]
The following table summarizes all the options that you need to create a new mail resource with the create -r command option.
Table A–12 Create mail resource parameters
HttpServerAdmin create -r -mail -jndiname "localmail" -host localhost -user mailid -from mailid@mailhost -d /opt/Sun/S1WS6.1 -sinst testinstance