abstractj
7/20/2011 - 4:45 AM

running_modes

running_modes

 def run_server

        Dir.chdir(jboss_home) do
          # don't send the gemfile from the current app, instead let
          # bundler suss it out itself for each deployed
          # app. Otherwise, they'll end up sharing this Gemfile, which
          # is probably not what we want.
          ENV.delete('BUNDLE_GEMFILE')

          if windows?
            exec *run_command_line
          else
            old_trap = trap("INT") do
              puts "caught SIGINT, shutting down"
            end
            exec_command(run_command_line.join(' '))
            trap("INT", old_trap)
          end
        end
      end

      def run_server_clustered
        config_path = "#{File.join(DeployUtils.server_dir, '/configuration/standalone-ha.xml')}"
        args = "--server-config=#{config_path}"
        exec_command(run_command_line.join(" #{args}"))
      end