?
Solved

Distributed threads via RMI with wait/notify?

Posted on 2003-03-13
3
Medium Priority
?
634 Views
Last Modified: 2008-03-17
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!

Thanks

 
0
Comment
Question by:gingermeatboy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 35

Accepted Solution

by:
TimYates earned 200 total points
ID: 8132737
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 :-)

http://216.239.39.100/search?q=cache:t_tmdCexWYoC:www.oreilly.com/catalog/entjbeans3/chapter/ch13.html+wait+notify+via+Message+Driven+Beans&hl=en&ie=UTF-8
0
 

Author Comment

by:gingermeatboy
ID: 8133045
: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!

0
 

Author Comment

by:gingermeatboy
ID: 9032884
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
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses
Course of the Month15 days, 10 hours left to enroll

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question