Salesforce

Command Line Requester (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Command Line Requester (Magic xpa 3.x)

The Command Line Requester (MGrqcmdl and MGxpaGSRequester) is a requester management program that allows for:

  • Executing remote Magic xpa services

  • Managing the Magic Request Broker (MRB) or Space middlewares and the Magic xpa Runtime engines (to start and stop the MRB or Magic xpa Runtime engines)

  • Querying the Magic Request Broker regarding the status of specific requests that were issued to Magic xpa Runtime Engines

  • Querying the Magic Request Broker regarding the status of the Magic xpa Runtime engines

Magic xpa has two command line requesters:

  • MGrqcmdl.exe – This command line requester is for the Magic Request Broker. The Command Line requester uses the mgreq.ini file located next to it to determine the address of the Magic Request Broker to which it communicates.

  • MgxpaGSRequester.jar – A command line requester for the Space middleware. Since version: 3.0

For the GigaSpaces command line requester it is necessary to specify the Mgreq.ini file explicitly, in one of the following ways:

  • By specifying the '-ini' convention described below.

  • Using a System property: -Dcom.magicsoftware.xpa.requester.conf=

Communicating with the space can be done by executing the MgxpaGSRequester.jar file. You do this by running the following batch file:

<installation folder>\GigaSpaces-xpa\bin\CommandLine.bat

Note that you can directly start the CommandLine.bat file with command line arguments without specifying a path, for example: CommandLine.bat -app=MyApp -prgname=p1

Execution parameters

For the Mgrqcmld.exe, the full syntax tree for using the Command Line requester is listed below and can also be viewed by using the MGRQCMDL command without parameters (the first 3 characters are sufficient to identify each token).

Parameter

Description

Supported Middleware

-APPNAME

Application name

Broker and GigaSpaces

-PRGNAME

Program name

Broker and GigaSpaces

[ -ARGUMENTS ]

Program arguments, separated by commas

Broker and GigaSpaces

[ -VARIABLES]

Named variables, separated by commas

Broker and GigaSpaces

[ -PRIORITY ]

Priority of execution (0 - 9)

Broker

[ -USERNAME ]

Username required by the application

Broker and GigaSpaces

[ -PASSWORD ]

Password required by the application or by the broker

Broker and GigaSpaces

[ -FILENAME ]

Name of a file to contain the request results

Broker and GigaSpaces

[ -NOWAIT ]

Asynchronous request mode

Broker and GigaSpaces

[ -HOST, -PORT ]

Broker's address

Broker

[ -INI ]

Full path for the Mgreq.ini file, which can be used to define an alternate file with the connectivity information to the space

GigaSpaces

Data types

-A

alphanumeric

-B

BLOB

-D

double

-F

float

-L

logical (True/False)

-N

integer

-U

NULL

Management parameters

The management parameters below are only relevant when working with the broker.

-QUERY

Query results -

RT

[(appname)] Registered Enterprise Servers. To view the Magic xpa engines that are available for service to the MRB, use the command:mgrqcmdl -query=rt

APP

[(host/port)] Applications supported by Enterprise Server. To view the Magic xpa applications that are available for service to the MRB, use the command: mgrqcmdl -query=app

CTXS

(host/port) Context supported by Enterprise Server

QUEUE
(or QUE)

[(appname)] Requests in queue

LOG

[(appname)] [=reqid[-reqid]] Historic information

LOAD

[(appname)] Statistics about application or the broker

PENDING

=<reqid> : Number of requests pending before the request

-REQID

=<reqid> : Request manipulation (priority, removal)

-CLEAR

Removing a request from the queue

-EXE

=<ExeEntry>[/<args>] Activating an executable by the broker. To load an additional Magic xpa engine, use the command: mgrqcmdl -exe=AppName

Where AppName is the name of an entry in the [APPLICATIONS LIST] section of the mgrb.ini file.

Note: When using the command line, the application will only be loaded once, even if the mgrb.ini entry referred to here is set to load more than once.

-TERMINATE
(or -TER)

Termination requests. When the engine is instructed to terminate, it terminates gracefully, which means it does not open any new contexts in the terminating engine. Requests for a new context are directed to other available engines. If another engine cannot be found, the request is rejected. The terminating engine continues to process existing contexts, and will terminate after the last context is properly closed or after the set timeout has passed.

When the timeout value equals zero, the server engine waits indefinitely to terminate. The timeout default value is zero.

ALL

All Enterprise Servers, including the broker

RTS

All Enterprise Servers, but not the broker

host/port

A specific Enterprise Server

TIMEOUT

Terminate the engine within this time period (seconds). To stop any Magic xpa engine, use the command: mgrqcmdl - terminate=EngineId - timeout

where EngineId is the engine’s host and port number.

When the engine is instructed to terminate, it terminates gracefully without any new contexts being opened in the terminating engine. Requests for a new context are directed to other available engines. If another engine cannot be found, the request is rejected. The terminating engine continues to process existing contexts, and will terminate after the last context is properly closed or after the set timeout has passed.

When the timeout value equals zero, the server engine waits indefinitely to terminate. The timeout default value is zero.

For example, you can use the following commands:

  • mgrqcmdl -query=rt – To view the Magic xpa engines that are available for service to the Magic Request Broker

  • mgrqcmdl -query=app – To view the Magic xpa applications that are available for service to the Magic Request Broker. If the Magic Request Broker is not running, the following error message is issued:

Command Line Requester: Connection to broker refused (error -102)

  • mgrqcmdl -exe=AppName – To load an additional Magic xpa engine, where AppName is the name of an entry in the [APPLICATIONS LIST] section of the Mgrb.ini file.

  • mgrqcmdl - terminate=EngineId - timeout – To terminate any Magic xpa engine, whose engine identifier is the engine’s host and port number.

  • mgrqcmdl -INI="C:\MGREQ.INI" – To get the connectivity information to the space from another file.

Reference
Attachment 
Attachment