[jdev] IQ handling. Was: Directed presence + presence probe result

Norman Rasmussen norman at rasmussen.co.za
Wed Nov 23 07:51:10 CST 2005


I think that the iq packet MUST be handled atomically.  So either all
changes are made or none are.  (you'll probably struggle to find a
server that implements this though)

On 11/23/05, Vinod Panicker <vinod.p at gmail.com> wrote:
> On 11/23/05, Alexey Nezhdanov <snake at penza-gsm.ru> wrote:
> > В сообщении от Среда 23 Ноябрь 2005 14:59 Vinod Panicker написал(a):
> > > On 11/23/05, Ralph Meijer <jabber.org at ralphm.ik.nu> wrote:
> > > > > PS: Any thoughts on the multiple iq items error handling anyone?
> > > >
> > > > What do you mean? An iq may only have 1 child element.
> > >
> > > Considering this stanza -
> > >
> > > Sorry!  The stanza should have been like this -
> > >
> > >  <iq from='juliet at example.com/balcony' type='set' id='roster_4'>
> > >    <query xmlns='jabber:iq:roster'>
> > >      <item jid='abc at example.com' subscription='remove'/>
> > >      <item jid='def at example.com' subscription='remove'/>
> > >      <item jid='ghi at example.com' subscription='remove'/>
> > >    </query>
> > >  </iq>
> > >
> > > What if there are errors for any of the items?
> > Why not do it like this?
> >   <iq from='juliet at example.com/balcony' type='set' id='roster_4'>
> >     <query xmlns='jabber:iq:roster'>
> >       <item jid='abc at example.com' subscription='remove'/>
> >     </query>
> >   </iq>
> >   <iq from='juliet at example.com/balcony' type='set' id='roster_5'>
> >     <query xmlns='jabber:iq:roster'>
> >       <item jid='def at example.com' subscription='remove'/>
> >     </query>
> >   </iq>
> >   <iq from='juliet at example.com/balcony' type='set' id='roster_6'>
> >     <query xmlns='jabber:iq:roster'>
> >       <item jid='ghi at example.com' subscription='remove'/>
> >     </query>
> >   </iq>
> > Anyways user will very rarely delete several contacts at once... What is the
> > benefit from doing it in your way?
>
> I figured since its not expressly forbidden, then why not?
>
> Maybe bulk automated operations?  Who knows?
>
> Regards,
> Vinod.
>


--
- Norman Rasmussen
 - Email: norman at rasmussen.co.za
 - Home page: http://norman.rasmussen.co.za/


More information about the JDev mailing list