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 ------------------------------------------------------------------