Class: Trinidad::Lifecycle::WebApp::War

Inherits:
Base
  • Object
show all
Includes:
Shared
Defined in:
lib/trinidad/lifecycle/web_app/war.rb

Constant Summary

Constants inherited from Base

Base::EVENTS

Instance Attribute Summary

Attributes included from Shared

#web_app

Instance Method Summary collapse

Methods included from Shared

#before_start, #initialize

Methods inherited from Base

#after_destroy, #after_init, #after_start, #after_stop, #before_destroy, #before_start, #before_stop, #configure_start, #configure_stop, #lifecycleEvent, #periodic, #start, #stop

Instance Method Details

#before_init(event) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/trinidad/lifecycle/web_app/war.rb', line 10

def before_init(event)
  # NOTE: esp. important for .war applications that the name matches the path
  # to work-around ProxyDirContext constructor's `contextPath = contextName;`
  # @see {#adjust_context} also need to restore possible context name change!
  context = event.lifecycle
  context.name = context.path if context.name
  super
end

#configure(context) ⇒ Object



19
20
21
22
# File 'lib/trinidad/lifecycle/web_app/war.rb', line 19

def configure(context)
  super # Shared#configure
  configure_class_loader(context)
end