rboss 0.9.1 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/.idea/encodings.xml +5 -0
  3. data/.idea/misc.xml +5 -0
  4. data/.idea/modules.xml +9 -0
  5. data/.idea/rboss.iml +65 -0
  6. data/.idea/scopes/scope_settings.xml +5 -0
  7. data/.idea/vcs.xml +7 -0
  8. data/Gemfile +2 -2
  9. data/README.md +34 -397
  10. data/bin/rboss-cli +77 -28
  11. data/lib/rboss.rb +10 -12
  12. data/lib/rboss/cli/invoker.rb +31 -18
  13. data/lib/rboss/cli/mappings.rb +11 -10
  14. data/lib/rboss/cli/mappings/resources/connector.yaml +2 -2
  15. data/lib/rboss/cli/mappings/resources/datasource.yaml +5 -5
  16. data/lib/rboss/cli/mappings/resources/deployment-scanner.yaml +3 -3
  17. data/lib/rboss/cli/mappings/resources/interface.yaml +2 -2
  18. data/lib/rboss/cli/mappings/resources/jdbc-driver.yaml +12 -0
  19. data/lib/rboss/cli/mappings/resources/jms-queue.yaml +44 -0
  20. data/lib/rboss/cli/mappings/resources/runtime.yaml +34 -0
  21. data/lib/rboss/cli/mappings/resources/server.yaml +8 -8
  22. data/lib/rboss/cli/resource.rb +60 -37
  23. data/lib/rboss/cli/result_parser.rb +29 -5
  24. data/lib/rboss/plaftorm.rb +2 -25
  25. data/lib/rboss/utils.rb +2 -8
  26. data/lib/rboss/version.rb +1 -1
  27. data/lib/rboss/view/colorizers.rb +4 -2
  28. data/lib/rboss/view/formatters.rb +37 -0
  29. data/lib/rboss/view/table_builder.rb +2 -2
  30. data/rboss-cli-bash-completion +82 -0
  31. data/rboss.gemspec +12 -12
  32. data/rboss.iml +6 -7
  33. data/rboss.ipr +2 -11
  34. metadata +23 -53
  35. data/bin/rboss-profile +0 -125
  36. data/bin/rboss-twiddle +0 -204
  37. data/lib/rboss/bin/command_actions.rb +0 -125
  38. data/lib/rboss/cli/mappings/resources/jdbc_driver.yaml +0 -12
  39. data/lib/rboss/component_processor.rb +0 -179
  40. data/lib/rboss/components/component.rb +0 -58
  41. data/lib/rboss/components/datasource.rb +0 -179
  42. data/lib/rboss/components/deploy_folder.rb +0 -104
  43. data/lib/rboss/components/hypersonic_replacer.rb +0 -58
  44. data/lib/rboss/components/jbossweb.rb +0 -119
  45. data/lib/rboss/components/jmx.rb +0 -88
  46. data/lib/rboss/components/mod_cluster.rb +0 -81
  47. data/lib/rboss/components/org/6.0/deploy_folder.rb +0 -33
  48. data/lib/rboss/components/org/jmx.rb +0 -59
  49. data/lib/rboss/components/profile_folder.rb +0 -44
  50. data/lib/rboss/components/resource.rb +0 -52
  51. data/lib/rboss/components/restore_slimming.rb +0 -46
  52. data/lib/rboss/components/run_conf.rb +0 -90
  53. data/lib/rboss/components/run_conf.yaml +0 -22
  54. data/lib/rboss/components/service_script.rb +0 -55
  55. data/lib/rboss/components/slimming.rb +0 -107
  56. data/lib/rboss/components/slimming.yaml +0 -110
  57. data/lib/rboss/components/soa-p/hypersonic_replacer.rb +0 -79
  58. data/lib/rboss/components/soa-p/jmx.rb +0 -47
  59. data/lib/rboss/components/xadatasource.rb +0 -67
  60. data/lib/rboss/file_processor.rb +0 -111
  61. data/lib/rboss/jboss_path.rb +0 -74
  62. data/lib/rboss/jboss_profile.rb +0 -350
  63. data/lib/rboss/resources/jboss_init_redhat.sh.erb +0 -140
  64. data/lib/rboss/resources/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml +0 -282
  65. data/lib/rboss/resources/mod_cluster.sar/mod_cluster-1.1.2.Final.jar +0 -0
  66. data/lib/rboss/resources/run.conf.bat.erb +0 -60
  67. data/lib/rboss/resources/run.conf.erb +0 -62
  68. data/lib/rboss/twiddle.rb +0 -25
  69. data/lib/rboss/twiddle/base_monitor.rb +0 -88
  70. data/lib/rboss/twiddle/mbean.rb +0 -148
  71. data/lib/rboss/twiddle/monitor.rb +0 -222
  72. data/lib/rboss/twiddle/twiddle.rb +0 -87
@@ -1,62 +0,0 @@
1
- ## -*- shell-script -*- ######################################################
2
- ## ##
3
- ## JBoss Bootstrap Script Configuration ##
4
- ## ##
5
- ##############################################################################
6
-
7
- ### $Id: run.conf 91533 2009-07-22 01:20:05Z gbadner $
8
-
9
- #
10
- # This shell script is sourced by run.sh to initialize the environment
11
- # variables that run.sh uses. It is recommended to use this file to
12
- # configure these variables, rather than modifying run.sh itself.
13
- #
14
-
15
- #
16
- # Specify the maximum file descriptor limit, use "max" or "maximum" to use
17
- # the default, as queried by the system.
18
- #
19
- # Defaults to "maximum"
20
- #
21
- #MAX_FD="maximum"
22
-
23
- #
24
- # Specify the JBoss Profiler configuration file to load.
25
- #
26
- # Default is to not load a JBoss Profiler configuration file.
27
- #
28
- #PROFILER=""
29
-
30
- #
31
- # Specify the location of the Java home directory. If set then $JAVA will
32
- # be defined to $JAVA_HOME/bin/java, else $JAVA will be "java".
33
- #
34
- #JAVA_HOME="/usr/java/jdk1.6.0"
35
-
36
- #
37
- # Specify the exact Java VM executable to use.
38
- #
39
- #JAVA=""
40
-
41
- #
42
- # Specify options to pass to the Java VM.
43
- #
44
- if [ "x$JAVA_OPTS" = "x" ]; then
45
- JAVA_OPTS="-Xms<%= @config[:heap_size] %> -Xmx<%= @config[:heap_size] %>"
46
- JAVA_OPTS="$JAVA_OPTS -XX:PermSize=<%= @config[:perm_size] %> -XX:MaxPermSize=<%= @config[:perm_size] %>"
47
- JAVA_OPTS="$JAVA_OPTS -Xss<%= @config[:stack_size] %>"
48
- JAVA_OPTS="$JAVA_OPTS -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true"
49
- fi
50
-
51
- ## Specify the Security Manager options
52
- #JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$POLICY"
53
-
54
- # Sample JPDA settings for remote socket debugging
55
- <%= "#" unless @config[:debug] == :socket %>JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
56
-
57
- # Sample JPDA settings for shared memory debugging
58
- <%= "#" unless @config[:debug] == :shared_memory %>JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_shmem,address=jboss,server=y,suspend=n"
59
-
60
- <% unless @jvm_args.empty? %>
61
- JAVA_OPTS="$JAVA_OPTS <%= @jvm_args.join ' ' %>"
62
- <% end %>
@@ -1,25 +0,0 @@
1
- # The MIT License
2
- #
3
- # Copyright (c) 2011-2012 Marcelo Guimarães <ataxexe@gmail.com>
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in
13
- # all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- # THE SOFTWARE.
22
-
23
- require_relative 'twiddle/base_monitor'
24
- require_relative 'twiddle/mbean'
25
- require_relative 'twiddle/monitor'
@@ -1,88 +0,0 @@
1
- # The MIT License
2
- #
3
- # Copyright (c) 2011-2012 Marcelo Guimarães <ataxexe@gmail.com>
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in
13
- # all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- # THE SOFTWARE.
22
-
23
- require_relative 'monitor'
24
- require_relative 'twiddle'
25
-
26
- module RBoss
27
- module Twiddle
28
-
29
- class BaseMonitor
30
- include RBoss::Twiddle::Monitor
31
-
32
- def initialize twiddle
33
- @twiddle = twiddle
34
- defaults.each do |mbean_id, config|
35
- monitor mbean_id, config
36
- end
37
- end
38
-
39
- end
40
-
41
- class Invoker
42
-
43
- def monitor
44
- @monitor ||= BaseMonitor::new self
45
- @monitor
46
- end
47
-
48
- def mbean id
49
- monitor.mbean id
50
- end
51
-
52
- def get params
53
- mbean = extract params
54
- mbean[params[:property]]
55
- end
56
-
57
- def set params
58
- mbean = extract params
59
- mbean[params[:property]] = params[:value]
60
- end
61
-
62
- def invoke params
63
- mbean = extract params
64
- mbean.invoke params[:method], *params[:args]
65
- end
66
-
67
- def query params
68
- mbean = extract params
69
- execute :query, mbean.name, *params[:args]
70
- end
71
-
72
- def info params
73
- mbean = extract params
74
- execute :info, mbean.name, *params[:args]
75
- end
76
-
77
- private
78
-
79
- def extract params
80
- mbean = monitor.mbean params[:mbean]
81
- mbean.with params[:name]
82
- end
83
-
84
- end
85
-
86
- end
87
-
88
- end
@@ -1,148 +0,0 @@
1
- # The MIT License
2
- #
3
- # Copyright (c) 2011-2012 Marcelo Guimarães <ataxexe@gmail.com>
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in
13
- # all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- # THE SOFTWARE.
22
-
23
- require_relative 'twiddle'
24
-
25
- module RBoss
26
- class MBean
27
-
28
- attr_reader :pattern
29
- attr_accessor :resource, :twiddle, :description
30
-
31
- @@__detail__resourced__ = proc do |resources, &block|
32
- resouces = parse_resource resources
33
- details = {}
34
- resouces.each do |resource|
35
- with resource do
36
- details[resource] = {}
37
- @properties.each do |property|
38
- details[resource][property] = self[property].value
39
- end
40
- end
41
- end
42
- details.each &block if block
43
- details
44
- end
45
-
46
- @@__detail__ = proc do |&block|
47
- details = {}
48
- @properties.each do |property|
49
- details[property] = self[property].value
50
- end
51
- details.each &block if block
52
- details
53
- end
54
-
55
- def initialize params
56
- @pattern = params[:pattern]
57
- @twiddle = params[:twiddle]
58
- @properties = params[:properties]
59
- @description = params[:description]
60
- if params[:scan]
61
- (
62
- class << self
63
- self
64
- end).send :define_method, :scan, &params[:scan]
65
- (
66
- class << self
67
- self
68
- end).send :define_method, :each do |&block|
69
- scan.each &block
70
- end
71
- end
72
- if params[:properties]
73
- (
74
- class << self
75
- self
76
- end).send :define_method,
77
- :detail,
78
- &(params[:scan] ?
79
- @@__detail__resourced__ : @@__detail__)
80
- end
81
- end
82
-
83
- def with resource
84
- @resource = resource
85
- if block_given?
86
- yield
87
- @resource = nil
88
- end
89
- self
90
- end
91
-
92
- def name
93
- if pattern['#{resource}'] and not @resource
94
- domain, name = pattern.split ':'
95
- name.gsub! /[^,]+\{resource\}/, ''
96
- name << "," if name.empty?
97
- name << "*"
98
- return "#{domain}:#{name}"
99
- end
100
- resource = @resource
101
- eval("\"#{pattern}\"")
102
- end
103
-
104
- def [] property
105
- resource = @resource
106
- query = eval("\"#{pattern}\"")
107
- result = @twiddle.execute(:get, query, property)
108
-
109
- def result.value
110
- self.split( /=/, 2)[1]
111
- end
112
-
113
- result
114
- end
115
-
116
- def []= property, value
117
- resource = @resource
118
- query = eval("\"#{pattern}\"")
119
- @twiddle.execute :set, query, property, value
120
- end
121
-
122
- def invoke method, *args, &block
123
- resource = @resource
124
- query = eval("\"#{pattern} #{method}\"")
125
- return_value = @twiddle.execute :invoke, query, args
126
- if block_given?
127
- block.call return_value
128
- end
129
- return_value
130
- end
131
-
132
- def query query, &block
133
- result = @twiddle.execute(:query, query)
134
- return [] unless result
135
- result = result.split /\s+/
136
- block ? result.collect(&block) : result
137
- end
138
-
139
- def parse_resource resources
140
- return scan if resources == :all
141
- return [resources] unless resources.respond_to? :each
142
- resources
143
- end
144
-
145
- end
146
-
147
- end
148
-
@@ -1,222 +0,0 @@
1
- # The MIT License
2
- #
3
- # Copyright (c) 2011-2012 Marcelo Guimarães <ataxexe@gmail.com>
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in
13
- # all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- # THE SOFTWARE.
22
-
23
- require_relative 'mbean'
24
-
25
- module RBoss
26
- module Twiddle
27
-
28
- module Monitor
29
-
30
- def defaults
31
- @@defaults ||= {
32
- :webapp => {
33
- :title => 'Deployed webapps',
34
- :pattern => 'jboss.web:type=Manager,host=localhost,path=/#{resource}',
35
- :properties => %W(activeSessions maxActive distributable maxActiveSessions
36
- expiredSessions rejectedSessions),
37
- :header => ["Active\nSessions", "Max\nSessions", "Distributable",
38
- "Max Active\nSession", "Expired\nSessions", "Rejected\nSessions"],
39
- :format => {
40
- :distributable => :boolean
41
- },
42
- :scan => proc do
43
- query "jboss.web:type=Manager,*" do |path|
44
- path.gsub!("jboss.web:type=Manager,path=/", "")
45
- path.gsub!(/,host=.+/, '')
46
- path
47
- end
48
- end
49
- },
50
- :web_deployment => {
51
- :title => 'Deployed webapp control',
52
- :pattern => 'jboss.web.deployment:war=/#{resource}'
53
- },
54
- :connector => {
55
- :title => 'JBossWeb connector',
56
- :pattern => 'jboss.web:type=ThreadPool,name=#{resource}',
57
- :properties => %W(maxThreads currentThreadCount currentThreadsBusy),
58
- :header => ['Max Threads', 'Current Threads', 'Busy Threads'],
59
- :health => {
60
- :current_threads => {
61
- :percentage => {
62
- :max => :max_threads,
63
- :using => :current_threads
64
- }
65
- }
66
- },
67
- :scan => proc do
68
- query "jboss.web:type=ThreadPool,*" do |path|
69
- path.gsub "jboss.web:type=ThreadPool,name=", ""
70
- end
71
- end
72
- },
73
- :cached_connection_manager => {
74
- :title => 'JBoss JCA cached connections',
75
- :pattern => 'jboss.jca:service=CachedConnectionManager',
76
- :properties => %W(InUseConnections),
77
- :header => ['In Use Connections'],
78
- },
79
- :main_deployer => {
80
- :title => 'Main Deployer',
81
- :pattern => 'jboss.system:service=MainDeployer'
82
- },
83
- :engine => {
84
- :title => 'JBossWeb engine',
85
- :pattern => 'jboss.web:type=Engine',
86
- :properties => %W(jvmRoute name defaultHost),
87
- :header => ['JVM Route', 'Name', 'Default Host'],
88
- },
89
- :log4j => {
90
- :title => 'JBoss Log4J Service',
91
- :pattern => 'jboss.system:service=Logging,type=Log4jService',
92
- :properties => %W(DefaultJBossServerLogThreshold),
93
- :header => ['Default Server Log Threshold'],
94
- },
95
- :logger => {
96
- :description => 'Logger Service',
97
- :pattern => 'jboss.system:service=Logging,type=Logger'
98
- },
99
- :server => {
100
- :title => 'JBoss Server specifications',
101
- :pattern => 'jboss.system:type=Server',
102
- :properties => %W(StartDate VersionName VersionNumber Version),
103
- :layout => :vertical,
104
- :header => ['Start Date', 'Version Name', 'Version Number', 'Version'],
105
- },
106
- :server_info => {
107
- :title => 'JBoss Server runtime info',
108
- :pattern => 'jboss.system:type=ServerInfo',
109
- :properties => %W(ActiveThreadCount MaxMemory FreeMemory AvailableProcessors
110
- JavaVendor JavaVersion OSName OSArch),
111
- :header => ["Active Threads", "Max Memory", "Free Memory",
112
- "Processors", "Java Vendor", "Java Version", "OS Name", "OS Arch"],
113
- :layout => :vertical,
114
- :format => {
115
- :max_memory => :byte,
116
- :free_memory => :byte
117
- },
118
- :health => {
119
- :free_memory => {
120
- :percentage => {
121
- :max => :max_memory,
122
- :free => :free_memory
123
- }
124
- }
125
- }
126
- },
127
- :server_config => {
128
- :title => 'JBoss Server configuration',
129
- :pattern => 'jboss.system:type=ServerConfig',
130
- :properties => %W(ServerName HomeDir ServerLogDir ServerHomeURL),
131
- :layout => :vertical,
132
- :header => ['Server Name', 'Home Dir', 'Log Dir', 'Home URL'],
133
- },
134
- :system_properties => {
135
- :title => 'System properties',
136
- :pattern => 'jboss:name=SystemProperties,type=Service'
137
- },
138
- :request => {
139
- :title => 'JBossWeb connector requests',
140
- :pattern => 'jboss.web:type=GlobalRequestProcessor,name=#{resource}',
141
- :properties => %W(requestCount errorCount maxTime),
142
- :header => ['Requests', 'Errors', 'Max Time'],
143
- :health => {
144
- :errors => {
145
- :percentage => {
146
- :max => :requests,
147
- :using => :errors
148
- }
149
- }
150
- },
151
- :scan => proc do
152
- query "jboss.web:type=ThreadPool,*" do |path|
153
- path.gsub "jboss.web:type=ThreadPool,name=", ""
154
- end
155
- end
156
- },
157
- :datasource => {
158
- :title => 'Datasource',
159
- :pattern => 'jboss.jca:service=ManagedConnectionPool,name=#{resource}',
160
- :properties => %W(MinSize MaxSize AvailableConnectionCount
161
- InUseConnectionCount ConnectionCount),
162
- :header => ["Min\nSize", "Max\nSize", "Avaliable\nConnections",
163
- "In Use\nConnections", "Connection\nCount"],
164
- :health => {
165
- :in_use_connections => {
166
- :percentage => {
167
- :max => :max_size,
168
- :using => :in_use_connections
169
- }
170
- }
171
- },
172
- :scan => proc do
173
- query "jboss.jca:service=ManagedConnectionPool,*" do |path|
174
- path.gsub "jboss.jca:service=ManagedConnectionPool,name=", ""
175
- end
176
- end
177
- },
178
- :queue => {
179
- :title => 'JMS Queue',
180
- :pattern => 'jboss.messaging.destination:service=Queue,name=#{resource}',
181
- :properties => %W(JNDIName MessageCount DeliveringCount
182
- ScheduledMessageCount MaxSize FullSize Clustered ConsumerCount),
183
- :header => ['JNDI Name', 'Messages', 'Deliveries', 'Scheduleded', 'Max Size',
184
- 'Full Size', 'Clustered', 'Consumed'],
185
- :scan => proc do
186
- query "jboss.messaging.destination:service=Queue,*" do |path|
187
- path.gsub "jboss.messaging.destination:service=Queue,name=", ""
188
- end
189
- end
190
- },
191
- :jndi => {
192
- :title => 'JNDI View',
193
- :pattern => 'jboss:service=JNDIView'
194
- }
195
- }
196
- end
197
-
198
- module_function :defaults
199
-
200
- def mbeans
201
- @mbeans ||= {}
202
- end
203
-
204
- def monitor(mbean_id, params)
205
- mbeans[mbean_id] = RBoss::MBean::new params.merge(:twiddle => @twiddle)
206
- end
207
-
208
- def mbean(mbean_id)
209
- mbean = mbeans[mbean_id]
210
- return RBoss::MBean::new :pattern => mbean_id.to_s, :twiddle => @twiddle unless mbean
211
- if @current_resource
212
- mbean.with @current_resource
213
- end
214
- mbean
215
- end
216
-
217
- end
218
-
219
- end
220
-
221
- end
222
-