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)))))))
On Wed, Apr 16, 2008 at 9:24 PM, Frank Goenninger frgo@mac.com wrote:
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:
That should work. Back in the day we had to call to-be on a new instance, but integrity-handling managed to eliminate that (or I just got smarter).
What happens is that even with an apparent raw make-instance there is a check (in the shared-initialize method on model-object) to see if integrity is being managed and if not the old to-be handling gets invoked. If it isbeing managed md-awaken gets kicked off by the handling of "owned" slots (formerly special-case handled for the kids slot).
What can stop this from happening is testing without calling cells-reset after a crash during which the *stop* (*c-stop*?) special gets set to t.
Assuming that is not the case, all you can do is cut=paste the shared-init to make a custom copy specialized on web-app and add a kazillion print statements.
In desperation, bounce your Lisp and start afresh as a sanity check. We have been banging on Cells internals lately, maybe something is broken.
kt