Commit 71d36537 authored by (no author)'s avatar (no author)

This commit was manufactured by cvs2svn to create tag

'jive_messenger_2_1_4'.

git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/tags/jive_messenger_2_1_4@1476 b35dd754-fafc-0310-a699-88a17e54d16e
parent 3693743a
......@@ -68,19 +68,53 @@
Jive Messenger Changelog
</div>
<p>
<b>2.1.4</b> -- June 2, 2005
<p>
<h2>New Features</h2>
<ul>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-230'>JM-230</a>] - Added support for JID escaping, which helps with LDAP. <b>(1 vote)</b></li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-273'>JM-273</a>] - Added email service.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-280'>JM-280</a>] - Added support for discovering information about a user's bare JID address.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-287'>JM-287</a>] - Added French translation of the admin console.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-289'>JM-289</a>] - Added auto-refresh option to the session page. <b>(2 votes)</b></li>
</ul>
<h2>Bug Fixes</h2>
<ul>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-268'>JM-268</a>] - Improved drag and drop support in the launcher.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-269'>JM-269</a>] - Drag and drop installation of plugins was broken.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-270'>JM-270</a>] - Setting vCard data could fail.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-271'>JM-271</a>] - Fixed bug where adding a packet interceptor would cause IndexOutOfBoundsException</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-275'>JM-275</a>] - vCard properties can now be deleted.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-276'>JM-276</a>] - Fixed concurreny problem when user connected from more than one resource.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-277'>JM-277</a>] - Fixed concurreny problem managing properies of users and groups.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-278'>JM-278</a>] - The server now sends a stream:error conflict when a resource conflict exists.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-279'>JM-279</a>] - Sending a room invitation to an offline was closing the inviter's connection.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-282'>JM-282</a>] - Closing many connections concurrently could produce a deadlock in some circumstances.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-283'>JM-283</a>] - Group chat room creation now prevents invalid room IDs.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-284'>JM-284</a>] - Fixed concurreny problem managing directed presences.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-286'>JM-286</a>] - Fixed some words that were still hardcoded in English in the admin console.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-290'>JM-290</a>] - Invalid JIDs were not always being detected</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-293'>JM-293</a>] - The setup tool now enforces a min database connection pool size.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-297'>JM-297</a>] - Added logic to detect and forcibly shut down dead sockets.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-299'>JM-299</a>] - Fixed error loading room history when using MS-SQL.</li>
</ul>
<p>
<b>2.1.3</b> -- April 22, 2005
<p>
<h2>New Features</h2>
<ul>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-151'>JM-151</a>] - Added servlet support to plugins <b>(1 vote)</b>.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-151'>JM-151</a>] - Added servlet support to plugins. <b>(1 vote)</b></li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-196'>JM-196</a>] - Added support for drag and drop installation of plugins into the launcher.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-198'>JM-198</a>] - Java VM information and memory usage is now shown in the admin console.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-200'>JM-200</a>] - Addressed several bottlenecks in the server, increasing performance by several hundred percent.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-202'>JM-202</a>] - Improved performance by replacing StringBuffer with StringBuilder.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-203'>JM-203</a>] - Optimized login and authentication process.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-207'>JM-207</a>] - Added an "open permissions" mode to the broadcast plugin <b>(1 vote).</b></li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-207'>JM-207</a>] - Added an "open permissions" mode to the broadcast plugin. <b>(1 vote)</b></li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-209'>JM-209</a>] - Admin console ports can now be disabled.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-218'>JM-218</a>] - Added support for packet interceptors to the core API.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-223'>JM-223</a>] - The embedded http server can now filter the addresses allowed to connect.</li>
......@@ -95,7 +129,7 @@ Jive Messenger Changelog
<h2>Bug Fixes</h2>
<ul>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-189'>JM-189</a>] - LDAP users were able to log in with no password in some cases <b>(2 votes)</b>.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-189'>JM-189</a>] - LDAP users were able to log in with no password in some cases. <b>(2 votes)</b></li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-197'>JM-197</a>] - Some words in the admin tool weren't internationalized.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-205'>JM-205</a>] - User editing did not honor optional status of name/email fields.</li>
<li>[<a href='http://www.jivesoftware.org/issues/browse/JM-208'>JM-208</a>] - The redhat-postinstall.sh script had an extra 's'.</li>
......
This diff is collapsed.
......@@ -5,6 +5,7 @@
##
## Jive Messenger Resource Bundle - German locale (de)
## Translation by Frank Niedermann <fbn@thelogic.org>
## ae=\u00e4 / ue=\u00fc / oe=\u00f6 / Ue=\u00dc / Ae=\u00c4
##
## For a full changelog, refer to the English bundle, messenger_i18n_en.properties.
##
......@@ -31,6 +32,8 @@ tab.server.descr=Hier klicken um die Servereinstellungen zu verwalten
sidebar.server-logs.descr=Hier klicken um die Server-Logs anzuzeigen
sidebar.plugin-settings=Plugins
sidebar.plugin-settings.descr=Hier klicken um die Plugins anzuzeigen
sidebar.server-email=E-Mail Einstellungen
sidebar.server-email.descr=Hier klicken um die E-Mail Einstellungen zu konfigurieren
sidebar.sidebar-server-settings=Servereinstellungen
sidebar.server-reg-and-login=Registrierung &amp; Anmeldung
sidebar.server-reg-and-login.descr=Hier klicken um die Registrierungs- und Anmeldungsrichtlinien zu bearbeiten
......@@ -252,6 +255,10 @@ global.restore_defaults=Vorgaben wiederherstellen
global.add=Hinzuf\u00fcgen
global.logout=Abmelden
global.main=Hauptseite
global.continue=Fortfahren
global.none=Kein
global.refresh=Aktualisieren
global.seconds=Sekunden
# Group Chat Service Properties Page
......@@ -795,6 +802,8 @@ server.props.property=Servereigenschaften
server.props.name=Servername:
server.props.valid_hostname=Bitte einen g\u00fcltigen Hostnamen f\u00fcr den Server eingeben oder
server.props.valid_hostname1=den vorgegebenen zur\u00fccksetzen
server.props.server_port=Server-zu-Server-Port:
server.props.component_port=Komponenten-Port:
server.props.port=Port:
server.props.valid_port=Bitte eine g\u00fcltige Portnummer eingeben oder
server.props.valid_port1=die vorgegebene zur\u00fccksetzen
......@@ -876,6 +885,7 @@ session.details.if_presence=Pr\u00e4senz (wenn authentifiziert)
session.details.clientip=Client-IP
session.details.close_connect=Verbindung schliessen
session.details.session_detail=Aktuelle Sitzungsdetails oben.
session.details.back_button=Zur\u00fcck zur \u00dcbersicht
# Session filter Page
......@@ -903,6 +913,40 @@ session.summary.page=Seiten
session.summary.info=Unten ist eine Liste der Sitzungen auf diesem Server.
session.summary.not_session=Keine Sitzungen
session.summary.last_update=Liste zuletzt aktualisiert
session.summary.sessions_per_page=Sitzungen pro Seite
# Server Session summary Page
server.session.summary.title=\u00dcbersicht Serversitzungen
server.session.summary.close=Sitzung erfolgreich geschlossen.
server.session.summary.active=Verbundene entfernte Server
server.session.summary.showing=Angezeigt
server.session.summary.page=Seiten
server.session.summary.info=Unten ist eine Liste der Sitzungen f\u00fcr das Senden und Empfangen von Paketen \
zu/von entfernten Servern. Server-zu-Server Kommunikation ben\u00f6tigt zwei unabh\u00e4ngige Verbindungen. \
Eine wird zum Empfangen von Paketen und die andere f\u00fcr das Senden von Paketen benutzt.
server.session.summary.not_session=Keine Sitzungen
server.session.summary.last_update=Liste zuletzt aktualisiert
server.session.label.host=Host
server.session.label.connection=Verbindung
server.session.label.creation=Erstellungsdatum
server.session.label.last_active=Letzte Aktivit\u00e4t
server.session.label.close_connect=Sitzung schliessen
server.session.connection.incoming=Eingehend
server.session.connection.outgoing=Ausgehend
server.session.connection.both=Beides
server.session.summary.sessions_per_page=Sitzungen pro Seite
# Server Session details Page
server.session.details.title=Verbindungsdetails zum entfernten Servers
server.session.details.info=Unten sind die Details zu den Sitzungen zum entfernten Server {0}.
server.session.details.hostname=IP-Adresse des entfernten Servers / Hostname:
server.session.details.incoming_session=Details eingehender Sitzungen
server.session.details.streamid=Stream-ID
server.session.details.incoming_statistics=Statistiken (Pakete empfangen)
server.session.details.outgoing_session=Details ausgehender Sitzungen
server.session.details.outgoing_statistics=Statistiken (Pakete gesendet)
# General Setup
......@@ -929,6 +973,7 @@ setup.admin.settings.valid_new_password=Bitte ein g\u00fcltiges neues Passwort e
setup.admin.settings.not_new_password=Die neuen Passw\u00f6rter stimmen nicht \u00fcberein.
setup.admin.settings.confirm_password=Passwort best\u00e4tigen:
setup.admin.settings.valid_confirm=Bitte ein g\u00fcltiges neues Passwort zur Best\u00e4tigung eingeben.
setup.admin.settings.skip_this_step=Diesen Schritt \u00fcberspringen
# Setup completed Page
......@@ -971,6 +1016,7 @@ setup.datasource.settings.embedded_info=Eine eingebaute Datenbank benutzen, unte
# Setup datasource standard Page
setup.datasource.standard.title=Einstellungen f\u00fcr die Datenquellen - Standard-Verbindung
setup.datasource.standard.label=Voreinstellungen des Datenbanktreibers
setup.datasource.standard.info=Einen JDBC-Treiber und die Verbindungseinstellungen angeben um zur \
Datenbank eine Verbindung aufzubauen. Wenn mehr Informationen zu diesem Vorgang ben\u00f6tigt werden \
bitte die Datenbankdokumentation konsultieren die mitgeliefert wird.
......@@ -1027,6 +1073,7 @@ setup.host.settings.secure=Aktiviert oder deaktiviert sichere XMPP-Verbindungen.
# Setup index Page
setup.index.title=Auswahl der Sprache
setup.index.choose_lang=Sprache ausw\u00e4hlen
setup.index.info=Wilkommen zum {0} Setup. Dieses Werkzeug wird durch das initiale Setup oder \
den Update-Prozess f\u00fchren. Bevor fortgefahren wird bitte eine Sprache f\u00fcr das System \
ausw\u00e4hlen oder die vorgegebene Sprache Englisch verwenden.
......@@ -1055,6 +1102,10 @@ setup.pause.close=Fenster schliessen
# Setup sidebar Page
setup.sidebar.title=Setup-Fortschritt
setup.sidebar.language=Sprachauswahl
setup.sidebar.settings=Servereinstellungen
setup.sidebar.datasource=Datenquelle-Einstellungen
setup.sidebar.admin=Administratorenkonto
# SSL settings Page
......@@ -1222,3 +1273,46 @@ plugin.admin.no_plugin=Keine Plugins installiert.
plugin.admin.click_edit=Hier klicken zum Bearbeiten ...
plugin.admin.click_delete=Hier klicken zum L\u00f6schen ...
plugin.admin.confirm=Plugin l\u00f6schen?
# System Email
system.email.title=E-Mail Einstellungen
system.email.info=Das Formular unten benutzen um den Anbieter (Host) und Port des E-Mail Servers (SMTP) zu setzen \
Es sollte mindestens der Hostname angegeben werden. Port, Benutzername und Passwort sowie die Einstellung \
zu SSL sind optional. Wenn Schwierigkeiten beim Senden von E-Mails auftreten bitte die SMTP-Konfiguration \
auf dem E-Mailserver pr\u00fcfen. Anmerkung: Wenn E-Mail Debugging aktiviert ist wird die Debug-Ausgabe \
auf die Standard-Ausgabe des Applikationsservers geschrieben.
system.email.update_success=SMTP-Einstellungen erfolgreich aktualisiert.
system.email.update_failure=Ein Fehler ist aufgetreten. Bitte pr\u00fcfen ob alle ben\u00f6tigten Felder korrekt ausgef\u00fcllt sind und nochmals versuchen.
system.email.name=SMTP-Einstellungen
system.email.mail_host=Mail-Anbieter (Host)
system.email.restart_possible=kann einen Neustart des Applikationsservers ben\u00f6tigen
system.email.valid_host_name=Bitte einen g\u00fcltigen Hostnamen eingeben.
system.email.server_port=Port des Servers (optional)
system.email.mail_debugging=E-Mail Debugging
system.email.server_username=Server Benutzername (optional)
system.email.server_password=Server Passwort (optional)
system.email.ssl=SSL benutzen (optional)
system.email.save=\u00c4nderungen speichern
system.email.send_test=Test E-Mail senden...
system.emailtest.title=E-Mail Einstellungen
system.emailtest.info=Das Formular unten benutzen um eine Test-Nachricht zu senden. Per Default wird die Absendeadresse \
die des Administrators sein.
system.emailtest.no_host=Fehler, das Senden einer E-Mail wird fehlschlagen weil der Hostname des E-Mail Servers nicht \
gesetzt ist. Bitte zur\u00fcck zu der Seite{1} {0}Mail-Einstellungengehen und den Host eintragen.
system.emailtest.success=Nachricht wurde erfolgreich versendet. Bitte pr\u00fcfen ob die Nachricht im Empf\u00e4nger-Mailkonto angekommen ist.
system.emailtest.failure=Versenden der Nachricht ist fehlgeschlagen. Bitte pr\u00fcfen ob die Host und Port Einstellungen korrekt sind.
system.emailtest.failure_authentication=Authentifizierung am SMTP-Server ist fehlgeschlagen - bitte sicherstellen dass \
Benutzername und Passwort korrekt sind oder dass sich anonyme "Gast"-Benutzer anmelden und E-Mails versenden k\u00f6nnen.
system.emailtest.mail_server=E-Mail Server
system.emailtest.host_not_set=Nicht gesetzt
system.emailtest.ssl=SSL
system.emailtest.username=Benutzername
system.emailtest.from=Absender
system.emailtest.to=Empf\u00e4nger
system.emailtest.subject=Betreff
system.emailtest.body=Inhalt
system.emailtest.send=Senden
system.emailtest.cancel=Abbrechen/Zur\u00fcck
......@@ -45,6 +45,7 @@
## 2.1.4
## Added key: 'admin.console.warning'
## Added key: 'admin.console.listening'
## Added key: 'global.continue'
## Added key: 'login.login'
## Added key: 'logviewer.none'
## Added key: 'logviewer.log_dir'
......@@ -55,13 +56,17 @@
## Added key: 'offline.messages.store_option'
## Added key: 'server.props.ssl_port'
## Added key: 'session.details.back_button'
## Added key: 'session.summary.sessions_per_page'
## Added key: 'setup.admin.settings.skip_this_step'
## Added key: 'setup.index.choose_lang'
## Added key: 'setup.datasource.standard.label'
## Added key: 'setup.sidebar.language'
## Added key: 'setup.sidebar.settings'
## Added key: 'setup.sidebar.datasource'
## Added key: 'setup.sidebar.admin'
## Added key: 'sidebar.server-email'
## Added key: 'sidebar.server-email.descr'
## Added sections: 'system.email.*' and 'system.emailtext.*'
## Added sections: 'system.email.*' and 'system.emailtest.*'
## Removed duplicate key: 'groupchat.service.properties.error_service_name'
## Removed duplicate key: 'logviewer.clear'
## Removed duplicate key: 'session.details.unknown'
......@@ -174,6 +179,8 @@ startup.starting.chat=Chat domain: {0}
startup.starting.muc=Multi User Chat domain: {0}
startup.caches=Initializing caches
startup.channels=Initializing channels
startup.server=Started server (unencrypted) socket on port: {0}
startup.component=Started component (unencrypted) socket on port: {0}
startup.plain=Started plain (unencrypted) socket on port: {0}
startup.ssl=Started SSL (encrypted) socket on port: {0}
startup.error=Error starting the server. Please check the log files for more information.
......@@ -314,6 +321,10 @@ global.restore_defaults=Restore Defaults
global.add=Add
global.logout=Logout
global.main=Main
global.continue=Continue
global.none=None
global.refresh=Refresh
global.seconds=seconds
# Group Chat Service Properties Page
......@@ -961,6 +972,40 @@ session.summary.page=Pages
session.summary.info=Below is a list of sessions on this server.
session.summary.not_session=No Sessions
session.summary.last_update=List last updated
session.summary.sessions_per_page=Sessions per page
# Server Session summary Page
server.session.summary.title=Server Sessions Summary
server.session.summary.close=Session closed successfully.
server.session.summary.active=Connected Remote Servers
server.session.summary.showing=Showing
server.session.summary.page=Pages
server.session.summary.info=Below is a list of sessions for sending and receiving packets to/from \
remote servers. Server-to-server communication requires two independent connections. One \
is used for receiving packets whilst the other for sending packets.
server.session.summary.not_session=No Sessions
server.session.summary.last_update=List last updated
server.session.label.host=Host
server.session.label.connection=Connection
server.session.label.creation=Creation Date
server.session.label.last_active=Last Activity
server.session.label.close_connect=Close Connection
server.session.connection.incoming=Incoming
server.session.connection.outgoing=Outgoing
server.session.connection.both=Both
server.session.summary.sessions_per_page=Sessions per page
# Server Session details Page
server.session.details.title=Remote Server Connections Details
server.session.details.info=Below are details about the sessions with the remote server {0}.
server.session.details.hostname=Remote server IP / Hostname:
server.session.details.incoming_session=Incoming Session Details
server.session.details.streamid=Stream ID
server.session.details.incoming_statistics=Statistics (Packets Received)
server.session.details.outgoing_session=Outgoing Session Details
server.session.details.outgoing_statistics=Statistics (Packets Sent)
# General Setup
......@@ -986,6 +1031,7 @@ setup.admin.settings.valid_new_password=Please enter a valid new password.
setup.admin.settings.not_new_password=The new passwords do not match.
setup.admin.settings.confirm_password=Confirm Password:
setup.admin.settings.valid_confirm=Please enter a valid new confirmation password.
setup.admin.settings.skip_this_step=Skip This Step
# Setup completed Page
......@@ -1026,6 +1072,7 @@ setup.datasource.settings.embedded_info=Use an embedded database, powered by HSQ
# Setup datasource standard Page
setup.datasource.standard.title=Datasource Settings - Standard Connection
setup.datasource.standard.label=Database Driver Presets
setup.datasource.standard.info=Specify a JDBC driver and connection properties to connect to your \
database. If you need more information about this process please see the database documentation \
distributed with
......@@ -1084,6 +1131,7 @@ setup.host.settings.secure=Enables or disables secure XMPP connections.
# Setup index Page
setup.index.title=Language Selection
setup.index.choose_lang=Choose Language
setup.index.info=Welcome to {0} Setup. This tool will lead you through the initial setup or \
upgrade process. Before you continue, choose a language for the system or use the default of English.
setup.index.success=Success
......@@ -1309,7 +1357,7 @@ system.email.send_test=Send Test Email...
system.emailtest.title=Email Settings
system.emailtest.info=Use the form below to send a test message. By default, the senders email address will \
be tha of the admin user.
be that of the admin user.
system.emailtest.no_host=Error, sending an email will fail because the mail server host is not set. Please \
go back to the {0}mail settings page{1} and set the mail host.
system.emailtest.success=Message was sent successfully. Verify it was sent by checking the mail account you \
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -172,6 +172,10 @@ public class SessionManager extends BasicModule {
* @param priority The new priority for the session
*/
public void changePriority(JID sender, int priority) {
if (sender.getNode() == null) {
// Do nothing if the session belongs to an anonymous user
return;
}
String resource = sender.getResource();
if (resources.containsKey(resource)) {
synchronized (priorityList) {
......
......@@ -42,7 +42,7 @@ import java.util.Hashtable;
* <li>ldap.searchFilter -- the filter used to load the list of users. The
* default value is in the form "([usernameField]={0})" where [usernameField]
* is the value of ldap.usernameField.
* <li>ldap.ldapDebugEnabled</li>
* <li>ldap.debugEnabled</li>
* <li>ldap.sslEnabled</li>
* <li>ldap.autoFollowReferrals</li>
* <li>ldap.initialContextFactory -- if this value is not specified,
......@@ -127,7 +127,7 @@ public class LdapManager {
}
this.adminPassword = JiveGlobals.getXMLProperty("ldap.adminPassword");
this.ldapDebugEnabled = Boolean.valueOf(JiveGlobals.getXMLProperty(
"ldap.ldapDebugEnabled")).booleanValue();
"ldap.debugEnabled")).booleanValue();
this.sslEnabled = Boolean.valueOf(JiveGlobals.getXMLProperty(
"ldap.sslEnabled")).booleanValue();
this.followReferrals = Boolean.valueOf(JiveGlobals.getXMLProperty(
......@@ -260,12 +260,15 @@ public class LdapManager {
env.put(Context.INITIAL_CONTEXT_FACTORY, initialContextFactory);
env.put(Context.PROVIDER_URL, getProviderURL(baseDN));
if (sslEnabled) {
env.put("java.naming.ldap.factory.socket", "org.jivesoftware.util.SimpleSSLSocketFactory");
env.put("java.naming.ldap.factory.socket",
"org.jivesoftware.util.SimpleSSLSocketFactory");
env.put(Context.SECURITY_PROTOCOL, "ssl");
}
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, userDN + "," + baseDN);
env.put(Context.SECURITY_CREDENTIALS, password);
// Specify timeout to be 10 seconds
env.put("com.sun.jndi.ldap.connect.timeout", "10000");
if (ldapDebugEnabled) {
env.put("com.sun.jndi.ldap.trace.ber", System.err);
}
......@@ -295,6 +298,8 @@ public class LdapManager {
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, userDN + "," + alternateBaseDN);
env.put(Context.SECURITY_CREDENTIALS, password);
// Specify timeout to be 10 seconds
env.put("com.sun.jndi.ldap.connect.timeout", "10000");
if (ldapDebugEnabled) {
env.put("com.sun.jndi.ldap.trace.ber", System.err);
}
......@@ -404,7 +409,8 @@ public class LdapManager {
constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
constraints.setReturningAttributes(new String[] { usernameField });
NamingEnumeration answer = ctx.search("", searchFilter, new String[] {username}, constraints);
NamingEnumeration answer = ctx.search("", searchFilter, new String[] {username},
constraints);
if (debug) {
Log.debug("... search finished");
......
......@@ -199,12 +199,16 @@ public class MUCPersistenceManager {
pstmt.setLong(2, room.getID());
rs = pstmt.executeQuery();
while (rs.next()) {
String senderJID = rs.getString(1);
String nickname = rs.getString(2);
Date sentDate = new Date(Long.parseLong(rs.getString(3).trim()));
String subject = rs.getString(4);
String body = rs.getString(5);
// Recreate the history only for the rooms that have the conversation logging
// enabled
if (room.isLogEnabled()) {
room.getRoomHistory().addOldMessage(rs.getString(1), rs.getString(2), sentDate,
rs.getString(4), rs.getString(5));
room.getRoomHistory().addOldMessage(senderJID, nickname, sentDate, subject,
body);
}
}
rs.close();
......@@ -466,13 +470,17 @@ public class MUCPersistenceManager {
if (room == null) {
continue;
}
String senderJID = rs.getString(2);
String nickname = rs.getString(3);
Date sentDate = new Date(Long.parseLong(rs.getString(4).trim()));
String subject = rs.getString(5);
String body = rs.getString(6);
try {
// Recreate the history only for the rooms that have the conversation logging
// enabled
if (room.isLogEnabled()) {
room.getRoomHistory().addOldMessage(rs.getString(2), rs.getString(3),
sentDate, rs.getString(5), rs.getString(6));
room.getRoomHistory().addOldMessage(senderJID, nickname, sentDate, subject,
body);
}
}
catch (Exception e) {
......
......@@ -203,6 +203,9 @@ public class MUCRoleImpl implements MUCRole {
}
public void send(Packet packet) {
if (packet == null) {
return;
}
packet.setTo(user.getAddress());
router.route(packet);
}
......
......@@ -88,6 +88,8 @@ public class SocketConnection implements Connection {
}
try {
synchronized (writer) {
// Register that we started sending data on the connection
SocketSendingTracker.getInstance().socketStartedSending(socket);
writer.write(" ");
writer.flush();
}
......@@ -96,6 +98,10 @@ public class SocketConnection implements Connection {
Log.warn("Closing no longer valid connection" + "\n" + this.toString(), e);
close();
}
finally {
// Register that we finished sending data on the connection
SocketSendingTracker.getInstance().socketFinishedSending(socket);
}
return !isClosed();
}
......@@ -197,6 +203,8 @@ public class SocketConnection implements Connection {
}
synchronized (writer) {
try {
// Register that we started sending data on the connection
SocketSendingTracker.getInstance().socketStartedSending(socket);
writer.write("</stream:stream>");
if (flashClient) {
writer.write('\0');
......@@ -204,6 +212,10 @@ public class SocketConnection implements Connection {
xmlSerializer.flush();
}
catch (IOException e) {}
finally {
// Register that we finished sending data on the connection
SocketSendingTracker.getInstance().socketFinishedSending(socket);
}
}
}
catch (Exception e) {
......@@ -236,6 +248,8 @@ public class SocketConnection implements Connection {
boolean errorDelivering = false;
synchronized (writer) {
try {
// Register that we started sending data on the connection
SocketSendingTracker.getInstance().socketStartedSending(socket);
xmlSerializer.write(packet.getElement());
if (flashClient) {
writer.write('\0');
......@@ -246,6 +260,10 @@ public class SocketConnection implements Connection {
Log.debug("Error delivering packet" + "\n" + this.toString(), e);
errorDelivering = true;
}
finally {
// Register that we finished sending data on the connection
SocketSendingTracker.getInstance().socketFinishedSending(socket);
}
}
if (errorDelivering) {
close();
......
package org.jivesoftware.messenger.net;
import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.util.Log;
import java.io.IOException;
import java.net.Socket;
import java.util.Date;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* A SocketSendingTracker keeps track of all the sockets that are currently sending data and
* checks the health of the sockets to detect hanged connections. If a sending operation takes
* too much time (i.e. exceeds a time limit) then it is assumed that the connection has been
* lost and for some reason the JVM has not been notified of the dead connection. Once a dead
* connection has been detected it will be closed so that the thread that was writing to the
* socket can resume. Resuming locked threads is important since otherwise a complete system halt
* may occur.<p>
*
* The time limit to wait before considering a connection dead can be configured changing the
* property <b>xmpp.session.sending-limit</b>. If the property was not defined then a default
* time limit of 60 seconds will be assumed. This means that by default if a sending operation
* takes longer than 60 seconds then the connection will be closed and the client disconnected.
* Therefore, it is important to not set a very low time limit since active clients may be
* incorrectly considered as dead clients.
*
* @author Gaston Dombiak
*/
public class SocketSendingTracker {
private static SocketSendingTracker instance = new SocketSendingTracker();
/**
* Map that holds the sockets that are currently sending information together with the date
* when the sending operation started.
*/
private Map<Socket, Date> sockets = new ConcurrentHashMap<Socket, Date>();
/**
* Flag that indicates if the tracket should shutdown the tracking process.
*/
private boolean shutdown = false;
/**
* Thread used for checking periodically the health of the sockets involved in sending
* operations.
*/
private Thread checkingThread;
/**
* Returns the unique instance of this class.
*
* @return the unique instance of this class.
*/
public static SocketSendingTracker getInstance() {
return instance;
}
/**
* Hide the constructor so that only one instance of this class can exist.
*/
private SocketSendingTracker() {
}
/**
* Register that the specified socket has started sending information. The registration will
* include the timestamp when the sending operation started so that if after several minutes
* it hasn't finished then the socket will be closed.
*
* @param socket the socket that started sending data.
*/
public void socketStartedSending(Socket socket) {
sockets.put(socket, new Date());
}
/**
* Register that the specified socket has finished sending information. The socket will
* be removed from the tracking list.
*
* @param socket the socket that finished sending data.
*/
public void socketFinishedSending(Socket socket) {
sockets.remove(socket);
}
/**
* Start up the daemon thread that will check for the health of the sockets that are
* currently sending data.
*/
public void start() {
shutdown = false;
checkingThread = new Thread("SocketSendingTracker") {
public void run() {
while (!shutdown) {
checkHealth();
synchronized (this) {
try {
wait(10000);
}
catch (InterruptedException e) {
}
}
}
}
};
checkingThread.setDaemon(true);
checkingThread.start();
}
/**
* Indicates that the checking thread should be stoped. The thread will be waked up
* so that it can be stoped.
*/
public void shutdown() {
shutdown = true;
// Use a wait/notify algorithm to ensure that the thread stops immediately if it
// was waiting
synchronized (checkingThread) {
checkingThread.notify();
}
}
/**
* Checks if a socket has been trying to send data for a given amount of time. If it has
* exceded a limit of time then the socket will be closed.<p>
*
* It is expected that sending operations will not take too much time so the checking will
* be very fast since very few sockets will be present in the Map and most or all of them
* will not exceed the time limit. Therefore, it is expected the overhead of this class to be
* quite small.
*/
private void checkHealth() {
for (Socket socket : sockets.keySet()) {
Date startDate = sockets.get(socket);
if (startDate != null &&
System.currentTimeMillis() - startDate.getTime() >
JiveGlobals.getIntProperty("xmpp.session.sending-limit", 60000)) {
// Check that the sending operation is still active
if (sockets.get(socket) != null) {
// Close the socket
try {
Log.debug("Closing socket: " + socket + " that started sending data at: " +
startDate);
socket.close();
}
catch (IOException e) {
Log.error("Error closing socket", e);
}
finally {
// Remove tracking on this socket
sockets.remove(socket);
}
}
}
}
}
}
......@@ -13,10 +13,7 @@ package org.jivesoftware.messenger.spi;
import org.jivesoftware.messenger.*;
import org.jivesoftware.messenger.container.BasicModule;
import org.jivesoftware.messenger.net.SSLSocketAcceptThread;
import org.jivesoftware.messenger.net.SocketAcceptThread;
import org.jivesoftware.messenger.net.SocketConnection;
import org.jivesoftware.messenger.net.SocketReadThread;
import org.jivesoftware.messenger.net.*;
import org.jivesoftware.util.LocaleUtils;
import org.jivesoftware.util.Log;
import org.jivesoftware.util.JiveGlobals;
......@@ -150,6 +147,7 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana
isStarted = true;
serverName = server.getServerInfo().getName();
createSocket();
SocketSendingTracker.getInstance().start();
}
public void stop() {
......@@ -162,6 +160,7 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana
sslSocketThread.shutdown();
sslSocketThread = null;
}
SocketSendingTracker.getInstance().shutdown();
serverName = null;
}
}
......@@ -21,12 +21,22 @@
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
<%!
static final String NONE = LocaleUtils.getLocalizedString("logviewer.none");
final int DEFAULT_RANGE = 15;
final int[] RANGE_PRESETS = {15, 25, 50, 75, 100};
static final String[] REFRESHES = {NONE,"10","30","60","90"};
%>
<jsp:useBean id="admin" class="org.jivesoftware.util.WebManager" />
<% admin.init(request, response, session, application, out ); %>
<% // Get parameters
int start = ParamUtils.getIntParameter(request,"start",0);
int range = ParamUtils.getIntParameter(request,"range",15);
int range = ParamUtils.getIntParameter(request,"range",DEFAULT_RANGE);
int refresh = ParamUtils.getIntParameter(request,"refresh",10);
String refreshParam = ParamUtils.getParameter(request,"refresh");
boolean close = ParamUtils.getBooleanParameter(request,"close");
String jid = ParamUtils.getParameter(request,"jid");
......@@ -69,6 +79,12 @@
<jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" />
<% if (refreshParam != null && !NONE.equals(refreshParam)) { %>
<meta http-equiv="refresh" content="<%= refresh %>">
<% } %>
<% if ("success".equals(request.getParameter("close"))) { %>
<p class="jive-success-text">
......@@ -77,16 +93,20 @@
<% } %>
<fmt:message key="session.summary.active" />: <b><%= sessionCount %></b>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tbody>
<form action="session-summary.jsp" method="get">
<tr valign="top">
<td width="99%">
<fmt:message key="session.summary.active" />: <b><%= sessionCount %></b>
<% if (numPages > 1) { %>
<% if (numPages > 1) { %>
- <fmt:message key="session.summary.showing" /> <%= (start+1) %>-<%= (start+range) %>
<% } %>
</p>
<% } %>
<% if (numPages > 1) { %>
<% if (numPages > 1) { %>
<p>
<fmt:message key="session.summary.page" />:
......@@ -101,9 +121,37 @@
<% } %>
]
</p>
<% } %>
<% } %>
- <fmt:message key="session.summary.sessions_per_page" />:
<select size="1" name="range" onchange="this.form.submit();">
<% for (int i=0; i<RANGE_PRESETS.length; i++) { %>
<option value="<%= RANGE_PRESETS[i] %>"<%= (RANGE_PRESETS[i] == range ? "selected" : "") %>><%= RANGE_PRESETS[i] %></option>
<% } %>
</select>
</td>
<td width="1%" nowrap>
<fmt:message key="logviewer.refresh" />
<select size="1" name="refresh" onchange="this.form.submit();">
<% for (int j=0; j<REFRESHES.length; j++) {
String selected = REFRESHES[j].equals(refreshParam)?" selected":"";
%>
<option value="<%= REFRESHES[j] %>"<%= selected %>><%= REFRESHES[j] %>
<% } %>
</select>
(<fmt:message key="logviewer.seconds" />)
</td>
</tr>
</form>
</tbody>
</table>
<br>
<p>
<fmt:message key="session.summary.info" />
......
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