Roster Problem

the problem is,i got this application, and it works as a “mid-fielder” between the jive server and the client, and it may have lots of users connected to it, and for each user, i have to get its roster and put it on my database. every time i receive any information that change the roster, i have to change my database.

im having some problem getting this roster, because smack doesnt have one “Query” class, so when i get the IQ, i dont know how to get the query tag, to change my databse. i saw there is a method called getRoster() in XMPPConnection class, and this method returns a Roster, but if i want to use that, i have to keep this object in memory, and then put i listener on it, so i can change my database whenever its needed.

my question is, is there anyway to do this, without keeping the Roster in memory? is there anyway i can use something like the getExtensions() method on IQ, to get the the query tag? or what else can I do?

thanks for everything,

Fernando