• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 660
  • Last Modified:

Distributed threads via RMI with wait/notify?

I know I've asked this else where but it wasn't very clear so I thought I'd try again.

Can anyone tell me if the following is possible, and if not if there is anyway to get the same functionality?

I have a client/server peer to peer type relationship set up, and one of the things I'm needing to distribute currently uses several threads running on the one machine, these however use wait and notify within the threads, was wondering if it would be possible to distribute this? spawn threads on the server, and within the run() method call method on worker machine, which does the work, however the wait and notify would be on the worker, is this possible at all? I extremely doubt it but I can't see how else to work round this problem!

Any help greatly appreciated as always!


  • 2
1 Solution
I think you want to look at Message Driven Beans, as these can be used to simulate the processes you need :-)

Basically, you would send a message to the worker to tell it to process some data, and then that worker would reply to the client when it is done...

The Java Messaging service which this relies on is asynchronous however, so some work will be required, but it is the only solution I can think of... :-/

Have a look here, to see if it helps :-)
gingermeatboyAuthor Commented:
:oS eek!

damn, I was hoping this would be simple too! well I guess I've got 3 days to figure it out, or leave the system as it is :o)

the second option is looking extremely likely!

gingermeatboyAuthor Commented:
sorry i took so long, this is the first time i've been back on since my last comment in this thread! I gave up in the end, but since you gave me sound advice i think you deserved the points :o) cheers

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now