Skip to content

Commit 4f45efa

Browse files
committed
COLDBOX-716 #resolve
determine session/client state via CF getApplicationMetadata() instead of isDefined() to avoid load issues for flash ram
1 parent a8155e1 commit 4f45efa

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

.cflintrc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
{ "code": "AVOID_USING_CFABORT_TAG" },
66
{ "code": "AVOID_USING_CFEXECUTE_TAG" },
77
{ "code": "AVOID_USING_DEBUG_ATTR" },
8-
{ "code": "AVOID_USING_CREATEOBJECT" },
98
{ "code": "AVOID_USING_ABORT" },
109
{ "code": "AVOID_USING_ISDATE" },
1110
{ "code": "AVOID_USING_ISDEBUGMODE" },
@@ -39,7 +38,6 @@
3938
{ "code": "FUNCTION_HINT_MISSING" },
4039
{ "code": "FILE_SHOULD_START_WITH_LOWERCASE" },
4140
{ "code": "LOCAL_LITERAL_VALUE_USED_TOO_OFTEN" },
42-
{ "code": "GLOBAL_VAR" },
4341
{ "code": "GLOBAL_LITERAL_VALUE_USED_TOO_OFTEN" },
4442
{ "code": "MISSING_VAR" },
4543
{ "code" : "METHOD_INVALID_NAME" },

system/web/services/RequestService.cfc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ component extends="coldbox.system.web.services.BaseService"{
88

99
/**
1010
* Constructor
11+
* @controller The ColdBox Controller.
1112
*/
1213
function init( required controller ){
1314
setController( arguments.controller );
@@ -20,7 +21,7 @@ component extends="coldbox.system.web.services.BaseService"{
2021
}
2122

2223
/**
23-
* Once configuration loads
24+
* Once configuration loads this method is fired by the service loader.
2425
*/
2526
function onConfigurationLoad(){
2627
// Local Configuration data and dependencies
@@ -207,7 +208,7 @@ component extends="coldbox.system.web.services.BaseService"{
207208
}
208209

209210
/**
210-
* Does the request context exist in request scope
211+
* Return the flash scope instance in use by the framework.
211212
*/
212213
any function getFlashScope(){
213214
return variables.flashScope;
@@ -230,11 +231,11 @@ component extends="coldbox.system.web.services.BaseService"{
230231
var flashPath = "";
231232

232233
// Verify Flash decisions
233-
if( variables.flashData.scope == "session" and !isDefined( "session") ){
234+
if( variables.flashData.scope == "session" and !getApplicationMetadata().sessionManagement ){
234235
log.error( "Flash RAM was set to use session but session is undefined, changing it to cache for you so we don't blow up.");
235236
variables.flashData.scope = "cache";
236237
}
237-
if( variables.flashData.scope == "client" and !isDefined( "client") ){
238+
if( variables.flashData.scope == "client" and !getApplicationMetadata().clientManagement ){
238239
log.error( "Flash RAM was set to use client but client is undefined, changing it to cache for you so we don't blow up.");
239240
variables.flashData.scope = "cache";
240241
}

0 commit comments

Comments
 (0)