1 Reply Latest reply on Nov 15, 2009 11:58 AM by peterj

    JBoss + PostgreSQL services startup on Windows

    timistomin

      Hello.

      I have to work with an old JBoss version 3.2.7. It runs as a Windows service. The problem is that from time to time it cannot start properly after the system reboot. It reports errors connecting to the database: "org.postgresql.util.PSQLException: FATAL: the database system is starting up".

      I believe that the JBoss service startup must be delayed somehow to let the database service to get to the working state. I tried to put the dependency on the pgsql-8.1 service but it didn't help.

      Any suggestions?

        • 1. Re: JBoss + PostgreSQL services startup on Windows
          peterj

          When this error happens, if you try to start the JBoss AS service again, is it successful? Or do you have to first do something with PostgreSQL?

          If PostgreSQL is taking too much time to start up properly, then the start of the JBoss AS service needs to be delayed until PostgreSQL is fully functional. Note that some services tell Windows that they are running before they are fully functional. Apparently, PostgreSQL does this (most of the tools used to run Java apps as services do the same thing - JBoss AS is rarely up and running when Windows thinks it is).

          Are you using PostgreSQL as your DefaultDS? If not, can you change the configuration for your apps to not establish the database connections until the first user request? Or simply add in a delay before getting the connections (if you have a startup mbean doing this).

          What tool are you using to run JBoss AS as a service? Perhaps that tool provides a mechanism to delay the startup.