Page 1 of 2
Starting a Server App without restarting the RAP (on a deplo
Posted: Fri Aug 07, 2009 12:34 pm
by ConvertFromOldNGs
by Glen Richards >> Tue, 4 May 2004 5:23:24 GMT
Hi,
Does anyone know how to start an app as a "server app" without restarting the RAP on a deployed system?
Is there a parameter I can add to the command line on a shortcut that runs the app?
Any help appreciated.
Cheers,
Glen
Encos
Re: Starting a Server App without restarting the RAP (on a deplo
Posted: Fri Aug 07, 2009 12:34 pm
by ConvertFromOldNGs
by Torrie >> Tue, 4 May 2004 7:39:49 GMT
Glen
I don't know of any command line parameter the forces the app to run as a server app but you could try the following.
Create a method that takes a string as a parameter and starts the same application as a server application (by calling a serverExecution method that calls startApplication with the app.name and currentSchema.name as parameters.
Then you can use the command line parameters of jadloadb to run this method, hence starting the app as a server app.
The command for jadloadb running a method are
c:\jade52\bin\jadloadb.exe path=C:\Jade52\Jade_System_Folders\systemTest app=Jade schema=UserSchema executeSchema=UserApp executeClass=Application executeMethod=startServerApp executeParam="Params"
Where executeSchema is the schema that the method to be called is defined (or a sub schema)
The executeClass parameter is the class that the method is defined on (I think Jade creates a transient on which to call the method. Not sure if you use the application class if it uses the current application) executeMethod is the name of the method to call and executeParams is a string that is passed to the method as a parameter.
Re: Starting a Server App without restarting the RAP (on a deplo
Posted: Fri Aug 07, 2009 12:34 pm
by ConvertFromOldNGs
by
allistar >> Tue, 4 May 2004 8:55:54 GMT
You can do this from the development environment so I don't see why it couldn't be done at runtime. The big question is how.
You could always have a special server app that just listens for particular notifications. On reception of the appropriate notification it could start up another application (I am unsure if this new process would be a server application in the sense that it runs inside the jadrap/jadserv node - only one way to find out).
Allistar.
--
------------------------------------------------------------------
Allistar Melville
Software Developer, Analyst
allistar@silvermoon.co.nz
Auckland, NEW ZEALAND
Silvermoon Software
Specialising in JADE development and consulting
Visit us at:
http://www.silvermoon.co.nz
*NEW* Simple web access to Jade at:
www.silvermoon.co.nz/jhp.html ------------------------------------------------------------------
Re: Starting a Server App without restarting the RAP (on a deplo
Posted: Fri Aug 07, 2009 12:34 pm
by ConvertFromOldNGs
by
dcooper@jade.co.nz >> Tue, 4 May 2004 22:49:14 GMT
Allistar's suggestion is a good one and it will start the process inside the RAP node. This is what lots of systems do to start/restart GUI-less (aka background) processes running in any node (including the RAP node).
Dean.
Re: Starting a Server App without restarting the RAP (on a deplo
Posted: Fri Aug 07, 2009 12:34 pm
by ConvertFromOldNGs
by Glen Richards >> Wed, 5 May 2004 2:09:48 GMT
But this will involve using up another process licence just to monitor other processes, will it not?
I'll have a play - thanks for the tips.
Cheers,
Glen
Encos
Re: Starting a Server App without restarting the RAP (on a deplo
Posted: Fri Aug 07, 2009 12:34 pm
by ConvertFromOldNGs
by
dcooper@jade.co.nz >> Wed, 5 May 2004 2:15:07 GMT
Correct. The monitoring process will consume a license.
Dean.
Re: Starting a Server App without restarting the RAP (on a deplo
Posted: Fri Aug 07, 2009 12:35 pm
by ConvertFromOldNGs
by Torrie >> Wed, 5 May 2004 7:51:04 GMT
You can start a new server application simply by calling app.startApplication etc from a method marked as serverExecution. This means that there is no requirement for a listener process on the server, simply to listen for startup requests.
Re: Starting a Server App without restarting the RAP (on a deplo
Posted: Fri Aug 07, 2009 12:35 pm
by ConvertFromOldNGs
by
Jade Support >> Wed, 5 May 2004 21:30:29 GMT
Correct, this is also covered in the "Multithreading JADE Applications - A Primer" white paper, available here...
http://www.jadeworld.com/Jade6/jade6_whitepapers.htm
Under the section, Initiating New Application Processes.
Re: Starting a Server App without restarting the RAP (on a deplo
Posted: Fri Aug 07, 2009 12:35 pm
by ConvertFromOldNGs
by
Glen Richards >> Wed, 5 May 2004 22:58:18 GMT
Again, thanks for the tips - but, unfortunately (unless I've missed something), your suggestions all solve my problem for the long term (ie, after I apply a patch to the client to give me the interface to start the app).
I was hoping for a short term solution
The particular system I'm dealing with is a deployed system - the only external code I can excute on the system is a workspace. Does anyone know of how I can excute a workspace as a serverExecution method? Otherwise, it looks like I'm just going to have to get the client to bump the RAP service.
This won't be a problem for us after our next patch release.
Cheers all,
Glen
Encos
Re: Starting a Server App without restarting the RAP (on a deplo
Posted: Fri Aug 07, 2009 12:35 pm
by ConvertFromOldNGs
by cnwrwm1 >> Thu, 6 May 2004 0:02:06 GMT
You can execute a JadeScript serverExecution.
Richard