-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathsample.web.xml
92 lines (81 loc) · 3.33 KB
/
sample.web.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<display-name>JRuby Application Template</display-name>
<description>
Sample deployment descriptor for a JRuby on Rails application.
</description>
<!-- Rails (threadsafe! due max.runtimes == 1) configuration : -->
<context-param>
<param-name>rails.env</param-name>
<param-value>production</param-value>
</context-param>
<context-param>
<param-name>jruby.min.runtimes</param-name>
<param-value>1</param-value>
</context-param>
<context-param>
<param-name>jruby.max.runtimes</param-name>
<param-value>1</param-value>
</context-param>
<filter>
<filter-name>RackFilter</filter-name>
<filter-class>org.jruby.rack.RackFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>RackFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.jruby.rack.rails.RailsServletContextListener</listener-class>
</listener>
<!-- Worker setup including optional configuration parameters : -->
<!-- declaratively configure a worker (with built-in support) : -->
<context-param>
<param-name>jruby.worker</param-name>
<param-value>resque</param-value> <!-- delayed_job -->
</context-param>
<!-- alternatively use an (arbitrary) inline worker script : -->
<!--
<context-param>
<param-name>jruby.worker.script</param-name>
<param-value>
require 'delayed/jruby_worker';
Delayed::JRubyWorker.new.start
</param-value>
</context-param>-->
<!-- if you script is to be loaded from a (.rb) file use : -->
<!--
<context-param>
<param-name>jruby.worker.script.path</param-name>
<param-value>delayed/start_worker.rb</param-value>
</context-param>-->
<!-- note that jruby.worker.script and jruby.worker.script.path params are
mutually exclusive and jruby.worker.script takes precedence ! -->
<!-- if one worker thread is not enough, increase the value (defaults to 1) : -->
<context-param>
<param-name>jruby.worker.thread.count</param-name>
<param-value>1</param-value>
</context-param>
<!-- you might also change the worker thread's priority (use with caution) : -->
<!-- accepted values are MIN, MAX, NORM and values <1..10> (default is NORM) -->
<context-param>
<param-name>jruby.worker.thread.priority</param-name>
<param-value>NORM</param-value><!-- NORM == 5, MIN == 1, MAX == 10 -->
</context-param>
<!-- worker specific configuration parameters (in this case for resque) : -->
<context-param>
<param-name>QUEUES</param-name>
<param-value>mails,posts</param-value>
</context-param>
<context-param>
<param-name>INTERVAL</param-name>
<param-value>1.5</param-value>
</context-param>
<!-- mandatory - make sure it's declared after the org.jruby.rack... listener : -->
<listener>
<listener-class>org.kares.jruby.rack.WorkerContextListener</listener-class>
</listener>
</web-app>