1 Reply Latest reply on Jun 2, 2011 4:07 AM by Clemens Eisserer

    Howto re-load a Datamodel every time in a stateful session bean?

    Clemens Eisserer Newbie

      I have a dataTable which updates itself frquently using the a:poll tag.

      That works perfectly fine as long as the backing bean is stateless - for every poll a new bean is created and the factory method will be invoked.

      However, I have to hold state, so with a stateful session bean, the datamodel ist just loaded once when its first accessed, and thats it.

      Is there a way I can force a re-load of the DataModel?

      Thank you in advance, Clemens

      public class MapImpl implements IMap {
           private List<String> mapElements = new ArrayList<String>();

          @Factory ("mapElements")
           public void getMapElements() {
               mapElements = statefulMapImpl.getTiles();
           @Remove @Destroy
           public void remove() { }