Commit 994bf861 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

Ported changes from 3.5.0 branch.


git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@10097 b35dd754-fafc-0310-a699-88a17e54d16e
parent 70c98c1d
......@@ -81,7 +81,7 @@ public class DbConnectionManager {
setConnectionProvider((ConnectionProvider)conClass.newInstance());
}
catch (Exception e) {
Log.error("Warning: failed to create the " +
Log.warn("Failed to create the " +
"connection provider specified by connection" +
"Provider.className. Using the default pool.", e);
setConnectionProvider(new DefaultConnectionProvider());
......@@ -93,12 +93,32 @@ public class DbConnectionManager {
}
}
}
Connection con = connectionProvider.getConnection();
// TODO: May want to make these settings configurable
Integer retryCnt = 0;
Integer retryMax = 10;
Integer retryWait = 250; // milliseconds
Connection con;
do {
retryCnt++;
con = connectionProvider.getConnection();
if (con != null) {
// Got one, lets hand it off.
break;
}
try {
Thread.sleep(retryWait);
}
catch (Exception e) {
// Ignored
}
} while (retryCnt <= retryMax);
if (con == null) {
Log.error("WARNING: ConnectionManager.getConnection() " +
Log.warn("ConnectionManager.getConnection() " +
"failed to obtain a connection.");
}
// See if profiling is enabled. If yes, wrap the connection with a
// profiled connection.
if (profilingEnabled) {
......
......@@ -29,6 +29,7 @@
String defaultSearchFilter;
// First check if the http session holds data from a previous post of this page
if (session.getAttribute("ldapUserSettings") != null && session.getAttribute("ldapVCardBean") != null) {
@SuppressWarnings("unchecked")
Map<String, String> userSettings = (Map<String, String>) session.getAttribute("ldapUserSettings");
defaultUsernameField = userSettings.get("ldap.usernameField");
defaultSearchFields = userSettings.get("ldap.searchFields");
......@@ -94,6 +95,7 @@
vcardBean.setAvatarStoredInDB(false);
}
// Store the vcard db setting for later saving.
@SuppressWarnings("unchecked")
Map<String,String> xmppSettings = (Map<String,String>)session.getAttribute("xmppSettings");
if (xmppSettings != null) {
xmppSettings.put("ldap.override.avatar", vcardBean.getAvatarStoredInDB().toString());
......@@ -160,7 +162,7 @@
sb.append("&userIndex=").append(request.getParameter("userIndex"));
}
%>
<a href="<%= sb.toString()%>" id="lbmessage" title="<fmt:message key="global.test" />" style="display:none;"/>
<a href="<%= sb.toString()%>" id="lbmessage" title="<fmt:message key="global.test" />" style="display:none;"></a>
<script type="text/javascript">
function loadMsg() {
var lb = new lightbox(document.getElementById('lbmessage'));
......@@ -200,7 +202,7 @@
<% } %>
<form action="<%= currentPage%>" method="post">
<input type="hidden" name="serverType" value="<%=serverType%>">
<input type="hidden" name="serverType" value="<%=serverType%>"/>
<!-- BEGIN jive-contentBox_bluebox -->
<div class="jive-contentBox_bluebox">
......
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