[jboss-user] [JBoss Seam] - Initialization of Seam Application

hamtho2 do-not-reply at jboss.com
Tue Jan 16 11:57:44 EST 2007


Hi,

I have a problem accessing the properties of my seam application during startup. 

I´ve got the following Bean, that is started through the @Startup annotation.


  | @Name("commonDataHelper")
  | @Scope(ScopeType.APPLICATION)
  | @Startup
  | public class CommonDataHelper {
  | 	
  |     @Logger
  |     private Log log; 
  |     
  |    ...
  |     
  |     @Create
  |     public void init() {
  | ....
  |     }

But when I try to access the following Properties I always get an exception, so I´ve got the idea, that it might not have been initialized yet. Is this assumption true, or do I have an other misunderstanding?

NPE if trying to access the application:


  | Iterator<Locale> locales = FacesContext.getCurrentInstance().getApplication().getSupportedLocales();
  | 

Can´t receive the seam-RessourceBundle of my war, but only the one that lies in the sourcepath of my ejb-jar:

ResourceBundle rb = org.jboss.seam.core.ResourceBundle.instance().getBundle(bundleName, locale);

Anyone knows why?
I saw, that I could add a depends-value at the @Startup-annotation. But what would be the value to depend on?

Thank you
Thomas

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

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




More information about the jboss-user mailing list