Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » [Neon] Scout Thread management in a Java EE container
[Neon] Scout Thread management in a Java EE container [message #1781263] Mon, 05 February 2018 09:11 Go to next message
Adrian Bärtschi is currently offline Adrian BärtschiFriend
Messages: 6
Registered: April 2017
Junior Member
Hi everyone

Currently I try to understand how Scout creates Threads when running in a Java EE container (Websphere).
In the monitoring system, I see that for every user there are two Websphere threads (one for the frontend and one for the backend I assume).
Now if I create custom Threads via Jobs.schedule(...), I see no additional Webspere threads.
Does this mean that these threads run outside of the Websphere container?

In the Technical Guide, I found this: https://eclipsescout.github.io/6.1/technical-guide.html#extending-job-manager about Java EE threads.
Does that mean if I want Scout to always create Webspere threads, I have to implement my own JobManager?

Many thanks
Adrian
Re: [Neon] Scout Thread management in a Java EE container [message #1781264 is a reply to message #1781263] Mon, 05 February 2018 09:34 Go to previous messageGo to next message
Matthias Villiger is currently offline Matthias VilligerFriend
Messages: 139
Registered: September 2011
Senior Member
Hi Adrian

Scout uses its own thread pool based on a Java ThreadPoolExecutor.
See
org.eclipse.scout.rt.platform.job.internal.JobManager.createExecutor()

This is because Scout does not require a full Java EE container but just a servlet container to run.
If you want to use the WebSphere thread pool instead you have to replace the default job manager as explained in the documentation, yes.
The most interesting methods here are createExecutor() and submit().

Hope this helps
Matthias
Re: [Neon] Scout Thread management in a Java EE container [message #1781352 is a reply to message #1781264] Tue, 06 February 2018 10:33 Go to previous messageGo to next message
Adrian Bärtschi is currently offline Adrian BärtschiFriend
Messages: 6
Registered: April 2017
Junior Member
Hi Matthias

Thanks for the quick reply.
So how many Threads does Scout create, without any custom Scheduled Jobs from the application code?
As I understand, there is a UI thread (per user?) and a Model thread (also per user?).
Is this correct and are there any additional threads running (e.g. Longpolling for Client Notifications, etc.).

I try to understand how many running threads I have to expect (per user) if we change all Scout-threads from the Java ThreadPoolExecuto to the WebSpere pool.

Thanks
Adrian
Re: [Neon] Scout Thread management in a Java EE container [message #1781422 is a reply to message #1781352] Wed, 07 February 2018 08:33 Go to previous message
Matthias Villiger is currently offline Matthias VilligerFriend
Messages: 139
Registered: September 2011
Senior Member
Hi Adrian

This is hard to say. It may be different on client and on server side. And the jobmanager uses a thread pool. So not for every user new own threads are created. A single thread may be re-used by various users as long as there are no parallel requests. So it also depends on how many requests are processed at the same time.
The best way is to measure in a close-to-real-life scenario for your application.

Regards
Mat
Previous Topic:[7.0.300.001] [BUG] ListBox not working in Wizard
Next Topic:[Oxygen] Enabling/Disable Menus when Form is already open
Goto Forum:
  


Current Time: Tue Nov 20 06:03:11 GMT 2018

Powered by FUDForum. Page generated in 0.17426 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top