Community
Participate
Working Groups
The LifeCycleAdapterFactory class buffers 'Known' adapter in static fields (displayAdapter and widgetAdapters). On the other hand, LifeCycleAdapterFactory is added to the AdapterFactoryRegistry whose instance is per RWTContext. If I am not mistaken, the static fields of the LifeCycleAdapterFactory breaks the isolation of the RWTContext. Assuming that e.g. the widgetAdapters map is filled, all RWTContexts would see the same instances from the adapter factory.
... I am working on a patch - the test case is with what I am currently struggling (create a new session within the test)
Created attachment 192729 [details] Partial fix The patch converts the static fields to member fields and thus solves the problem that LifeCycleAdapterFactory may mix adapters from different RWTContexts. Hovever, it introduces a new problem: as adapter factories have session scope, now each session has its own set of LifeCycleAdapter (LifeCycleAdapter_Test#testXXXFromDifferentSessions fail) A possible solution to this problem would be to let the LifeCycleAdapterFactory use a a per-RWTContext buffer to store already known lifecycle adapters.
My current thinking is to let the AdapterFactory have application scope (i.e. make AdapterManagerImpl application scoped). See bug 342302.
Resolved with closing bug 342302.