Results 1 to 4 of 4
  1. #1
    sumukh_death is offline Member
    Join Date
    Sep 2011
    Posts
    6
    Rep Power
    0

    Default Concurrency with web services in a application

    Hello,
    I need some help in designing a standalone application with a

    public static void main. as start point and uses no threads as such to communicate with jax-rpc encoded web services. This application makes many calls to web services before it exists.

    But I am running into trouble to find the best way to ensure that no two calls overlaps. Since most of the methods being written are static methods.

    People may call this executable jar more than once and may also overlap. But in each case integrity of the application should be maintained.

    Any help will be greatly appreciated.

    Libraries used. Axis 1.4, JAXRPC, SAAJ.
    -Su

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,570
    Rep Power
    25

    Default Re: Concurrency with web services in a application

    ensure that no two calls overlaps
    If the methods only use local variables, I don't think there is a problem with more than one thread executing a method concurrently. Each thread should have its own local variables. There should not be any static variables.

  3. #3
    sumukh_death is offline Member
    Join Date
    Sep 2011
    Posts
    6
    Rep Power
    0

    Default Re: Concurrency with web services in a application

    Makes sense. So if I am right, I need to remove all the singletons beans and inject all the Singleton beans to other corresponding classes which calls web services.

    One other thing. The Handlers which will call webservices should they be static or singletons. To keep reusing their instances.

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,570
    Rep Power
    25

    Default Re: Concurrency with web services in a application

    Sorry, I don't know anything about the bean code you are talking about. I thought that singletons used static variables.

Similar Threads

  1. Replies: 0
    Last Post: 09-07-2011, 03:17 PM
  2. Replies: 0
    Last Post: 04-13-2011, 04:51 AM
  3. GUI Concurrency Problems
    By jkhamler in forum Threads and Synchronization
    Replies: 18
    Last Post: 01-20-2010, 03:40 PM
  4. Need to help to create an application using jsp, web services, ejb, mysql
    By sankethm7 in forum Enterprise JavaBeans (EJB)
    Replies: 0
    Last Post: 04-22-2009, 10:06 AM
  5. Web Services: Axis vs Metro vs Spring Web Services
    By davidbaker29 in forum Advanced Java
    Replies: 0
    Last Post: 01-28-2009, 11:20 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •