Class PubSubSubscriptionMaintenanceServlet

java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.jivesoftware.admin.servlet.PubSubSubscriptionMaintenanceServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

@WebServlet("/pubsub-subscription-maintenance.jsp") public class PubSubSubscriptionMaintenanceServlet extends javax.servlet.http.HttpServlet
Servlet for cleaning up redundant rows in the ofPubsubSubscription table. Some installations have accumulated very large numbers of redundant subscription rows (rows that share the same node, subscription JID, owner and subscription type, differing only by their generated subscription ID). On services that do not permit multiple subscriptions for the same subscription JID - most notably PEP services - such rows carry no functional value and, in extreme cases, exhaust the Java heap when loaded into memory (OF-3306). This servlet provides an admin-console UI to analyze the extent of the redundancy and to launch a cleanup. The cleanup runs on a background thread (it may delete millions of rows over several minutes); the page polls a small JSON progress endpoint to render a live progress bar. The structure deliberately follows BlowfishMigrationServlet: a servlet bound to one URL forwards to a separate view JSP (a different filename, to avoid a forward loop), CSRF is carried in a cookie and validated on POST, a destructive action is gated behind explicit backup confirmation, the operation is blocked in unsafe clustering states, and POST-Redirect-GET is used with messages parked in the session.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
     
    protected void
    doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
     

    Methods inherited from class javax.servlet.http.HttpServlet

    doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service

    Methods inherited from class javax.servlet.GenericServlet

    destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PubSubSubscriptionMaintenanceServlet

      public PubSubSubscriptionMaintenanceServlet()
  • Method Details

    • doGet

      protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
      Overrides:
      doGet in class javax.servlet.http.HttpServlet
      Throws:
      javax.servlet.ServletException
      IOException
    • doPost

      protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
      Overrides:
      doPost in class javax.servlet.http.HttpServlet
      Throws:
      javax.servlet.ServletException
      IOException