Look at my codes:
muc.create(roomName);
Form form = muc.getConfigurationForm();
Form submitForm = form.createAnswerForm();
for (Iterator<FormField> fields = form.getFields(); fields
.hasNext();) {
FormField field = (FormField) fields.next();
if (!FormField.TYPE_HIDDEN.equals(field.getType())
&& field.getVariable() != null) {
submitForm.setDefaultAnswer(field.getVariable());
}
}
List<String> owners = new ArrayList<String>();
owners.add(userJid);
submitForm.setAnswer("muc#roomconfig_roomowners", owners);
submitForm.setAnswer("muc#roomconfig_roomadmins", owners);
submitForm.setAnswer("muc#roomconfig_persistentroom", true);
I create a room and set its onwers.then I login out.After a while,I login in.But I can get the owners of the room.
I don't known how to resolve it.