PerthreadManager - PerthreadValue use

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

PerthreadManager - PerthreadValue use

Lherm Nicolas
Hi,


When I update to 5.3.8 I changed the @PageAttached with PerThreadManager and PerThreadValue.


I used it like this :


private PerThreadValue<T> perThreadValue;


@Inject

private PerthreadManager managerEnv;

 public PerThreadValue<T> getPerThreadValue() {
       if (perThreadValue == null) {
            perThreadValue = managerEnv.createValue();
       }
       return perThreadValue;
  }

I wanna use it to push inside somes object to use it after but it seems that getPerThreadValue() re-initialize automatically so I lose the object which is inside.

Loading...