trinidad_daemon_extension 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
data/History.txt
CHANGED
data/README
CHANGED
@@ -41,6 +41,13 @@ By default it writes the logs into the file log/trinidad.log with the level INFO
|
|
41
41
|
file: trinidad.log # where the daemon writes its output
|
42
42
|
level: ALL # severity level, it cn be one of these: ALL, CONFIG, FINE, FINER, FINEST, INFO, OFF, SEVERE, WARNING
|
43
43
|
|
44
|
+
The extension also allows to add new JVM arguments to run the daemon with. They just need to be added into the configuration file:
|
45
|
+
|
46
|
+
---
|
47
|
+
extensions:
|
48
|
+
daemon:
|
49
|
+
jvm_args: '-XX:MaxPermSize=512m'
|
50
|
+
|
44
51
|
You can find further information on how to write your own extension in the wiki: http://wiki.github.com/calavera/trinidad/extensions
|
45
52
|
|
46
53
|
# Copyright
|
@@ -9,12 +9,12 @@ require File.expand_path('../../trinidad-libs/trinidad-daemon-extension', __FILE
|
|
9
9
|
module Trinidad
|
10
10
|
module Extensions
|
11
11
|
module Daemon
|
12
|
-
VERSION = '0.1.
|
12
|
+
VERSION = '0.1.4'
|
13
13
|
end
|
14
14
|
|
15
15
|
class DaemonServerExtension < ServerExtension
|
16
16
|
def configure(tomcat)
|
17
|
-
org.jruby.trinidad.TrinidadDaemon.new(tomcat, @options[:pid_file], logger_options)
|
17
|
+
org.jruby.trinidad.TrinidadDaemon.new(tomcat, @options[:pid_file], logger_options, jvm_args)
|
18
18
|
end
|
19
19
|
|
20
20
|
def override_tomcat?; true; end
|
@@ -33,6 +33,10 @@ module Trinidad
|
|
33
33
|
|
34
34
|
Java::java.util.HashMap.new(log)
|
35
35
|
end
|
36
|
+
|
37
|
+
def jvm_args
|
38
|
+
(@options[:jvm_args] ? @options[:jvm_args].split : []).to_java(:string)
|
39
|
+
end
|
36
40
|
end
|
37
41
|
|
38
42
|
class DaemonOptionsExtension < OptionsExtension
|
@@ -55,6 +55,14 @@ describe Trinidad::Extensions::DaemonServerExtension do
|
|
55
55
|
log['file'].should == 'log/trinidad.log'
|
56
56
|
log['level'].should == 'INFO'
|
57
57
|
end
|
58
|
+
|
59
|
+
it "allows to pass jvm arguments to the daemon" do
|
60
|
+
extension = Trinidad::Extensions::DaemonServerExtension.new({
|
61
|
+
:jvm_args => '-Xmx=2048m -XX:MaxPermSize=2048m'
|
62
|
+
})
|
63
|
+
|
64
|
+
extension.jvm_args.should have(2).arguments
|
65
|
+
end
|
58
66
|
end
|
59
67
|
|
60
68
|
describe Trinidad::Extensions::DaemonOptionsExtension do
|
Binary file
|
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'trinidad_daemon_extension'
|
16
|
-
s.version = '0.1.
|
17
|
-
s.date = '2010-04-
|
16
|
+
s.version = '0.1.4'
|
17
|
+
s.date = '2010-04-26'
|
18
18
|
s.rubyforge_project = 'trinidad_daemon_extension'
|
19
19
|
|
20
20
|
## Make sure your summary is short. The description may be as long
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 4
|
9
|
+
version: 0.1.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- David Calavera
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-04-
|
17
|
+
date: 2010-04-26 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|