• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Thread communication

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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]
 
Ranch Hand
Posts: 291
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
start with the tutorial
http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic