lib/trinidad/web_app.rb in trinidad-1.2.2 vs lib/trinidad/web_app.rb in trinidad-1.2.3
- old
+ new
@@ -19,11 +19,11 @@
def initialize(config, app_config, servlet_class = 'org.jruby.rack.RackServlet', servlet_name = 'RackServlet')
@config = config
@app_config = app_config
- @class_loader = org.jruby.util.JRubyClassLoader.new(JRuby.runtime.jruby_class_loader)
+ generate_class_loader
configure_rack_servlet(servlet_class, servlet_name) unless rack_servlet_configured?
end
def rack_listener
@@ -98,9 +98,13 @@
File.expand_path(m_file, work_dir)
end
def define_lifecycle
Trinidad::Lifecycle::Default.new(self)
+ end
+
+ def generate_class_loader
+ @class_loader = org.jruby.util.JRubyClassLoader.new(JRuby.runtime.jruby_class_loader)
end
protected
def add_parameter_unless_exist(param_name, param_value)
@params[param_name] = param_value unless web_context_param(param_name)