I apologize, I changed gears on you and I wasn't specific in my question. Although, this was a good answer to what I unintentionally asked. ;-)
Let me try again. If I were not to publish my object through remoting, is there any way to get a handle on an instance of an object that is running in an existing thread, and call methods on that instance of the object? Is this even possible? Remoting seems like the correct solution for exposing the instance of an object, but I want to cover all the bases. -----Original Message----- From: Ingo Rammer [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 02, 2002 12:58 PM To: [EMAIL PROTECTED] Subject: Re: [DOTNET] Webservice to existing object? Hmmm ... I assume that what you're trying to achieve is to get the URL you used to publish a specific object, right? This isn't supported as such but you could instead publish another object which will be used to return the URL of the object you' re looking for. In this case, you must however put the URL and maybe your "key" to identify the object into a HashTable or such on the server side. The "naming" service (which is essentially what you're doing here) will then do a lookup in this table and return the corresponding URL. I hope that I understood your intentions correctly ... else please post a follow-up ;-) HTH, -Ingo Author of "Advanced .NET Remoting" http://www.dotnetremoting.cc > -----Original Message----- > From: Erskine, Bill [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 02, 2002 6:55 PM > To: [EMAIL PROTECTED] > Subject: Re: [DOTNET] Webservice to existing object? > > > Thanks Ingo! This looks like it might do the trick! > > One last question, could I do something wacky such as enumerating the > threads on the machine and get the handle for the object out of the > appropriate thread? I'd rather not do it this way, but just > checking to see > if it could be done. > > > -----Original Message----- > From: Ingo Rammer [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 02, 2002 11:42 AM > To: [EMAIL PROTECTED] > Subject: Re: [DOTNET] Webservice to existing object? > > Hi Bill, > > you could use .NET Remoting in this case as it allows you to run > "WebServices anywhere". You can also publish an existing > object instance on > a given URL and allow remote clients to call its methods > (from any .NET > application, not just when using IIS as a server). > > For more information, please look at > http://www.dotnetremoting.cc/FAQs/PUBLISHING_OBJECT.asp [and > maybe also > http://www.dotnetremoting.cc/FAQs/singleton_is_dying.asp to > read a little > about the lifetime issues involved when doing this] > > HTH, > -Ingo > > Author of "Advanced .NET Remoting" > http://www.dotnetremoting.cc > > > -----Original Message----- > > From: Erskine, Bill [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, May 02, 2002 4:24 PM > > To: [EMAIL PROTECTED] > > Subject: [DOTNET] Webservice to existing object? > > > > > > Is there any way for a webservice to call methods on an > > object existing in a > > different thread already running in an .exe? > > > > I have this "gateway" running as a .NET .exe that polls a > database for > > messages to send through socket communication to a legacy > > system. We use a > > webservice to place a message to send to the legacy system in > > the database. > > When the "gateway" polls that database and finds a new > > message it calls the > > "send" function. This works fine, but I would prefer a > > solution that didn't > > involve polling or using any type of queue. > > > > I would just create a new instance of the "gateway" object > > whenever I wanted > > to send a message, but establishing a connection to the > legacy system > > requires a tedious handshake ritual that takes several seconds. > > > > I'm looking for a more efficient way to send message a > > message through this > > gateway to the legacy system, and wondered if the webservice > > that inserts > > the message into the database could also call the send method of the > > "gateway" .exe. Any ideas? > > > > Thanks! > > > > You can read messages from the DOTNET archive, unsubscribe > > from DOTNET, or > > subscribe to other DevelopMentor lists at http://discuss.develop.com. > You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.