Commit b3a70feb authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Do not offer clustering when using the embedded DB.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9242 b35dd754-fafc-0310-a699-88a17e54d16e
parent 5149a216
...@@ -2473,6 +2473,7 @@ system.clustering.overview.incoming_servers=Incoming Servers ...@@ -2473,6 +2473,7 @@ system.clustering.overview.incoming_servers=Incoming Servers
system.clustering.overview.outgoing_servers=Outgoing Servers system.clustering.overview.outgoing_servers=Outgoing Servers
system.clustering.overview.memory=Memory system.clustering.overview.memory=Memory
system.clustering.not-available=Clustering not available system.clustering.not-available=Clustering not available
system.clustering.using-embedded-db=Clustering is not available when using an embedded database. You need to switch to an external database to use clustering.
system.clustering.not-installed=Clustering support was not found on the system. Install Openfire Enterprise to enable it. system.clustering.not-installed=Clustering support was not found on the system. Install Openfire Enterprise to enable it.
system.clustering.not-valid-license=Openfire Enterprise license is not valid for clustering. You need to update your license to enable clustering. system.clustering.not-valid-license=Openfire Enterprise license is not valid for clustering. You need to update your license to enable clustering.
system.clustering.starting=Clustering is being started. It may take up to 30 seconds to complete. Click {0}here{1} to refresh. system.clustering.starting=Clustering is being started. It may take up to 30 seconds to complete. Click {0}here{1} to refresh.
...@@ -2222,6 +2222,7 @@ system.clustering.overview.node=Nodos ...@@ -2222,6 +2222,7 @@ system.clustering.overview.node=Nodos
system.clustering.overview.outgoing_servers=Servidores Salientes system.clustering.overview.outgoing_servers=Servidores Salientes
system.clustering.title=Clustering system.clustering.title=Clustering
system.clustering.not-available=Clustering no esta disponible system.clustering.not-available=Clustering no esta disponible
system.clustering.using-embedded-db=Clustering no esta disponible cuando se utiliza la base de datos embebida. Necesita pasar a una base de datos externa para utilizar clustering.
system.clustering.not-installed=No se ha encontrado soporte para clustering en el sistema. Instale Openfire Corporativo para habilitarlo. system.clustering.not-installed=No se ha encontrado soporte para clustering en el sistema. Instale Openfire Corporativo para habilitarlo.
system.clustering.not-valid-license=La licencia de Openfire Corporativo no incluye clustering. Necesita actualizar su licencia para habilitar clustering. system.clustering.not-valid-license=La licencia de Openfire Corporativo no incluye clustering. Necesita actualizar su licencia para habilitar clustering.
system.clustering.starting=Clustering esta arrancando. Puede tardar hasta 30 segundos para completar. Haga clic {0}aqui{1} para refrescar. system.clustering.starting=Clustering esta arrancando. Puede tardar hasta 30 segundos para completar. Haga clic {0}aqui{1} para refrescar.
...@@ -12,13 +12,15 @@ ...@@ -12,13 +12,15 @@
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %> <%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
<%@ page import="org.jivesoftware.openfire.XMPPServer" <%@ page import="org.jivesoftware.database.DbConnectionManager"
errorPage="error.jsp" errorPage="error.jsp"
%> %>
<%@ page import="org.jivesoftware.openfire.XMPPServer" %>
<%@ page import="org.jivesoftware.openfire.cluster.ClusterManager" %> <%@ page import="org.jivesoftware.openfire.cluster.ClusterManager" %>
<%@ page import="org.jivesoftware.openfire.cluster.ClusterNodeInfo" %> <%@ page import="org.jivesoftware.openfire.cluster.ClusterNodeInfo" %>
<%@ page import="org.jivesoftware.openfire.cluster.GetBasicStatistics" %> <%@ page import="org.jivesoftware.openfire.cluster.GetBasicStatistics" %>
<%@ page import="org.jivesoftware.util.JiveGlobals" %> <%@ page import="org.jivesoftware.util.JiveGlobals" %>
<%@ page import="org.jivesoftware.util.Log" %>
<%@ page import="org.jivesoftware.util.ParamUtils" %> <%@ page import="org.jivesoftware.util.ParamUtils" %>
<%@ page import="org.jivesoftware.util.cache.CacheFactory" %> <%@ page import="org.jivesoftware.util.cache.CacheFactory" %>
<%@ page import="java.text.DecimalFormat" %> <%@ page import="java.text.DecimalFormat" %>
...@@ -26,7 +28,6 @@ ...@@ -26,7 +28,6 @@
<%@ page import="java.util.Collection" %> <%@ page import="java.util.Collection" %>
<%@ page import="java.util.Date" %> <%@ page import="java.util.Date" %>
<%@ page import="java.util.Map" %> <%@ page import="java.util.Map" %>
<%@ page import="org.jivesoftware.util.Log" %>
<html> <html>
<head> <head>
...@@ -49,17 +50,20 @@ ...@@ -49,17 +50,20 @@
if (!clusteringEnabled) { if (!clusteringEnabled) {
ClusterManager.setClusteringEnabled(false); ClusterManager.setClusteringEnabled(false);
updateSucess = true; updateSucess = true;
} else { }
else {
if (ClusterManager.isClusteringAvailable()) { if (ClusterManager.isClusteringAvailable()) {
ClusterManager.setClusteringEnabled(true); ClusterManager.setClusteringEnabled(true);
updateSucess = ClusterManager.isClusteringStarted(); updateSucess = ClusterManager.isClusteringStarted();
} else { }
else {
Log.error("Failed to enable clustering. Clustering is not installed."); Log.error("Failed to enable clustering. Clustering is not installed.");
} }
} }
} }
boolean clusteringAvailable = ClusterManager.isClusteringAvailable(); boolean usingEmbeddedDB = DbConnectionManager.getDatabaseType() == DbConnectionManager.DatabaseType.hsqldb;
boolean clusteringAvailable = !usingEmbeddedDB && ClusterManager.isClusteringAvailable();
boolean clusteringStarting = ClusterManager.isClusteringStarting(); boolean clusteringStarting = ClusterManager.isClusteringStarting();
int maxClusterNodes = ClusterManager.getMaxClusterNodes(); int maxClusterNodes = ClusterManager.getMaxClusterNodes();
clusteringEnabled = ClusterManager.isClusteringStarted() || ClusterManager.isClusteringStarting(); clusteringEnabled = ClusterManager.isClusteringStarted() || ClusterManager.isClusteringStarting();
...@@ -150,7 +154,9 @@ ...@@ -150,7 +154,9 @@
</td> </td>
</tr> </tr>
<td valign="top" align="left" colspan="2"> <td valign="top" align="left" colspan="2">
<% if (maxClusterNodes == 0) { %> <% if (usingEmbeddedDB) { %>
<span><fmt:message key="system.clustering.using-embedded-db"/></span>
<% } else if (maxClusterNodes == 0) { %>
<span><fmt:message key="system.clustering.not-installed"/></span> <span><fmt:message key="system.clustering.not-installed"/></span>
<% } else { %> <% } else { %>
<span><fmt:message key="system.clustering.not-valid-license"/></span> <span><fmt:message key="system.clustering.not-valid-license"/></span>
......
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