File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Threads and Synchronization and the fly likes how to implement a java thread??? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "how to implement a java thread???" Watch "how to implement a java thread???" New topic
Author

how to implement a java thread???

Jesse Elder
Greenhorn

Joined: Apr 17, 2002
Posts: 8
I am a college student working at NIST (National Institute of Standards and Technology). I have a question that maybe someone can answer or perhaps can show me where I can possibly find an answer.

I am running a scenario that involves multiple beans with multiple message passing. Is there a way for two beans to send the same event at the same time. I believe that the use of the Java thread can perform this task, but I am not sure how to set it up. I want multiple beans to be able to launch multiple event concurrently. Java seams to work very sequentially and I have not been able to organize events so that they run parallel.

Does anyone have any advice. Any assistance would be greatly appreciated.

Thanks, Jesse Elder
Matt Anderson
Greenhorn

Joined: Apr 16, 2002
Posts: 20
Try the Timer class introduced with jdk1.3. This can be used to sync up the two threads.Also you can use the notify method , such that one thread would notify the other before executing the bean operation.


Matt Anderson
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
MAnderson
Welcome to the Java Ranch, we hope you’ll enjoy visiting as a regular however,
your name is not in keeping with our naming policy here at the ranch. Please change your display name to an appropriate name as shown in the policy.
Thanks again and we hope to see you around the ranch!!


Dave
Jesse Elder
Greenhorn

Joined: Apr 17, 2002
Posts: 8
I dont understand, this is my real name. Thanks Matt, I shall give it a try
Jesse Elder
Jesse Elder
Greenhorn

Joined: Apr 17, 2002
Posts: 8
Matt, is there anyway that you can elaborate on your suggestion? Thanks for the help.
Jesse
 
 
subject: how to implement a java thread???
 
Threads others viewed
reentrant???
Regarding threads
Can you assign unique thread ids and access thread from external program?
testing locks.
are stateless beans thread safe
IntelliJ Java IDE