Re: Struts 2: running processes/threads in background
2016-07-18 16:35 GMT+02:00 Martin Gainty : >> "execAndWait" result should be sufficient for your usecase. I was >> wondering if implementing something based on actors would make sense >> but not sure if this will play nicely with Servlets. > MG>could this be a solution to run struts with a Mock Dispatcher? > > MG>https://en.wikipedia.org/wiki/Proactor_pattern > MG>is there a struts interface which can be used as Initiator?MG>is there a > struts interface which can be used as Asynch Operation Processor? > MG>can we assume Actor AsyncOperation would be any method annotated @Async as > suggested earlier?MG>if so who would manage Spring TaskExecutor..possibly struts-spring-plugin? I thought about using similar approach to execAndWait result but implemented with actors, with some small lib like this http://jumi.fi/actors.html Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
RE: Struts 2: running processes/threads in background
> From: [email protected] > Date: Mon, 18 Jul 2016 07:49:28 +0200 > Subject: Re: Struts 2: running processes/threads in background > To: [email protected] > > Hi, > > "execAndWait" result should be sufficient for your usecase. I was > wondering if implementing something based on actors would make sense > but not sure if this will play nicely with Servlets. MG>could this be a solution to run struts with a Mock Dispatcher? MG>https://en.wikipedia.org/wiki/Proactor_pattern MG>is there a struts interface which can be used as Initiator?MG>is there a struts interface which can be used as Asynch Operation Processor? MG>can we assume Actor AsyncOperation would be any method annotated @Async as suggested earlier?MG>if so who would manage Spring TaskExecutor..possibly struts-spring-plugin? > > > Regards > -- > Łukasz > + 48 606 323 122 http://www.lenart.org.pl/ > > 2016-07-17 22:13 GMT+02:00 Adam Brin : > > Execute and Wait would definitely work. Alternately, if you're using > > Spring in the background you could use their @Async methodology for simple > > multi-threading, and just leave Struts for basic AJAX calls to start and > > check status. > > > > On Sun, Jul 17, 2016 at 8:37 AM, Peter Hilzbrich wrote: > > > >> Hello, > >> I want to use Struts 2 to run my Java business logic in background and > >> AngularJS for the front-end. I need to implement the following scenario: A > >> user can make different configuration for the system to run. After > >> configuration is made, the user clicks "start" and continuously receives > >> new analysis data (e.g. by requesting data every second). To generate the > >> analysis data I have to run some business logic in different threads > >> continuously in background till the user clicks "stop". In my understanding > >> with Struts 2 the front-end is requesting data which the business logic is > >> generating as it is requested. Is there are way to start background > >> processes and let them run long-time? For me, it seems that the > >> ExecuteAndWaitInterceptor isn't the right choice.. > >> > >> Best regards > >> Thomas > >> > >> - > >> To unsubscribe, e-mail: [email protected] > >> For additional commands, e-mail: [email protected] > >> > >> > > > > > > -- > > _ > > Adam Brin > > Director of Technology, Digital Antiquity > > 480.965.1278 > > - > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >
Re: Struts 2: running processes/threads in background
Hi, "execAndWait" result should be sufficient for your usecase. I was wondering if implementing something based on actors would make sense but not sure if this will play nicely with Servlets. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2016-07-17 22:13 GMT+02:00 Adam Brin : > Execute and Wait would definitely work. Alternately, if you're using > Spring in the background you could use their @Async methodology for simple > multi-threading, and just leave Struts for basic AJAX calls to start and > check status. > > On Sun, Jul 17, 2016 at 8:37 AM, Peter Hilzbrich wrote: > >> Hello, >> I want to use Struts 2 to run my Java business logic in background and >> AngularJS for the front-end. I need to implement the following scenario: A >> user can make different configuration for the system to run. After >> configuration is made, the user clicks "start" and continuously receives >> new analysis data (e.g. by requesting data every second). To generate the >> analysis data I have to run some business logic in different threads >> continuously in background till the user clicks "stop". In my understanding >> with Struts 2 the front-end is requesting data which the business logic is >> generating as it is requested. Is there are way to start background >> processes and let them run long-time? For me, it seems that the >> ExecuteAndWaitInterceptor isn't the right choice.. >> >> Best regards >> Thomas >> >> - >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > > -- > _ > Adam Brin > Director of Technology, Digital Antiquity > 480.965.1278 - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: Struts 2: running processes/threads in background
Execute and Wait would definitely work. Alternately, if you're using Spring in the background you could use their @Async methodology for simple multi-threading, and just leave Struts for basic AJAX calls to start and check status. On Sun, Jul 17, 2016 at 8:37 AM, Peter Hilzbrich wrote: > Hello, > I want to use Struts 2 to run my Java business logic in background and > AngularJS for the front-end. I need to implement the following scenario: A > user can make different configuration for the system to run. After > configuration is made, the user clicks "start" and continuously receives > new analysis data (e.g. by requesting data every second). To generate the > analysis data I have to run some business logic in different threads > continuously in background till the user clicks "stop". In my understanding > with Struts 2 the front-end is requesting data which the business logic is > generating as it is requested. Is there are way to start background > processes and let them run long-time? For me, it seems that the > ExecuteAndWaitInterceptor isn't the right choice.. > > Best regards > Thomas > > - > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- _ Adam Brin Director of Technology, Digital Antiquity 480.965.1278
Struts 2: running processes/threads in background
Hello, I want to use Struts 2 to run my Java business logic in background and AngularJS for the front-end. I need to implement the following scenario: A user can make different configuration for the system to run. After configuration is made, the user clicks "start" and continuously receives new analysis data (e.g. by requesting data every second). To generate the analysis data I have to run some business logic in different threads continuously in background till the user clicks "stop". In my understanding with Struts 2 the front-end is requesting data which the business logic is generating as it is requested. Is there are way to start background processes and let them run long-time? For me, it seems that the ExecuteAndWaitInterceptor isn't the right choice.. Best regards Thomas - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

