• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Multi-threading in Spring

 
Ranch Hand
Posts: 37
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone point me to multithreading/ multi-running of programs in java/Spring?

Thanks
 
author & internet detective
Posts: 41502
881
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you elaborate on what you are looking for? Spring doesn't prevent multi-threading. In web apps, it is common for many users to come into the application at once.
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Spring does provide the Task executor abstraction layer that allows you to run tasks in the background. You can configure them to run in threadpool. It also allows you to integrate with quartz which allows you to run your tasks periodically.

What you use, and how you use it depends on what you need to do. If you can elaborate, we can help you point in the right direction.
 
Khuma Chhakchhuak
Ranch Hand
Posts: 37
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

Jayesh's answers partly suffice my needs.

My need being running multiple junit tests on different browser/devices so I want them to run at the same time.

It would be great if you all can elaborate more on how to go about this.

Thanks,

Lalkhum
 
Jayesh A Lalwani
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to provide more details. Is the application being tested built using Spring, or are you planning to leverage Spring to do your testing? Are you concerned how your Spring managed components will behave in a multi threaded test environment? Are you trying to test concurrency, or are your just trying to speed up your testing by parallelizing it?

If all you want to run your tests in parallel, you really don;t need Spring. You just divide up your tests into Suites, and make sure each suite can be tested independently. Then all you do is kick off multiple JUnit tests, one for each suite. Boom, parallelized!
 
reply
    Bookmark Topic Watch Topic
  • New Topic