Design Question: Pausing a process in a 3-tier architecture

Discussion in 'Java' started by Sebastian Millies, Oct 6, 2005.

  1. Hello,

    I'm writing an application that has a long-running task
    which puts heavy load on the client and database. For that
    reason, it needs to be suspended from time to time to
    allow other work.

    The long-running task is started from the GUI in a
    separate thread using SwingWorker. It gets suspended
    by calling a wait()/notify() from the Event-Dispatch Thread.
    This works very well in a 2-tier architecture (client-database).

    In a 3-tier setting, presumably the worker thread and
    event thread would share a handle to a stateful session bean
    on an application server. The appserver may do things like
    activate/passivate/swap beans around betewenn processes,use
    pooled instances, and other things I understand so poorly that
    I'm perhaps not even able to phrase this intelligibly.

    But can I be sure that the Thread that gets notified is
    the same that was waiting, and that I'm operating
    on the same bean instance? If not, do I have to forego the use
    of wait() and notify() on the app server and resort to active
    waiting?

    Thanks for any enlightenment,
    Sebastian
    Sebastian Millies, Oct 6, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. rob

    ASP v2 & 3-tier or 2-tier

    rob, Aug 13, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    397
    Steve C. Orr [MVP, MCSD]
    Aug 13, 2004
  2. NOSPAM

    2 tier to 3 tier?

    NOSPAM, Oct 14, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    422
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN
    Oct 14, 2004
  3. Steve Kershaw

    Setting up a new tier in a 3-tier system?

    Steve Kershaw, Mar 28, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    436
    Steve Kershaw
    Mar 29, 2006
  4. Ebenezer
    Replies:
    2
    Views:
    917
    Ebenezer
    Nov 15, 2010
  5. Vin
    Replies:
    0
    Views:
    214
Loading...

Share This Page