[jboss-user] [JBoss Seam] - Re: Contexts.getApplicationContext() loses Components

Lundegaard do-not-reply at jboss.com
Tue Apr 3 15:51:01 EDT 2007


anonymous wrote : I'm not sure I'm following your problem - you're saying *your* components are starting up in the wrong order, so that a component your component depends on isn't available during startup? Use @Startup(depends=) to make sure the components are started before yours. 

My components don't depend on each other so the order shouldn't matter. I'd also guess I don't need to set any dependencies to startup components since I only inject the usual suspects (entityManager, facesMessages, log) into my components. The number of my my components just changed the startup order of all components which causes problems.

Depending on the entries in my META-INF/components.xml file the startup order of the components in Lifecycle#endInitialization() differs. 

If the org.jboss.seam.core.ejb.component is started before the entityManagerFactory all works fine.

If the org.jboss.seam.core.ejb.component is started after the entityManagerFactory the complete startup fails with:
javax.naming.NamingException: Local server is not initialized 

I fixed the problem by starting org.jboss.seam.core.ejb.component as the first component in Lifecycle#endInitialization().

Is my configuration broken or is there any other way to fix this problem?



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

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



More information about the jboss-user mailing list