Commit 2c4f22a2 authored by Matt Tucker's avatar Matt Tucker Committed by matt

Refactoring.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@810 b35dd754-fafc-0310-a699-88a17e54d16e
parent b456e649
...@@ -589,6 +589,8 @@ public class XMPPServer { ...@@ -589,6 +589,8 @@ public class XMPPServer {
if (pluginManager != null) { if (pluginManager != null) {
pluginManager.shutdown(); pluginManager.shutdown();
} }
// Stop the Db connection manager.
DbConnectionManager.getConnectionProvider().destroy();
// TODO: hack to allow safe stopping // TODO: hack to allow safe stopping
Log.info("Jive Messenger stopped"); Log.info("Jive Messenger stopped");
} }
......
...@@ -216,7 +216,7 @@ public class Group implements Cacheable { ...@@ -216,7 +216,7 @@ public class Group implements Cacheable {
throw new IllegalStateException(); throw new IllegalStateException();
} }
iter.remove(); iter.remove();
String user = (String) current; String user = (String)current;
// Remove the group user from the backend store // Remove the group user from the backend store
provider.deleteMember(name, user); provider.deleteMember(name, user);
// Update the group users' roster // Update the group users' roster
......
...@@ -23,7 +23,9 @@ import ="org.jivesoftware.util.*, ...@@ -23,7 +23,9 @@ import ="org.jivesoftware.util.*,
org.dom4j.xpath.DefaultXPath, org.dom4j.xpath.DefaultXPath,
org.dom4j.*, org.dom4j.*,
org.jivesoftware.messenger.group.*, org.jivesoftware.messenger.group.*,
java.net.URLEncoder" java.net.URLEncoder,
org.jivesoftware.messenger.user.UserManager,
org.jivesoftware.messenger.user.UserNotFoundException"
errorPage="error.jsp"%> errorPage="error.jsp"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%> <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<jsp:useBean id="webManager" class="org.jivesoftware.util.WebManager"/> <jsp:useBean id="webManager" class="org.jivesoftware.util.WebManager"/>
...@@ -57,15 +59,14 @@ errorPage="error.jsp"%> ...@@ -57,15 +59,14 @@ errorPage="error.jsp"%>
} }
if(users.length() > 0){ if(users.length() > 0){
String hostName = webManager.getXMPPServer().getServerInfo().getName();
StringTokenizer tokenizer = new StringTokenizer(users, ","); StringTokenizer tokenizer = new StringTokenizer(users, ",");
while (tokenizer.hasMoreTokens()) { while (tokenizer.hasMoreTokens()) {
String tok = tokenizer.nextToken(); String username = tokenizer.nextToken();
String address = tok; try {
if (address.indexOf("@") == -1) { UserManager.getInstance().getUser(username);
address = address + "@" + hostName; newGroup.getMembers().add(username);
} }
newGroup.getMembers().add(address); catch (UserNotFoundException unfe) { }
} }
} }
// Successful, so redirect // Successful, so redirect
...@@ -166,19 +167,13 @@ errorPage="error.jsp"%> ...@@ -166,19 +167,13 @@ errorPage="error.jsp"%>
</tr> </tr>
<tr> <tr>
<td nowrap width="1%"> <td nowrap width="1%">
Add User(s): Initial Member(s):
</td> </td>
<td nowrap class="c1" align="left"> <td nowrap class="c1" align="left">
<input type="text" size="40" name="users"/> <input type="text" size="40" name="users"/>
&nbsp; &nbsp;
</td> </td>
</tr> </tr>
<td width="1%">
</td>
<td nowrap align="left" class="jive-description">
Comma delimited list. Example: "user1@site.com", "user2@site.com"
</td>
</tr>
</table> </table>
<br> <br>
<span class="jive-description"> * Required fields </span> <span class="jive-description"> * Required fields </span>
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment