sknowlton
05/11/2022, 4:45 PMonRequestStart()
the app gets. Sometimes it races ahead of Coldbox bootstrapping and so Wirebox and Coldbox are there but they're not done loading modules. What's the easiest way to say 'hey Coldbox, are you totally done loading everything?' or should we just set some app scope variable in afterAspectsLoaded()
or someplace like thatbdw429s
05/11/2022, 4:46 PMonApplicationStart()
, it should be impossible for any onRequest()
calls to happen until the application is up.sknowlton
05/11/2022, 4:48 PMbdw429s
05/11/2022, 4:48 PMsknowlton
05/11/2022, 4:49 PMbdw429s
05/11/2022, 4:49 PMsknowlton
05/11/2022, 4:50 PMOR] runwar.context: lucee.runtime.exp.ExpressionException: key [cbController] doesn't exist
at lucee.runtime.type.util.StructSupport.invalidKey(StructSupport.java:67)
at lucee.runtime.type.StructImpl.get(StructImpl.java:139)
at coldbox.system.bootstrap_cfc$cf.udfCall1(/coldbox/system/Bootstrap.cfc:557)
at coldbox.system.bootstrap_cfc$cf.udfCall(/coldbox/system/Bootstrap.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:112)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:350)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:223)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:697)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:585)
at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1932)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:787)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1762)
at application_cfc$cf.udfCall(/Application.cfc:412)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:112)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:350)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:223)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:697)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:585)
at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1932)
at lucee.runtime.listener.ModernAppListener.call(ModernAppListener.java:444)
at lucee.runtime.listener.ModernAppListener.onSessionStart(ModernAppListener.java:345)
at lucee.runtime.PageContextImpl.initApplicationContext(PageContextImpl.java:3182)
at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:122)
at lucee.runtime.listener.ModernAppListener.onRequest(ModernAppListener.java:107)
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2475)
at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2465)
at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2436)
at lucee.runtime.engine.Request.exe(Request.java:45)
at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1194)
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1140)
at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:97)
at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
at org.cfmlprojects.regexpathinfofilter.RegexPathInfoFilter.doFilter(RegexPathInfoFilter.java:47)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:257)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:182)
at io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(RequestDispatcherImpl.java:225)
at io.undertow.servlet.spec.RequestDispatcherImpl.forwardImplSetup(RequestDispatcherImpl.java:147)
at io.undertow.servlet.spec.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:110)
at org.cfmlprojects.regexpathinfofilter.RegexPathInfoFilter.doFilter(RegexPathInfoFilter.java:45)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:257)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:182)
at io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(RequestDispatcherImpl.java:225)
at io.undertow.servlet.spec.RequestDispatcherImpl.forwardImplSetup(RequestDispatcherImpl.java:147)
at io.undertow.servlet.spec.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:110)
at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:215)
at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:171)
at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:405)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:117)
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.SendErrorPageHandler.handleRequest(SendErrorPageHandler.java:52)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:275)
at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:79)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:134)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:131)
at io.undertow.servlet.core.Serv
bdw429s
05/11/2022, 4:50 PMsknowlton
05/11/2022, 4:50 PMbdw429s
05/11/2022, 4:51 PMat application_cfc$cf.udfCall(/Application.cfc:412)
sknowlton
05/11/2022, 4:51 PMpublic void function onSessionStart() {
if ( !structKeyExists( application, 'cbBootstrap' ) ) {
onApplicationStart();
}
application.cbBootStrap.onSessionStart();
}
bdw429s
05/11/2022, 4:51 PMsknowlton
05/11/2022, 4:51 PMbdw429s
05/11/2022, 4:52 PMsknowlton
05/11/2022, 4:52 PMbdw429s
05/11/2022, 4:53 PMsknowlton
05/11/2022, 4:54 PMbdw429s
05/11/2022, 4:55 PMsknowlton
05/11/2022, 4:57 PMbdw429s
05/11/2022, 4:58 PMwil-shiftinsert
05/11/2022, 5:16 PMbdw429s
05/11/2022, 5:29 PMwil-shiftinsert
05/11/2022, 5:30 PMsknowlton
05/11/2022, 5:33 PMwil-shiftinsert
05/11/2022, 5:34 PMsknowlton
05/11/2022, 5:37 PMbdw429s
05/11/2022, 5:38 PMsknowlton
05/11/2022, 5:38 PMwil-shiftinsert
05/11/2022, 5:39 PMsknowlton
05/11/2022, 5:40 PMwil-shiftinsert
05/11/2022, 5:41 PMbdw429s
05/11/2022, 5:44 PMApplication.cfc
component {
this.name='brad';
this.sessionManagement=true;
function onApplicationStart() {
systemoutput( 'onApplicationStart(): #getTickCount()#', 1 )
new myClass();
sleep(5000);
systemoutput( 'onApplicationStart() DONE: #getTickCount()#', 1 )
}
function onRequestStart() {
systemoutput( 'onRequestStart(): #getTickCount()#', 1 )
}
function onSessionStart() {
systemoutput( 'onSessionStart(): #getTickCount()#', 1 )
}
}
And then myClass.cfc
is just
component {
function init() {
application.foo = 'bar';
systemoutput( application.foo, 1 );
}
}
and there is an empty index.cfm
When I fire two requests starting the app at the same time, I get this
[INFO ] onApplicationStart(): 1652290966351
[INFO ] bar
[INFO ] onApplicationStart() DONE: 1652290971369
[INFO ] onSessionStart(): 1652290971389
[INFO ] onSessionStart(): 1652290971390
[INFO ] onRequestStart(): 1652290971396
[INFO ] onRequestStart(): 1652290971397
which would appear everything is waiting for onApplicationStart()
to finish before proceeding.sknowlton
05/11/2022, 5:45 PMbrad
. it's just doing everything too quicklysknowlton
and it'll laze around, firing random requests and promoting entropybdw429s
05/11/2022, 5:46 PMwil-shiftinsert
05/11/2022, 5:49 PMbdw429s
05/11/2022, 5:55 PMnew myClass();
to the Application.cfc pseudoconstructor didn't do it. I even had it touch the session scope too which is rather interesting since it means it was setting session variables before onSessionStart actually ran! 🤔wil-shiftinsert
05/11/2022, 5:57 PMsknowlton
05/13/2022, 2:31 PMThe target 'ExplicitCall' requested a missing dependency with a Name of '' and DSL of 'StackSportsService@stackSports'
with the stack trace pointing to afterAspectsLoad()
in one of our interceptors. The relevant stackSports
module wasn't loaded yet but it was firing afterAspectsLoad()
. Am I using the wrong interception point here or is that not supposed to happen?