I'm trying to remove desperately a variable from the page context via the 
Contexts.removeFromAllContexts() method, but it didn't work. 
This is the code: 

  | @Scope(ScopeType.PAGE)
  | @Name("personAction")
  | public class PersonActionImpl {
  | 
  |     @Logger
  |     Log log;
  | 
  |     @In(required = false)
  |     @Out(required = false)
  |     private Person personDataModelSelection;
  | ...
  | 
  |     public void deletePerson() {
  |             log.debug("deletePerson() called");
  |             personService.removePerson();
  |             personDataModelManager.initializeModel();
  |             log.debug("personDataModelSelection: #0", Contexts
  |                             
.lookupInStatefulContexts("personDataModelSelection"));
  |             Contexts.removeFromAllContexts("personDataModelSelection");
  |             log.debug("personDataModelSelection: #0", Contexts
  |                             
.lookupInStatefulContexts("personDataModelSelection"));
  | 
  |             personDataModelSelection = null;
  |     }
  | ...
  | 


Output:
17:31:25,460 DEBUG [PersonActionImpl] personDataModelSelection: [Person -> 
CoreId="99991234567812345678ABC123"; Firstname="Hansi 123"; Lastname="Meier123"]
  | 17:31:25,460 DEBUG [PersonActionImpl] personDataModelSelection: [Person -> 
CoreId="99991234567812345678ABC123"; Firstname="Hansi 123"; Lastname="Meier123"]
  | 

Shouldn't it be removed at the 2nd output line?
Btw, it works if i declare the class in conversation scope..
I can't see what i'm doing wrong..


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4095294#4095294

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4095294
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to