• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to implement a java thread???

 
Jesse Elder
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!!
 
Jesse Elder
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont understand, this is my real name. Thanks Matt, I shall give it a try
Jesse Elder
 
Jesse Elder
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Matt, is there anyway that you can elaborate on your suggestion? Thanks for the help.
Jesse
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!