Starting a Server Job
When creating Non-Visual Server Side applications the Preview mode allows you to run the class as a Job in the Enterprise Server. So start this job you use the Start Job tab.
Starting your Job
The available options for starting the job on the Enterprise Server are as follows:
- Job Name - Enter the name of the job as it will be known in the Enterprise Server. By default the name of your application is used. We recommend using this as it makes it easier for you to track your job. This is not necessarily the final name you will use for this job. It's just for this duration of this test run.
- Class to run - This is the name of the class that was just compiled. You will notice that the class name begins with 'Prelim'. The reason is the same as why we use Prelim for previewing client side applications. Once the Enterprise server has loaded the byte codes for a class it will not load them again when a new instance is required even if the class has been recompiled. If we used the actual application name then changes would not be reflected in subsequent runs. The Prelim classes are automatically cleaned up by the Enterprise Server when they are no longer required.
- Constructor - In the case where you class has more than one constructor for creating an instance choose the one you require. All Server Session and Server Entity modules have the (JDPSubsystemMgr,JDPJob) constructor by default. The Enterprise Server recognizes these parameters and will automatically substitute the handle to the Enterprise Server and the handle to the Job container respectively. In most cases you will only have one constructor and there will be no need to change it.
- Parameters - choose the matching parameter values for the selected constructor. For JDPSubsystemMgr and JDPJob there is no need to replace them with another value as the Enterprise Server recognizes them and will automatically substitute the handle to the Enterprise Server and the Job container respectively. If your constructor also has say a String as a parameter then just enter the string in the appropriate position of the parameter list. There is no need to quote the string. Parameters are separated by commas. Likewise an int would be simply placed in the parameter list in its correct position. This feature allows you to pass other values into your class when starting it.
- Job Queue - choose the Job Queue that your job will be submitted to. By default the queue is set to QIMMED. This means that the job will start immediately in subsystem SIMMED regardless of how many other jobs are in the system unless of course QIMMED is held. For more information see Job Queues.
- Hold on queue - choose whether you want to hold this job on the queue instead of having it run immediately. You may wish to do this if there is something else you want to check on before your test job runs in which case you can then go to the Check Job Queues tab and release it.
- Start Job - press this button when you are ready to submit your job to the Enterprise Server. It will then be queued and subsequently run when a space is available in the subsystem that the job queue is feeding.
Locating your job once it has been submitted
- Locate Job - press this button to have the Server Job Preview automatically locate the job. If it is on a queue the Check Job Queue tab will be selected and your job will be highlighted. If it is running the Check Subsystems tab will be selected and your job will be highlighted. If it has finished the Check Job Log tab will be selected and your job will be located and loaded into the Job Log Inquiry Screen.