lib/trinidad/web_app.rb in trinidad-1.0.5 vs lib/trinidad/web_app.rb in trinidad-1.1.0
- old
+ new
@@ -81,9 +81,22 @@
def war?; WebApp.war?(app_config); end
def work_dir; web_app_dir; end
def environment; @app_config[:environment] || @config[:environment] || 'development'; end
+ def solo?
+ !self.is_a?(WarWebApp) && @app_config[:solo]
+ end
+
+ def threadsafe?
+ jruby_min_runtimes.to_i == 1 && jruby_max_runtimes.to_i == 1
+ end
+
+ def monitor
+ m_file = @app_config[:monitor] || @config[:monitor] || 'tmp/restart.txt'
+ File.expand_path(m_file, work_dir)
+ end
+
protected
def add_parameter_unless_exist(param_name, param_value)
@params[param_name] = param_value unless web_context_param(param_name)
end