title: .NET Remoting thread locking mechanism
body: <p>I'm having a pressing issue and I'm hoping you all can help me out.  I will try my best to explain it as well as I can.</p>
  
  <p>I am augmenting a system that uses .NET remoting to allow for database calls from a thin client to a server that executes said calls.  The server itself has the data access components installed on it, so it makes the actual calls to the database, and just returns the datarows to the thin client.</p>
  
  <p>I just recently added transactions to these modules.  I wanted to make this thread-safe, where if client thread A started a database transaction, client thread B would not be able to access client thread A's transaction.  It is not necessary to allow client thread B to have it's own transaction in the meanwhile, only necessary that I do not allow client thread B to use client thread A's transaction.  </p>
  
  <p>There is only 1 reference to the remoting object that both of them share, and because of the underlying architecture that I will not get into, I am not able to change this.  All of the Transaction objects are stored on the server in this remoting object.</p>
  
  <p>I see no good way of doing this, besides perhaps passing the client thread information along with every single transaction call, which is not feasible with my pressing timelines. :-(  Perhaps if the remoting object could access the calling client thread, then I would not have to pass the thread information with every call, making this feasible.</p>
  
  <p>If there was some way of associating a client thread with a remoting process thread, I think that would do the trick, but there is no documentation that I could find on such a thing.</p>
  
  <p>I hope I explained this well enough.  All help is greatly appreciated. Thank you in advance.</p>