Skip navigation.
 
mlProblem In Accessing NSDistantobject
FROM : Abdul Sattar
DATE : Wed Jan 09 05:40:07 2008

Hello All,

I have created an application which uses Bonjour and Distributed 
Object (DO)to share files across the systems connected to the LAN, I 
have an issue with DO connection.
That is I have created a NSConnection in a thread (say THREAD 1), and 
get the mProxy  (server vended object) using the call [connection 
rootproxy] in the same thread.But when try to use mProxy in another 
thread or in main thread, it raises an exception saying 
"NSDistantObject access attempted from another thread", documentation 
says this is due to my attempt to use mProxy which is created in 
another thread (THREAD 1).

So what I have to do is keep running the THREAD 1 for long , and send 
all subsequent function calls to mProxy  in the  same thread(As I 
dont want to create separate thread and separate nsconnection for 
each function call to mProxy, instead use the same thread THREAD 1 
for all the time.).

Can anybody please tell me, how to send request to mProxy (in my 
case) to execute remote methods using single thread which keeps 
running, or sending request for invoking  a method to already running 
thread or Any alternate way for my above problem (my be sample code).

Please correct me if I am doing anything wrong in my above explained 
scenario.

Thanks in advance.

With Regards,
Abu



-----------------------------------------------
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.

Related mailsAuthorDate
mlProblem In Accessing NSDistantobject Abdul Sattar Jan 9, 05:40
mlRe: Problem In Accessing NSDistantobject Mike Bellerby Jan 9, 12:19
mlRe: Problem In Accessing NSDistantobject Ken Thomases Jan 11, 02:39