Starting a Server App without restarting the RAP (on a deplo

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Starting a Server App without restarting the RAP (on a deplo

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:35 pm

by allistar >> Fri, 7 May 2004 0:34:20 GMT

Create a workspace that creates a large String that is a serverExecution method (with the appropriate code to start the server app) and then execute that method as a transient method, like this:

vars
transientMethod: JadeMethod;
compiler: JadeCompiler;
source: String;
pos, error, len: Integer;begin

source := "transientMethod() serverExecution;" & CrLf;
source := source & "begin" & CrLf;
source := source & "//code to start server app" & CrLf;
source := source & end;" & CrLf;
transientMethod := process.createTransientMethod("transientMethod", Application, currentSchema, source, false, null, error, pos, len);
if (error <> 0) then
write "Oops, something is wrong";
return;
endif;
process.executeTransientMethod(transientMethod, app);
epilog
delete transientMethod;
end;

This will execute the transient method you have just made.

(There are so many uses for transient methods, especially when it comes to optimising searches etc.)

Regards,
Allistar.

P.S. I have only typed this in by hand, not actually tested it.
--
------------------------------------------------------------------
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 ------------------------------------------------------------------

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Starting a Server App without restarting the RAP (on a deplo

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:35 pm

by Trailing Drones >> Sun, 9 May 2004 20:26:33 GMT

I had the same idea Allistar, but I did test it and it doesn't work. Unfortunately the transient method might be compiled as serverExecution, but the transient only exists in your process. You get an exception.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 31 guests