• 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
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

how to distribute jobs in a clustered server inside a EJB container

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am new to distributed environment and actually there are two problems

1) We have a webservice in which some operation is executing. if a web method has been called through web services no more web service call should be made. In order to do this, I have used an interceptor using a static final variable so any extra invocation will be rejected, but I think in a clustered environment this won't work. I know one solution is to using database which is shared across the servers but I am eager to know if there is any other solution using the same static field.

2) This is very important for us. We have a webservice method say end-of-day operation, in which a number of records will be processed. Because each record processing is done with a complicated logic and takes long and also the number of records may exceed one thousand we are using a batch processing to execute them concurrently. This has been done using java thread pool.
Now consider in a distributed area how we can manage it so that batch jobs can be distributed as well. Since only one method and only once a webservice is called the application server won't distribute it and the whole process takes place inside the same invoked web method but with several threads. How we can distribute these batch jobs or threads?

Please consider that we are using EJB3 and Glassfish as AS.

Any comment would be of great help and is appreciated
Thanks

 
Mohammad Norouzi
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any idea?!
 
To do a great right, do a little wrong - shakepeare. twisted little ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic