[jboss-user] [JBoss Seam] - Application scope versus conversation scope for EntityHome o

bvdberg do-not-reply at jboss.com
Sun Jan 13 06:39:17 EST 2008


Hi,

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
domainHome.clearInstance();
domainHome.setId(newDomain.getId());

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?

Thanks,
Bas






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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4119417



More information about the jboss-user mailing list