4 Replies Latest reply on Sep 26, 2002 9:28 AM by adrian.brock

    Gaining back control from startup script

    calvincc

      I was wondering if there was a way for a batch program or ant to gain back control after JBoss has finished starting up. After executing run.bat or any other batch script that calls JBoss, the scripts never seem to gain back control so as to perform some other task after startup. Any ideas? Thanks.

        • 1. Re: Gaining back control from startup script
          rockinryan

          So far as I know the startup script itself simply setups up a running env. and executes a java command. Depending on your OS you could modify the startup script to execute the final java command in another thread.

          For example, in Unix you run
          > emacs test.txt &

          to spawn a separate process for emacs to run in (thereby giving you your command session back to do other things with.) [The & at the end of the command directs the OS to do this if you didn't know] I don't know about scripting like this on other OSs but the point is this behavior has nothing to do with JBoss but rather the way the OS starts the process based on the syntax in the startup script.

          Does that help any?
          Ryan

          • 2. Re: Gaining back control from startup script
            calvincc

            Thanks Ryan,

            Unfortunately I'm trying to get this to work on Windows. I had thought that doing a "/C start run " would launch the process in another thread, however it does not appear to work. Any other ideas?

            • 3. Re: Gaining back control from startup script
              abuehler

              You could start JBoss as a Windows Service, without any command window. It writes the messages then in a textfile on the harddisk. This is described in the JBoss Quick Start guide Draft 3.

              andi

              • 4. Re: Gaining back control from startup script

                start run.bat

                cmd /c just starts a new shell in the same thread

                Regards,
                Adrian