2 Replies Latest reply on Jul 24, 2013 3:41 PM by dimshust1985

    Own singleton bean and hornetq initialization order.

    dimshust1985

      Hello. I have singleton bean, that uses JMS topic subscription. In the @PostConstruct method i'm trying to init JMS. in 90% times - it's ok, but in other cases - it fails:

       

       

      ERROR [stderr] (ServerService Thread Pool -- 62) javax.naming.NameNotFoundException: ConnectionFactory -- service jboss.naming.context.java.ConnectionFactory

       

       

      , because the hornet initialization goes after my singleton bean. I think, that i should use the @DependsOn annotation, but i cant understand what exactly name i should  use in this annotatin:@DependsOn("?????????")