3 Replies Latest reply on Nov 6, 2012 4:11 AM by qtm

    Delay @Singleton @Startup bean until the server start has completed

    qtm Newbie

      Hi,

       

      I have a singleton bean with the startup annotation. I want this bean to start only after all the default subsystems of the server have been started. Now, if I start the server with the ear deployed, I can see the bean starts before I get the "JBoss AS 7.1.1.Final "Brontes" started in 14678ms" confirmation. This causes me some troubles because in the bean I'd like to call different subsystems( messaging, remoting etc). If I use DI like @Resource("java/ConnectionFactory) private ConnectionFactory cf; I can see the necessary subsystems being prepared for me, but I would like to know if there is some other way of delaying the startup of the bean.

       

      Thank you