playframework 2.3 - Action Composition for Authentication -


i having below class check incoming request.

public class securedaction extends action.simple  {         @override     public promise<result> call(context ctx) throws throwable      {         // not doing now. interrupting         return delegate.call(ctx);     } } 

and applying on controller like

@with(securedaction.class)  public class testcontroller extends basiccontroller { public result method1(){} public result method2(){} -- } 

problem is, in case of multiple requests coming browser, requests getting corrupted / responses getting mixed up.. in above case, calls both method1 , method2 going through 1 of them when @with(securedaction.class) used. not seeing issue if annotation removed. context? not hread safe? right way do? please?

looks making securedaction non -singleton (@scope("prototype") ) solves problem. not seeing issue more after this.

that means delegate gets shared among incoming requests / thread unsafe.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -