• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Spring Batch vs Java Executor f/w

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi - I have been trying to understand the difference between spring batch to perform multiple tasks Vs Executor f/w, which can fire parallel threads from a configured pool.
Can any one share your experiences stating the differences.

Thanks,
 
Ranch Hand
Posts: 624
9
BSD Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Both are different things altogether and should not be compared.
I will try to put them as simply as possible.

Executor framework comes under concurrency.
Multiple threads can be created in Java to do things parallely.
Executor framework was developed to take care of thread management. So keeping thread creation and management away from the application.

Spring batch is a framework to run multiple jobs/tasks which may be parallel/series without manual intervention.
Concurrency can be achieved in Spring batch, but it is developed to handle much more things.

You can go through the introduction of spring batch here
 
krishna atok
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Tapas for quicker turn up. I have some confusion initially with spring batch, as it can spawn multiple threads for concurrency as part of it's job/task.
I have a use case where I am using spring batch for user migration, where i configured batch in such a way i am spawning 10 parallel threads for quicker user migration.
Where as with executor framework, all time i need any where multi threading test for my code, I will use EX f/w for multi and parallel threading test.
That's the origin of my confusion. If you can confinely clear my above question that really help's and clear my confusion.

Thanks,
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have requirement to read some data from a file and do a some task on each row of data . please help me identify better approch. Spring batch or executor?
reply
    Bookmark Topic Watch Topic
  • New Topic