Uploaded image for project: 'Immutant'
  1. Immutant
  2. IMMUTANT-311

Immutant web loses track of registered handlers after (require ... :reload-all)

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.0.0.Beta2, 1.0.0.cr1
    • Fix Version/s: 1.0.0
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      (web/start "/" some-handler)
      (require '[namespace-with-ref-to-immutant.web] :reload-all)
      (web/stop "/") ;; log message: WARN [immutant.web.internal] (MSC service thread 1-5) Attempted to deregister request handler at sub-context path: /* , but none found
      (web/start "/" another-handler) ;; exception: IllegalArgumentException JBWEB000250: Child container with name immutant.ring.this-app./* already exists org.apache.catalina.core.ContainerBase.addChildInternal (ContainerBase.java:794)

      ;; the (require ... :reload-all) replaces the contents of immutant.web.internal/servlet-info with an empty map.

      Show
      (web/start "/" some-handler) (require ' [namespace-with-ref-to-immutant.web] :reload-all) (web/stop "/") ;; log message: WARN [immutant.web.internal] (MSC service thread 1-5) Attempted to deregister request handler at sub-context path: /* , but none found (web/start "/" another-handler) ;; exception: IllegalArgumentException JBWEB000250: Child container with name immutant.ring.this-app./* already exists org.apache.catalina.core.ContainerBase.addChildInternal (ContainerBase.java:794) ;; the (require ... :reload-all) replaces the contents of immutant.web.internal/servlet-info with an empty map.

      Description

      Using a (require ... :reload-all) on a namespace that refers to immutant.web can get immutant into a state where it can't unregister ring handlers. It forgets about all registered handlers, says they don't exist in calls to web/stop, but subsequent calls to web/start will throw an exception.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                tcrawley Toby Crawley
                Reporter:
                mgaare Michael Gaare
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: