[cells-devel] [openair] web-app still :NASCENT after make-instance

Frank Goenninger frgo at mac.com
Wed Apr 16 19:24:22 UTC 2008


Ok, so I am still trying to find out why the handler slot of the web  
app is always NIL.

That's what I get after creating the instance with make-instance:

0>  72657 *** BINGO request !!! #<tbnl::request @ #x10cadc6a> "/ht- 
monitor" "/ht-monitor" openair::ht-monitor
0>  0 *** Entering page handling ...
0>  0 creating new web-app...
0>  0 ROOT =  web-app6
WEB-APP6 is an instance of #<STANDARD-CLASS OPENAIR::WEB-APP>:
The following slots have :INSTANCE allocation:
  .MD-STATE           :NASCENT
  .AWAKEN-ON-INIT-P   NIL
  .CELLS              ((OPENAIR::HANDLER . ) (OPENAIR::RESOURCE . )
                       (OPENAIR::UPDATES . ) (OPENAIR::MESSAGE . )
                       (OPENAIR::REQUEST . ) (CELLS:.KIDS . ))
  .CELLS-FLUSHED      NIL
  ADOPT-CT            0
  .MD-NAME            WEB-APP6
  .FM-PARENT          NIL
  .VALUE              NIL
  ZDBG                NIL
  .KID-SLOTS          NIL
  .KIDS               NIL
  PREFIX              "/ht-monitor"
  REQUEST             NIL
  MESSAGE             NIL
  UPDATES             NIL
  RESOURCE            NIL
  HANDLER             NIL

Now, as we can see, the .MD-STATE is :NASCENT - so Cell's machinery  
hasn't done its job conpletely yet...

Kenny, how can we force Cells to finish its business ?! Or is there  
any other way to do this?

Thanks for any help! (see below for the full function)

Best,
  Frank

-X- CODE -X-

(defun ht-monitor-page (prefix resource-class)
  (lambda (request)
    (trc "*** BINGO request !!!" request (script-name request) prefix  
resource-class)

    ;; New here: only go into the actual function if we are really  
meant ...
    (let ((mismatch (mismatch (script-name request) prefix
                              :test #'char=)))
      (and (or (null mismatch)
               (>= mismatch (length prefix)))
           (progn
             (trc "*** Entering page handling ...")
             (start-session)
             (let ((root (or (bwhen (r (session-value 'root))
                               (trc "clearing updates on re-used  
root!!!!!!!" r)
                               (with-integrity ()
                                 (setf (updates r) nil))
                               r)
                             (progn
                               (trc "creating new web-app...")
                               (mk-web-app (:prefix prefix
                                            :request (c-in nil))
                                 (make-instance
                                  resource-class
                                  :fm-parent *parent*))))))
               (trc "ROOT = " root)
               (describe root)
               (setf (session-value 'root) root)
               (setf (request root) request)
               (assert (handler root))
               (trc "Handler is: " (describe (handler root)))
               (handler root)))))))




More information about the cells-devel mailing list