1 Reply Latest reply on Jan 14, 2008 10:24 AM by Pete Muir

    Application scope versus conversation scope for EntityHome o

    Bas van den Berg Newbie


      I'm using an object 'domainHome extends EntityHome' in my application for managing the entity called 'Domain'.

      I have an admin and frontend in my system.

      I have a method called loadScenario which drops all tables and then sets up a new Domain entity.

      After the new domain is persisted the loadScenario also does the following

      Because domainHome is Application scoped I would expect that all conversations now have the new domain. (when they invoke domainHome.getInstance()).

      This is not the case. It only works when I set the scope to CONVERSATION?
      I don't understand why this only works when domainhome scope is CONVERSATION and not when the scope is APPLICATION.

      My current solution is also not very good, because each conversation will have it's own instance of domainHome, which needs to be reloaded because loadScenario has run.

      Can someone please explain?