RE: connection status handler in .Net connector
[email protected] Sat, 25 Dec 2004 22:11:52 -0800
| Newsgroups | gmane.comp.web.mod-pubsub.devel |
|---|---|
| Message-ID | <CA4D186E24985848974590F39B79777C20DF@w2k3-exchange.home.chhuoii.com> |
This is a multi-part message in MIME format.
------_=_NextPart_001_01C4EB11.F4EAD5BE
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi Rohit,
=20
Sorry in responding to you so late, but I've been away for the holidays.
=20
The answer to your question is that your namespace doesn't have a
reference to the LibKNDotNet namespace. In the Dotnet samples which was
written for VS.NET 2002, relies on the fact that a "using" in the global
scope is inherited in any namespaces in the file. For example in a file
for .NET 1.0,
=20
using namespace LibKNDotNet;
=20
namespace MyNS
{
// has access to LibKNDotNet
}
=20
But in .NET 1.1, this is no longer true. MyNS namespace no longer has
access to LIBKNDotNet. To fix, this, you need to move the using into the
MyNS:
=20
namespace MyNS
{
using namespace LibKNDotNet;
}
=20
That will fix the problem.
=20
Tommy
________________________________
From: [email protected]
[mailto:[email protected]]=20
Sent: Tuesday, December 14, 2004 11:05 PM
To: '[email protected]'
Subject: [Mod-pubsub-developer] connection status handler in .Net
connector
Hi,=20
I was trying to implement a connection status handler which
implemented IConnectionStatusHandler, but I get the error that the class
is sealed and cannot be inherited from. Am I missing something? I was
doing this so that the client could subscribe again on reconnection with
server. Normally, if connection with server is lost, normally the client
would just sit around, even if the server comes back up the client does
not realise this.
Another question I have is that regardless of offline queueing
being enabled or not, and items being there in the queue or not,
HasItems() always return true. Why is this ?
Regards,=20
Rohit Khetan.=20
This message is free from Virus - IMSS
=09
------_=_NextPart_001_01C4EB11.F4EAD5BE
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>connection status handler in .Net connector</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2900.2523" name=3DGENERATOR></HEAD>
<BODY>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D406470506-26122004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>Hi Rohit,</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D406470506-26122004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN> </DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D406470506-26122004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>Sorry in responding to you so late, but I've =
been away for=20
the holidays.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D406470506-26122004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN> </DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D406470506-26122004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>The answer to your question is that your =
namespace doesn't=20
have a reference to the LibKNDotNet namespace. In the Dotnet samples =
which was=20
written for VS.NET 2002, relies on the fact that a "using" in the global =
scope=20
is inherited in any namespaces in the file. For example in a file for =
.NET=20
1.0,</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D406470506-26122004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN> </DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D406470506-26122004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>using namespace =
LibKNDotNet;</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D406470506-26122004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN> </DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D406470506-26122004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>namespace MyNS</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D406470506-26122004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>{</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN =
class=3D406470506-26122004> <FONT=20
face=3DArial color=3D#0000ff size=3D2>// has access to =
LibKNDotNet</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D406470506-26122004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>}</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D406470506-26122004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN> </DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D406470506-26122004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>But in .NET 1.1, this is no longer true. MyNS =
namespace no=20
longer has access to LIBKNDotNet. To fix, this, you need to move the =
using into=20
the MyNS:</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D406470506-26122004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN> </DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D406470506-26122004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>namespace MyNS</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D406470506-26122004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>{</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN =
class=3D406470506-26122004> <FONT=20
face=3DArial color=3D#0000ff size=3D2>using namespace =
LibKNDotNet;</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D406470506-26122004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>}</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D406470506-26122004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN> </DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D406470506-26122004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>That will fix the problem.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D406470506-26122004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN> </DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D406470506-26122004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>Tommy</FONT></SPAN></DIV><BR>
<DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft>
<HR tabIndex=3D-1>
<FONT face=3DTahoma size=3D2><B>From:</B>=20
[email protected]=20
[mailto:[email protected]] =
<BR><B>Sent:</B>=20
Tuesday, December 14, 2004 11:05 PM<BR><B>To:</B>=20
'[email protected]'<BR><B>Subject:</B>=20
[Mod-pubsub-developer] connection status handler in .Net=20
connector<BR></FONT><BR></DIV>
<DIV></DIV>
<P><FONT face=3DArial size=3D2>Hi,</FONT>=20
<BR> <FONT face=3DArial =
size=3D2>I was=20
trying to implement a connection status handler which implemented=20
IConnectionStatusHandler, but I get the error that the class is sealed =
and=20
cannot be inherited from. Am I missing something? I was doing this so =
that the=20
client could subscribe again on reconnection with server. Normally, if=20
connection with server is lost, normally the client would just sit =
around, even=20
if the server comes back up the client does not realise this.</FONT></P>
<P> <FONT face=3DArial =
size=3D2>Another=20
question I have is that regardless of offline queueing being enabled or =
not, and=20
items being there in the queue or not, HasItems() always return true. =
Why is=20
this ?</FONT></P>
<P><FONT face=3DArial size=3D2>Regards,</FONT> <BR><FONT face=3DArial =
size=3D2>Rohit=20
Khetan.</FONT> </P>
<TABLE>
<TBODY>
<TR>
<TD bgColor=3D#ffffff><FONT color=3D#000000>This message is free =
from Virus -=20
IMSS<BR></FONT></TD></TR></TBODY></TABLE></BODY></HTML>
------_=_NextPart_001_01C4EB11.F4EAD5BE--
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/