Run console.

Type: 'appRestart firstSampleApplication' - as follow:

type command:appRestart firstSampleApplication

Console will ask You to confirm operation:

command that you choose is potentially unsafe you must confirm (y or n)

type 'y'

After that You should see firstSampleApplication on new secondary ports and information that the secondSampleApplication was no restarted:

restart application summary:

running application:firstSampleApplication

current settings:
service port:    18089
command port:    19099
process id  :    8828

previous settings (before restart):
service port:    18088
command port:    19088
process id  :    7860

running application:secondSampleApplication

current settings:
service port:    20078
command port:    21078
process id  :    3020

running application:secondSampleApplication was no restarted

If You execute once again appRestart command - application will back to primary port as follow:

type command:appRestart firstSampleApplication

and You should see this:

restart application summary:

running application:firstSampleApplication

current settings:
service port:    18088
command port:    19088
process id  :    3884

previous settings (before restart):
service port:    18089
command port:    19099
process id  :    8828

running application:secondSampleApplication

current settings:
service port:    20078
command port:    21078
process id  :    3020

running application:secondSampleApplication was no restarted

If You want always back to primary port (for reason monitoring systems that checking state configured ports) type command with '&twice' argument as below:

type command:appRestart firstSampleApplication &twice

Console will restart proper application (or all if You not type application name) twice.
Console shows current restart command index - You should see two messages

current counter:1 executing command appRestart twice with value:'firstSampleApplication '

current counter:2 executing command appRestart twice with value:'firstSampleApplication '

After that You should see firstApplication on primary ports:

restart application summary:

running application:firstSampleApplication

current settings:
service port:    18088
command port:    19088
process id  :    6884

previous settings (before restart):
service port:    18089
command port:    19099
process id  :    9156

running application:secondSampleApplication

current settings:
service port:    20078
command port:    21078
process id  :    3020

running application:secondSampleApplication was no restarted

Remember: during on all restart operation every requests will be serviced, no request will lost!

If You want stop application with service started all requests type appStop command as below:

type command:appStop firstSampleApplication

server will be wait to execute all started request configured time in global configuration file

jLupinFirstSampleApplication.setWaitForProcessDestroyResponseTime(65000);

You should see message as below:

[2015-01-26 16:54:39]
stop application by names...
[2015-01-26 16:54:39]
try stop application:firstSampleApplication with settings:
service port:       18088
command port:       19088
process id:         6884
[2015-01-26 16:54:39]
try send stop command to application:firstSampleApplication on command port:19088
[2015-01-26 16:54:39]
time remaining to finish operation:stop on application:firstSampleApplication=65 seconds (65000 milliseconds)
[2015-01-26 16:54:41]
application:firstSampleApplication received stop command correctly
[2015-01-26 16:54:41]
application:firstSampleApplication linked to process id:6884 was destroyed
[2015-01-26 16:54:41]
stop application by names succeeded

If You want stop force application without service started requests type appStopForce command as below:

type command:appStopForce firstSampleApplication

You should see message as below:

[2015-01-26 17:02:55]
stop force application by names...
[2015-01-26 17:02:55]
stop force application by names succeeded

To start concrete application type (firstSampleApplication for example):

type command:appStart firstSampleApplication

To start every not started application just type appStart command without arguments

type command:appStart