4 Replies Latest reply on Aug 30, 2004 5:30 PM by genman

    Delaying queue creation until hsql is ready

    speakmon

      Hi,

      I have a LOT of messages persisted to disk in hsqldb (over 200K), so when JBoss starts it takes a few seconds to load everything from disk. What's happening is that JBossMQ tries to activate the queues and ConnectionFactories before hsql is listening for connections:

      09:18:29,975 INFO [STDOUT] server.properties not found, using command line or default properties
      09:18:29,975 INFO [STDOUT] Opening database: D:\apps\prod\JBossMQ\server\jms\data\hypersonic\default
      09:18:29,975 INFO [STDOUT] HSQLDB server 1.7.1 is running
      09:18:29,975 INFO [STDOUT] Use SHUTDOWN to close normally. Use [Ctrl]+[C] to abort abruptly
      ...
      09:18:32,350 INFO [PersistenceManager] Starting
      09:18:43,913 ERROR [PersistenceManager] Starting failed
      org.jboss.mq.SpyJMSException: Could not resolve uncommited transactions.
      (followed by all the nested exceptions, ending with a SQLException "Connection refused")
      ...
      09:18:55,756 INFO [STDOUT] Mon Jun 30 09:18:55 PDT 2003 Listening for connections ...
      (this is hsqldb ready for connections, alas it's 12 sec too late).

      Is there a way I can force the queue activation to wait until hsqldb is ready?

      Thanks!

      --Ben

        • 1. Re: Delaying queue creation until hsql is ready

          The real problem is that hsqldb shouldn't
          return from its start() method until it listening
          for connections.

          Somebody has added a workaround for jboss3.2
          On the jdbc2 persistence manager, you can change
          the attribute
          "ConnectionRetryAttempts"
          which will keep trying with a wait of 1.5 secs between.

          Regards,
          Adrian

          • 2. Re: Delaying queue creation until hsql is ready
            speakmon

            That solved it, thanks!

            • 3. Re: Delaying queue creation until hsql is ready
              rudivankeirsbilck

              Ok, read about that in the docs but the docs do no say how to specify the value. I have used: <depends optional-attribute-name="ConnectionRetryAttempts">10< /depends> (added a space here for display purposes) but then I get a failure message that says the 10 in an invalid object name:

              Incompletely deployed packages:
              [org.jboss.deployment.DeploymentInfo@d9f9eb02 { url=file:/Lab/jboss/server/default/deploy/jms/mysql-jdbc2-service.xml }
              deployer: org.jboss.deployment.SARDeployer@7f1228
              status: Deployment FAILED reason: Invalid ObjectName: 10; javax.management.MalformedObjectNameException: missing domain
              state: FAILED
              watch: file:/Lab/jboss/server/default/deploy/jms/mysql-jdbc2-service.xml
              lastDeployed: 1093859928441
              lastModified: 1093859928000
              mbeans:

              Can anybody tell me how to specify the value please.

              Many thanks,

              Rudi.

              • 4. Re: Delaying queue creation until hsql is ready
                genman


                For JMX write:

                10

                Use the depends only for ObjectName strings (MBeans).