Loading and reloading TQL applications during development
Before you can start a new TQL application, you must first create and deploy it (see Managing deployment groups). For example, the following series of console commands creates, deploys, and runs simple.tql
:
W (admin): @Samples/simple.tql; Processing - CREATE APPLICATION simple ... Processing - END APPLICATION simple Elapsed time: 2473 ms W (admin): deploy application simple in default; Processing - deploy application simple in default Elapsed time: 180 m W (admin): start application simple; Processing - start application simple Elapsed time: 73 ms
Before editing the TQL file, stop the application:
W (admin) > stop application simple;
Processing - stop application simple
Elapsed time: 1336 ms
After editing the TQL file, to run the new version of the application, you must:
undeploy and drop the old version
load, deploy, and start the new version
For example, the following series of commands will drop the application loaded by the above commands.
W (admin) > undeploy application simple; Processing - undeploy application simple Elapsed time: 358 ms W (admin) > drop application simple cascade;
Now repeat the @
, DEPLOY
, and START
commands you used the first time you ran the application.
You can automate this by adding the commands to your application:
UNDEPLOY APPLICATION PosApp; DROP APPLICATION PosApp CASCADE; CREATE APPLICATION PosApp; ... END APPLICATION PosApp; DEPLOY APPLICATION PosApp; START APPLICATION PosApp;