Skip to content

Commit

Permalink
extracting method; comments == code smell
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiokung committed Dec 2, 2008
1 parent a316d80 commit 09a8a44
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/jetty_rails/handler/web_app_handler.rb
Expand Up @@ -7,9 +7,7 @@ def initialize(config)
super("/", config[:context_path])
@config = config

# create an isolated classloader per application context
self.class_loader = org.jruby.util.JRubyClassLoader.new(JRuby.runtime.jruby_class_loader)

self.class_loader = new_classloader_for_application_context
self.resource_base = config[:base]
self.descriptor = config[:web_xml]

Expand Down Expand Up @@ -63,6 +61,9 @@ def add_classes_dir_to_classpath(config)
url = java.io.File.new(classes_dir).to_url
self.class_loader.add_url(url)
end
def new_classloader_for_application_context()
org.jruby.util.JRubyClassLoader.new(JRuby.runtime.jruby_class_loader)
end
end
end
end

0 comments on commit 09a8a44

Please sign in to comment.