I was thinking to do the same thing too, but I will not use the approach like yours … as I know there will be plenty of thing to take care of. So I’'m using an Applet approach!
Anyway, by refering to your case, you can use a JavaBean to store the connection instance … and since the bean is session-based, this make the keeping track of user possible! Remember to close the connection during the bean removal phrase!
If I were to use your approach, I will use a JSF architecture (seriously consider that). Interesting idea thought … I’'ll try to do some disccussion in my blog (http://avatar21.superihost.com) regarding this!
Just curious, are you creating your own XMPP server or using the public like Google Talk server? Because I was thinking to make my own XMPP server!
Message was edited by: