Skip to main content
Skip table of contents

Connection-level Interface Commands

This page lists command-line interface commands in alphabetical order and their descriptions, examples, and example outputs.

To view the full table, click the expand button in its top right corner

Command

Description

Examples

Example output

COMMA

Writes a comma plus a space to the buffer

comma;

,

ENABLE DS

Writes a DS command end to the buffer and adds the buffer as a new line to the output script, then adds a DS enable command to the output script

enable ds;

)
/subsystem=datasources/data-source=<name>:enable

ENABLE RA

Adds an RA activate command to the output script

enable ra;

/subsystem=resource-adapters/resource-adapter=<name>:activate

EXEC

Adds a given text as a new line to the output CLI script

exec "/some/command"; 

EXEC BUFFER

Adds the text the buffer contains as a new line to the output CLI script

exec buffer;

FAIL

Fails template parsing with a specified message. May be needed for complex property checks like

CODE
ifset (prop1)
	writeprop prop1;
else ifset (prop2)
	writeprop prop2;
else
	fail "You should specify either prop1 or prop2";

fail "Wrong way";

IFSET

Executes an if statement if a property is specified (or has a not null default value), executes else statement otherwise

ifset (port) writeprop comma, port; else { comma; write "noport"; comma; )

IFTRUE

Executes the if statement if a property is specified (or has a not null default value) and contains the TRUE value, executes the else statement otherwise

iftrue (ssl) write "mm"; else write "mms";

PARAM DS

Writes some predefined DS parameters to the buffer. Acts like a macro for some special cases. See examples

param ds pool strict;
param ds pool size;
param ds pool size "10" "20";
param ds flush;
param ds timeout;
param ds timeout "1000" "20";
param ds driverconf "driver" "driver-class";

, pool-prefill=false, pool-use-strict-min=false
, min-pool-size=2, max-pool-size=70
, min-pool-size=10, max-pool-size=20
, flush-strategy=FailingConnectionOnly
, blocking-timeout-wait-millis=120000, idle-timeout-minutes=5
, blocking-timeout-wait-millis=1000, idle-timeout-minutes=20
, creates 2 implicit properties: driver for driver-name; driver-class for driver class. The default values are specified in the command itself, but may be overridden by user via those properties.

PARAM RA

Adds an RA parameter  to the output script

param ra "param" "pampam";
param ra "password" param1;
param ra param2;

/subsystem=resource-adapters/resource-adapter=<name>/connection-definitions=<name>/config-properties=param:add(value=pampam)
/subsystem=resource-adapters/resource-adapter=<name>/connection-definitions=<name>/config-properties=password:add(value="somevalue")
/subsystem=resource-adapters/resource-adapter=<name>/connection-definitions=<name>/config-properties=param2:add(value=othervalue)

PROPAGATE RA

Adds a special dataSourceName RA parameter containing the RA name

/subsystem=resource-adapters/resource-adapter=<name>/connection-definitions=<name>/config-properties=dataSourceName:add(value=<name>)

REMOVE DS

Adds a DS remove command to the output script

/subsystem=datasources/data-source=<name>:remove

REMOVE RA

Adds an RA remove command to the output script

/subsystem=resource-adapters/resource-adapter=<name>:remove

START DS

Writes a DS command start to the buffer

start ds;

/subsystem=datasources/data-source=<name>:add(jndi-name=java:/<name>, use-java-context=true,

START RA

Adds an RA start line to the output script

start ra "resource-adapter.rar" "class.name"

/subsystem=resource-adapters/resource-adapter=<name>:add(archive=resource-adapter.rar, transaction-support=NoTransaction)
/subsystem=resource-adapters/resource-adapter=<name>/connection-definitions=<name>:add(jndi-name=java:/ <name>, enabled=true, class-name=class.name)

WRITE

Writes to the buffer either a text or a property. A special comma token writes a comma plus a space

write comma, "param=", param;

, param=somevalue

WRITEPROP

Writes to the buffer a property name, an equal sign, and then the property value. For notation convenience, it also can have a text or a comma token as arguments

writeprop comma, param, ";"

, param=somevalue;

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.