The Receive method of MessageQueue class is a thread-blocking method. The
parameterless overload has an infinite timeout.
Exerpt from MSDN library:
"Use a call to Receive when it is acceptable for the current thread to be blocked
while it waits for a message to arrive in the queue. Because this
Trey Nash <[EMAIL PROTECTED]> writes:
> If you instruct soapsuds to export the metadata into an assembly with the
> same name as your server, the problem should go away. The proxy is trying
> to find the assembly that the objref references and it cannot find it.
> This is the real problem. It's
Hi,
I tried taking your example and breaking it down a bit. I changed the
return type of getUtility to return an ObjRef. I then did the following
in getUtility():
return( RemotingServices.Marshal(new UtilityClass()) );
Then, on the client side of the fence I unmarshaled to an Object. The
ObjR
Hi,
Have a look at the System.Timers namespace, set an interval and your code
will callback on that interval which is far more efficient in my opinion than
continually looping.
This namespace has been designed with windows services in mind, I usually put the poll
interval
in the application conf
According to the generally accepted recommendation, it is necessary to call
Dispose on a component derived from ServicedComponent, regardless of JITA or
pooling settings. Unless you want to hold on to the component state (which
is not a good thing, but it is a topic for a different discussion)
I
--- Steve Clark <[EMAIL PROTECTED]> wrote:
> Thanks for the suggestions. I'll try them out. It seems unavoidable,
> that I'll have to replicate the legacy API in a wrapper class of some sort.
I can't speak from personal experience here but swig (http://www.swig.org/) has
an "experimental" imple
Urs Muff <[EMAIL PROTECTED]> writes:
> I would strongly recommend (and Ingo does too) to create a metadata library
> with interfaces. This assembly only contains all the interfaces and you can
> easily use the same assembly on the client and on the server. The server is
> then implementing those
> [System.Xml.Serialization.XmlTypeAttribute(
> TypeName = "SensorID.Reader.Agile")]
> public class AgileReaderSettings : IReaderSettings
> {
>private int m_noAntennas;
>private string m_ipAddress;
>private int m_port;
>private int m_autoIDTimeout;
>private int m_s
You will eat up the process doing that. Use BeginReceive to process
messages as they come in.
Wally
- Original Message -
From: "Paulo Sacramento" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 04, 2003 10:28 AM
Subject: Re: [ADVANCED-DOTNET] Message Queue and Windows S
Bar-
Here's a snippet for code I'm working on that is exactly what
you are trying to do...I think you just need to set it up to be async
using events (This code is from a good Wrox book, Data-Centric .NET
programming with C#). All other code in my service is boilerplate from
VS.NET:
The
Use BeginRecieve(). With BeginRecieve, you won't block in a hard loop.
When a message is recieved in the queue, an event is fired that there is a
message in the queue. here is the info on BeginRecieve:
ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemMessagingMessageQueue
ClassBeginReceiveT
> [System.Xml.Serialization.XmlTypeAttribute(
> TypeName = "SensorID.Reader.Agile")]
> public class AgileReaderSettings : IReaderSettings
> {
>private int m_noAntennas;
>private string m_ipAddress;
>private int m_port;
>private int m_autoIDTimeout;
>private int m_s
> However, the RegisterWaitForSingleObject() method requires an
> instance of
> the WaitHandle class as argument. How do I come from the
> IntPtr that is
> returned by DuplicateHandle() to a WaitHandle instance?
>
> For some odd reason the WaitHandle class is abstract, so I
> also need to
> fig
Hi,
I am serializing a class that contains int and string type members and an
arrayList of enumerated type.
Here is are the members of my class:
[System.Xml.Serialization.XmlTypeAttribute(
TypeName = "SensorID.Reader.Agile")]
public class AgileReaderSettings : IReaderSettings
{
priv
Thanks for the suggestions. I'll try them out. It seems unavoidable,
that I'll have to replicate the legacy API in a wrapper class of some sort.
Why do u want to poll the queue??? U can set up MSMQ triggers which are
event based.
U just tell the trigger if a msg appears on this queue .such and such
method shud b called in ur Component.
That's it!!
- Regards
Nishant Pant
-Original Message-
From: Zecharya Bar [mailto:[EMAIL P
What's keeping you from using a thread?
Something like:
Thread mainThread;
protected override void OnStart(string[] args)
{
string queuePath = @".\private$\myQueue";
MessageQueue myQueue;
if (! MessageQueue.Exists(queuePath))
{
MessageQueue.Create(queuePath);
}
myQ
Hi,
I'm beginning to experiment with Microsoft Message Queues and have run into a simple
problem.
I would like a Windows Service I'm creating to monitor continuously a MSMQ, and upon
receiving a message, call another method.
How do I get the service to continually check the queue?
I've tried
>From the help to RegisterWaitForSingleObject:
"The wait thread uses the Win32 WaitForMultipleObjects function to monitor
registered wait operations. Therefore, if you must use the same native
operating system handle in multiple calls to RegisterWaitForSingleObject,
you must duplicate the handle u
I would strongly recommend (and Ingo does too) to create a metadata library
with interfaces. This assembly only contains all the interfaces and you can
easily use the same assembly on the client and on the server. The server is
then implementing those interfaces. Here is a sample (and that works
20 matches
Mail list logo