Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.1
-
Component/s: Framework, ICE-Components
-
Labels:None
-
Environment:spring file upload
-
ICEsoft Forum Reference:
-
Affects:Compatibility/Configuration
Description
The UploadServer has logic where it uses a separate, non-JSF thread, to load the file content. We bypass this logic when another framework (e.g Seam, Spring Web Flow) is relying on ThreadLocals to do what they need to do. The check to ensure that the appropriate code path is selected is not very generic. It currently only supports Seam and Spring Web Flow. The forum user was using Spring Security and ran into problems using the file upload component. They were able to work around it by modifying the source code to also check for Spring Security. However, this strategy is a bit of a treadmill in that we'll always potentially be behind in adding checks for the next framework.
I've put the code in pretty much as posted by the forum user with the addition of a context-parameter that forces the code to use the safe (but slow) practice of executing the lifecycle on the calling thread.
The context parameter name is com.icesoft.faces.forceLifecycleOnCallingThread and the default value is false.