[jboss-user] [JBoss Seam] - Re: best practice for populating combos

jacob.orshalick do-not-reply at jboss.com
Wed Nov 7 12:47:12 EST 2007


Depends on what you mean by loading once.  If you mean loading once for the entire application (which I have used in several instances) the following will work:

@Factory(value="myListBox", scope=ScopeType.APPLICATION)
  | public Map<String, BigDecimal> getMyListBox()
  | {
  |         // the following log will only occur once since application scoped
  | 	log.info("Loading myListBox...");
  | 		
  |         // perform loading of Map into myMap
  | 
  | 	return myMap;
  | }

Otherwise simply change the ScopeType accordingly.

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

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



More information about the jboss-user mailing list