Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Communications Framework (ECF) » Problem adding roster entries (XMPP)
Problem adding roster entries (XMPP) [message #624867] Tue, 09 June 2009 13:38 Go to next message
Matt Sither is currently offline Matt SitherFriend
Messages: 33
Registered: July 2009
Member
I'm writing an application with a built-in IM tool, and we recently
integrated ECF into it. We're currently only using the XMPP provider. ECF
has been great so far, but I've been having some minor issues with roster
management. When I add a roster entry, the entry shows up twice. Here's
what the implementation looks like:

Sender:
(1) Enter contact's username, nickname, and group
(2) Call IRosterSubscriptionSender.sendRosterAdd(username, nickname, new
String[] {group});
Receiver:
(3) The subscription request is received via
IRosterSubscriptionListener.handleSubscriptionRequest(ID), and the UI
displays this and allows the user to accept or reject the request.
(4) Upon clicking "Accept", do two things:
(a) To accept the request, call
IPresenceSender.sendPresenceUpdate(sender, new Presence(Type.SUBSCRIBED))
(b) To add the sender to the receiver's roster, call
IRosterSubscriptionSender.sendRosterAdd(sender.getName(), null, new
String[0]);
Sender:
(5) Upon receiving this subscription request, we automatically respond
with SUBSCRIBED

Afterward, the sender correctly shows up once as AVAILABLE in the receiver's
roster. But the reicever shows up twice in the sender's roster, once as
AVAILABLE and once as UNAVAILABLE. The interesting thing is that the
available entry has a resource (not the ECF default, one that we set for our
application), but the unavailable copy does not. Because their resources
don't match, XMPPID.equals() resolves to false, so somewhere in
ECFConnection, both entries are being added separately, but one should
actually be updating the original. Does that sound right? After the sender
logs out and logs back in, this issue goes away, so this isn't super
critical.

I aslo have similar issues with removing roster entries. I haven't figured
it out from the source yet, but it seems like there's a small, but elusive,
bug in how ECFConnection handles Smack's RosterPackets.

I currently have a workaround for this. I search for and remove invalid
roster entries whenever I receive a roster update. Obviously this isn't
ideal.

Thanks for the help!
Re: Problem adding roster entries (XMPP) [message #624868 is a reply to message #624867] Tue, 09 June 2009 14:44 Go to previous messageGo to next message
Scott Lewis is currently offline Scott LewisFriend
Messages: 1038
Registered: July 2009
Senior Member
Hi Sither,

This is likely a bug. Would you please open a bug report for it at:

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=ECF

Thanks Much!

Scott

Sither wrote:
> I'm writing an application with a built-in IM tool, and we recently
> integrated ECF into it. We're currently only using the XMPP provider.
> ECF has been great so far, but I've been having some minor issues with
> roster management. When I add a roster entry, the entry shows up
> twice. Here's what the implementation looks like:
>
> Sender:
> (1) Enter contact's username, nickname, and group
> (2) Call IRosterSubscriptionSender.sendRosterAdd(username, nickname,
> new String[] {group});
> Receiver:
> (3) The subscription request is received via
> IRosterSubscriptionListener.handleSubscriptionRequest(ID), and the UI
> displays this and allows the user to accept or reject the request.
> (4) Upon clicking "Accept", do two things:
> (a) To accept the request, call
> IPresenceSender.sendPresenceUpdate(sender, new Presence(Type.SUBSCRIBED))
> (b) To add the sender to the receiver's roster, call
> IRosterSubscriptionSender.sendRosterAdd(sender.getName(), null, new
> String[0]);
> Sender:
> (5) Upon receiving this subscription request, we automatically
> respond with SUBSCRIBED
>
> Afterward, the sender correctly shows up once as AVAILABLE in the
> receiver's roster. But the reicever shows up twice in the sender's
> roster, once as AVAILABLE and once as UNAVAILABLE. The interesting
> thing is that the available entry has a resource (not the ECF default,
> one that we set for our application), but the unavailable copy does
> not. Because their resources don't match, XMPPID.equals() resolves to
> false, so somewhere in ECFConnection, both entries are being added
> separately, but one should actually be updating the original. Does that
> sound right? After the sender logs out and logs back in, this issue
> goes away, so this isn't super critical.
>
> I aslo have similar issues with removing roster entries. I haven't
> figured it out from the source yet, but it seems like there's a small,
> but elusive, bug in how ECFConnection handles Smack's RosterPackets.
>
> I currently have a workaround for this. I search for and remove invalid
> roster entries whenever I receive a roster update. Obviously this isn't
> ideal.
>
> Thanks for the help!
>
Re: Problem adding roster entries (XMPP) [message #624911 is a reply to message #624868] Tue, 09 June 2009 15:30 Go to previous message
Matt Sither is currently offline Matt SitherFriend
Messages: 33
Registered: July 2009
Member
I opened a bug report at
https://bugs.eclipse.org/bugs/show_bug.cgi?id=279637

Thanks,
Matt

"Scott Lewis" <slewis@composent.com> wrote in message
news:4A2E7543.5040701@composent.com...
> Hi Sither,
>
> This is likely a bug. Would you please open a bug report for it at:
>
> https://bugs.eclipse.org/bugs/enter_bug.cgi?product=ECF
>
> Thanks Much!
>
> Scott
>
> Sither wrote:
>> I'm writing an application with a built-in IM tool, and we recently
>> integrated ECF into it. We're currently only using the XMPP provider.
>> ECF has been great so far, but I've been having some minor issues with
>> roster management. When I add a roster entry, the entry shows up twice.
>> Here's what the implementation looks like:
>>
>> Sender:
>> (1) Enter contact's username, nickname, and group
>> (2) Call IRosterSubscriptionSender.sendRosterAdd(username, nickname,
>> new String[] {group});
>> Receiver:
>> (3) The subscription request is received via
>> IRosterSubscriptionListener.handleSubscriptionRequest(ID), and the UI
>> displays this and allows the user to accept or reject the request.
>> (4) Upon clicking "Accept", do two things:
>> (a) To accept the request, call
>> IPresenceSender.sendPresenceUpdate(sender, new Presence(Type.SUBSCRIBED))
>> (b) To add the sender to the receiver's roster, call
>> IRosterSubscriptionSender.sendRosterAdd(sender.getName(), null, new
>> String[0]);
>> Sender:
>> (5) Upon receiving this subscription request, we automatically respond
>> with SUBSCRIBED
>>
>> Afterward, the sender correctly shows up once as AVAILABLE in the
>> receiver's roster. But the reicever shows up twice in the sender's
>> roster, once as AVAILABLE and once as UNAVAILABLE. The interesting thing
>> is that the available entry has a resource (not the ECF default, one that
>> we set for our application), but the unavailable copy does not. Because
>> their resources don't match, XMPPID.equals() resolves to false, so
>> somewhere in ECFConnection, both entries are being added separately, but
>> one should actually be updating the original. Does that sound right?
>> After the sender logs out and logs back in, this issue goes away, so this
>> isn't super critical.
>>
>> I aslo have similar issues with removing roster entries. I haven't
>> figured it out from the source yet, but it seems like there's a small,
>> but elusive, bug in how ECFConnection handles Smack's RosterPackets.
>>
>> I currently have a workaround for this. I search for and remove invalid
>> roster entries whenever I receive a roster update. Obviously this isn't
>> ideal.
>>
>> Thanks for the help!
>>
Previous Topic:ECF and relationship with JmDNS
Next Topic:FileTransfer, redirects and authentication
Goto Forum:
  


Current Time: Sat Aug 20 00:48:11 GMT 2022

Powered by FUDForum. Page generated in 0.05606 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top