powered by Jive Software

deleteAccount via SMACK

Hello!

I am administrating user accounts via smack, ie the end users are not allowed to create their own Openfire user but instead makes a request to a server that makes user create/delete requests to the Openfire server through smack. User creation works without a problem. There is, however, a problem with user delete. User delete is done with the simplified code listed below:

ConnectionConfiguration conf = new ConnectionConfiguration(ip, port);

conf.setTLSEnabled(false);

conf.setSASLAuthenticationEnabled(false);

XMPPConnection con = new XMPPConnection(conf);

con.login(“user”, “pwd”, “user_removal_” + UUID.randomUUID());

con.getAccountManager().deleteAccount();

The code works as is but is painfully slow. The shortest time I have measured for the code block is 4 secs and the average/typical seems to be about 12-15 secs. Questions:

  • Can this be done in a simpler/faster way, ie without creating a dedicated connection for the user delete operation, which is where I assume the time is mostly spent.?

  • Even the shortest time (4 secs) seems a bit slow to me, the typical time (12-15 secs measured when the server load is low (0 users) seems very high). Can I configure the Openfire in some way to minimize this time?

  • Am I doing something obvously wrong?

Regards

Jesper Tarnvik, Boss Media AB

hello, you can delete the entry directly from the database,

DELETE FROM jiveUser WHERE username="…" works fine, but im not sure of the side-effects

Hi,

this does not delete the roster entries, so its not a good idea.

LG

Hi,

is deleting a user so slow if you are using the admin console?

If there it’'s fast you could try using ad-hoc commands using Smack and an admin account (see http://www.xmpp.org/extensions/xep-0133.html#delete-user ).

LG