Jump to content

Shutdown Standalone server - the proper way ?


Fred Montier

Recommended Posts

Hi there
1- Make a better context menu to StandAlone with more resources. I've done that.
2- Simple shutdown as it is done in the project model for standalone.

Can't figure it out !

I know that writing  ExitProcess(0);  at any internal form can do that but I want to put in the VCL control using the standalone, hence, the problem. Is not to the user terminate but for me in the development process the same way is done in Intraweb StandAlone that is very useful like the image below.


 

LIV-1-cap-11.jpg.0b2a777a63d8605968b0b55006d6425b.jpg

  • Like 1
Link to comment
Share on other sites

I know I can terminate with ExitProcess(0);  in the mainform.

I just want to have the same resource of right-click shutdown a standalone at the traybar via pop-up menu.

Ist just to termine, the standalone in a local host the same way you guy termine in the project StandLone model. But could not find the proper way.

So, how is a standalone is terminated via the popmenu option ? What command or configuration ?

http://localhost:8077/action=terminate  wont´t work either.

Link to comment
Share on other sites

  • 1 month later...

Are you sure this works ?

 

On 6/17/2021 at 6:00 AM, estrify said:

Hello, I don't know if this can help you: I use


UniServerInstance.TerminateStandAlone();

Always called from ServerModule.

One question: Do you hack the existing tryicon to include your options or create a completely new one?

And yes: remove and create a complete tryicon using vcl native component.

Link to comment
Share on other sites

Sorry if I didn't understand you correctly. Usually I shutdown the server via the tryicon "Shutdown" option. Other stop procedures are only reserved for errors during the startup of the server.

Keeping this in mind, "UniServerInstance.TerminateStandAlone()" works to get out securily of server startup errors (address/port in use, configuration errors, etc.) inside "UniGUIServerModuleException" and "UniGUIServerModuleServerStartup" procedures. I believe that "Halt" or "ExitProcess" are abnormal exit procedures, so they should be used with care.

To stop the server via command, in fact "ExitProcedure" is what I do but just in case making sure to previously close all sessions and all backend threads that were active on the server. Due to those threads, if you have them, make sure none of them are still running before "ExitProcedure".

 

One question: how do you remove UniGUI's tryicon?

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...