• Post Reply Bookmark Topic Watch Topic
  • New Topic

Thread communication  RSS feed

 
supriya acharya
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
I have several threads in my application but currently i am working on the communication between two threads. These two threads are continuosly running in my application my first thread say T1 detects a client that passes a username and now T1 grants a user id to this user.The second Thread T2 now wants to access this userid from T1. How to access this userid ? is it possible for these two threads to communicate to transfer the user id?


i am accepting the username and storing in the database and return userid ;
i want this userid to be transferred to T2 because T2 will process data related to the same user ie the id generated by T1


this is the actual thing what i expect ...i had a method in T1 that passes a value to T2 and T2 collects it but the userid is always showing 0 that means it not getting passed......how can i solve this???


[Nitesh: Please UseCodeTags]
 
Edward Harned
Ranch Hand
Posts: 291
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
start with the tutorial
http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html
 
Alan Mehio
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will say the same. You need to understand the concept of thread first

Good luck with that
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!