Class: Trinidad::Extensions::HotdeployWebAppExtension

Inherits:
WebAppExtension
  • Object
show all
Defined in:
lib/trinidad_hotdeploy_extension.rb

Instance Method Summary collapse

Instance Method Details

#configure(tomcat, app_context) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/trinidad_hotdeploy_extension.rb', line 10

def configure(tomcat, app_context)
  @options[:monitor] ||= File.join(app_context.doc_base, 'tmp/restart.txt')
  monitor = File.expand_path(@options[:monitor])
  delay = @options[:delay] || 1000

  listener = org.jruby.trinidad.HotDeployLifecycleListener.new(app_context, monitor, delay)
  app_context.addLifecycleListener(listener)
  listener
end