4 Replies Latest reply on Oct 16, 2008 9:10 AM by pradeeps

    Unique problem with Messaging

      Hello,

      I am using JBOSS 4.2.3 GA and JBoss Messaging 1.4.0 and Spring 2.5 and facing JNDI problems deploying as a RAR.

      If I deploy the application to a running JBOSS instance everything works just great.

      The moment I shutdown the server and restart it I get exceptions saying - ConnectionFactory not bound.

      It appears to me that my application is somehow getting deployed before the ConnectionFactory is getting defined.

      Am I missing something?

      Thanks.

        • 1. Re: Unique problem with Messaging
          clebert.suconic

          You should add the dependency to the ConnectionFactory on your Bean description, to inject the dependency

          • 2. Re: Unique problem with Messaging

            Thanks for the instant reply Clebert.

            I am new to JBOSS.

            The logs clearly show that JBOSS is deploying my RAR before it got around to creating the queues and ConnectionFactory which the RAR is using.

            In my applicationContext.xml I am setting the dependency in the beans definition.

            Where do I specify the dependency that will make sure that JBOSS does not deploy my RAR before it has had the opportunity to create the resources like ConnectionFactory?

            Thanks.

            • 3. Re: Unique problem with Messaging
              clebert.suconic

              This would be a question more appropriate to JMX or JBAS users forum.

              I'm not sure how users usually create RARs.

              But look on docs for the depends on MBean definitions. Something like:

              <depends>jboss.messaging.connectionfactory:service=ConnectionFactory</depends>
              



              And yes, you could also add the ConnectionFactories definition at your file.

              • 4. Re: Unique problem with Messaging

                Thanks for the suggestion Clebert.