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,140 +0,0 @@
1
- #!/bin/sh
2
- #
3
- # $Id: jboss_init_redhat.sh 99350 2010-01-13 17:05:27Z bshim $
4
- #
5
- # chkconfig: 345 90 10
6
- # description: Initializes service jboss
7
- #
8
- # JBoss Control Script
9
- #
10
- # To use this script run it as root - it will switch to the specified user
11
- #
12
- # Here is a little (and extremely primitive) startup/shutdown script
13
- # for RedHat systems. It assumes that JBoss lives in /usr/local/jboss,
14
- # it's run by user 'jboss' and JDK binaries are in /usr/local/jdk/bin.
15
- # All this can be changed in the script itself.
16
- #
17
- # Either modify this script for your requirements or just ensure that
18
- # the following variables are set correctly before calling the script.
19
- JBOSS_ADMIN_USER="<%= @config[:jmx_user] %>"
20
- JBOSS_ADMIN_PWD="<%= @config[:jmx_password] %>"
21
- #1099
22
- JBOSS_JNP_PORT="<%= @config[:jnp_port] %>"
23
-
24
- #define where jboss is - this is the directory containing directories log, bin, conf etc
25
- #/opt/jboss
26
- JBOSS_HOME=${JBOSS_HOME:-"<%= @config[:jboss_home] %>"}
27
-
28
- #define the user under which jboss will run, or use 'RUNASIS' to run as the current user
29
- JBOSS_USER=${JBOSS_USER:-"<%= @config[:jboss_user] %>"}
30
-
31
- #make sure java is in your path
32
- #/usr/java/default
33
- JAVAPTH=${JAVAPTH:-"<%= @config[:java_path] %>"}
34
-
35
- #configuration to use, usually one of 'minimal', 'default', 'all', 'production'
36
- JBOSS_CONF=${JBOSS_CONF:-"<%= @config[:profile] %>"}
37
-
38
- #if JBOSS_HOST specified, use -b to bind jboss services to that address
39
- JBOSS_BIND_ADDR=${JBOSS_HOST:-"<%= @config[:bind_address] %>"}
40
-
41
- #define the script to use to start jboss
42
- JBOSSSH=${JBOSSSH:-"$JBOSS_HOME/bin/run.sh -c $JBOSS_CONF -b $JBOSS_BIND_ADDR"}
43
-
44
- if [ "$JBOSS_USER" = "RUNASIS" ]; then
45
- SUBIT=""
46
- else
47
- SUBIT="su - $JBOSS_USER -c "
48
- fi
49
-
50
- if [ -n "$JBOSS_CONSOLE" -a ! -d "$JBOSS_CONSOLE" ]; then
51
- # ensure the file exists
52
- touch $JBOSS_CONSOLE
53
- if [ ! -z "$SUBIT" ]; then
54
- chown $JBOSS_USER $JBOSS_CONSOLE
55
- fi
56
- fi
57
-
58
- if [ -n "$JBOSS_CONSOLE" -a ! -f "$JBOSS_CONSOLE" ]; then
59
- echo "WARNING: location for saving console log invalid: $JBOSS_CONSOLE"
60
- echo "WARNING: ignoring it and using /dev/null"
61
- JBOSS_CONSOLE="/dev/null"
62
- fi
63
-
64
- #define what will be done with the console log
65
- JBOSS_CONSOLE=${JBOSS_CONSOLE:-"/dev/null"}
66
-
67
- JBOSS_CMD_START="cd $JBOSS_HOME/bin; $JBOSSSH"
68
-
69
- JBOSS_CMD_STOP=${JBOSS_CMD_STOP:-"$JBOSS_HOME/bin/shutdown.sh -s jnp://$JBOSS_BIND_ADDR:$JBOSS_JNP_PORT -u $JBOSS_ADMIN_USER -p '$JBOSS_ADMIN_PWD'"}
70
-
71
-
72
- if [ -z "`echo $PATH | grep $JAVAPTH`" ]; then
73
- export PATH=$PATH:$JAVAPTH
74
- fi
75
-
76
- if [ ! -d "$JBOSS_HOME" ]; then
77
- echo JBOSS_HOME does not exist as a valid directory : $JBOSS_HOME
78
- exit 1
79
- fi
80
-
81
- function jbossPID()
82
- {
83
- # try get the JVM PID
84
- local jbossPID="x"
85
- jbossPID=$(ps -eo pid,cmd | grep "org.jboss.Main" | grep "${JBOSS_BIND_ADDR} " | grep "${JBOSS_CONF}" | grep -v grep | cut -c1-6)
86
-
87
- echo "$jbossPID"
88
- }
89
-
90
- stop() {
91
- echo "stop JBoss (instance $JBOSS_CONF at $JBOSS_BIND_ADDR)..."
92
-
93
- if [ -z "$SUBIT" ]; then
94
- $JBOSS_CMD_STOP
95
- else
96
- echo "JBOSS_CMD_STOP = $JBOSS_CMD_STOP"
97
- $SUBIT "$JBOSS_CMD_STOP"
98
- fi
99
-
100
- sleep 20
101
-
102
- # try get the JVM PID
103
- PID=$(jbossPID)
104
- if [ "x$PID" = "x" ]
105
- then
106
- echo "JBoss (instance $JBOSS_CONF at $JBOSS_BIND_ADDR) stopped!"
107
- else
108
- echo "process still running..."
109
- echo "killing JBoss (JVM process) [PID $PID]"
110
- kill -9 $PID
111
- fi
112
- }
113
-
114
- case "$1" in
115
- start)
116
-
117
- echo "Cleaning work and tmp..."
118
- rm -rf $JBOSS_HOME/server/<%= @config[:profile] %>/work/*
119
- rm -rf $JBOSS_HOME/server/<%= @config[:profile] %>/tmp/*
120
-
121
- echo "JBOSS_CMD_START = $JBOSS_CMD_START"
122
-
123
- cd $JBOSS_HOME/bin
124
- if [ -z "$SUBIT" ]; then
125
- eval $JBOSS_CMD_START >${JBOSS_CONSOLE} 2>&1 &
126
- else
127
- $SUBIT "$JBOSS_CMD_START >${JBOSS_CONSOLE} 2>&1 &"
128
- fi
129
- ;;
130
- stop)
131
- stop
132
- ;;
133
- restart)
134
- $0 stop
135
- $0 start
136
- ;;
137
- *)
138
- echo "usage: $0 (start|stop|restart|help)"
139
- esac
140
-
@@ -1,282 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!--
3
- Beans that provide JBoss AS-side functionality for mod_cluster. These
4
- beans are all "On Demand", i.e. that are not installed unless requested.
5
- -->
6
- <deployment xmlns="urn:jboss:bean-deployer:2.0">
7
-
8
- <!-- Entry point: catalina lifecycle listener -->
9
- <bean name="ModClusterListener" class="org.jboss.modcluster.catalina.CatalinaEventHandlerAdapter">
10
- <constructor>
11
- <parameter class="org.jboss.modcluster.ContainerEventHandler"><inject bean="HAModClusterService"/></parameter>
12
- <parameter class="javax.management.MBeanServer"><inject bean="JMXKernel" property="mbeanServer"/></parameter>
13
- </constructor>
14
- <depends>WebServer</depends>
15
- </bean>
16
-
17
- <!-- The core mod_cluster service -->
18
- <bean name="ModClusterService" class="org.jboss.modcluster.ModClusterService" mode="On Demand">
19
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster",exposedInterface=org.jboss.modcluster.ModClusterServiceMBean.class)</annotation>
20
- <constructor>
21
- <parameter class="org.jboss.modcluster.config.ModClusterConfig"><inject bean="ModClusterConfig"/></parameter>
22
- <parameter class="org.jboss.modcluster.load.LoadBalanceFactorProvider"><inject bean="DynamicLoadBalanceFactorProvider"/></parameter>
23
- </constructor>
24
- </bean>
25
-
26
- <!-- The core mod_cluster service, implemented as an HA singleton -->
27
- <bean name="HAModClusterService" class="org.jboss.modcluster.ha.HAModClusterService" mode="On Demand">
28
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster",exposedInterface=org.jboss.modcluster.ha.HAModClusterServiceMBean.class)</annotation>
29
- <constructor>
30
- <parameter class="org.jboss.modcluster.config.ha.HAModClusterConfig"><inject bean="ModClusterConfig"/></parameter>
31
- <parameter class="org.jboss.modcluster.load.LoadBalanceFactorProvider"><inject bean="DynamicLoadBalanceFactorProvider"/></parameter>
32
- <parameter class="org.jboss.ha.framework.interfaces.HAPartition"><inject bean="HAPartition"/></parameter>
33
- <parameter class="org.jboss.ha.framework.interfaces.HASingletonElectionPolicy"><bean class="org.jboss.ha.singleton.HASingletonElectionPolicySimple"/></parameter>
34
- </constructor>
35
- </bean>
36
-
37
- <!-- Configure this node's communication with the load balancer -->
38
- <bean name="ModClusterConfig" class="org.jboss.modcluster.config.ha.HAModClusterConfig" mode="On Demand">
39
-
40
- <!-- Comma separated list of address:port listing the httpd servers
41
- where mod_cluster is running. -->
42
- <property name="proxyList">${jboss.mod_cluster.proxyList,jboss.modcluster.proxyList:}</property>
43
- <!-- URL prefix to send with commands to mod_cluster. Default is no prefix. -->
44
- <!--property name="proxyURL"></property-->
45
-
46
- <!-- mod_advertise is a small httpd module that advertises the
47
- availability of httpd servers via multicast, allowing
48
- ModClusterService to discover the httpd front-end instead of/in
49
- addition to having them defined in proxyList. -->
50
- <!-- Whether to listen for advertise messages -->
51
- <property name="advertise">${jboss.mod_cluster.advertise:true}</property>
52
- <!-- Multicast address on which to listen for advertisements -->
53
- <property name="advertiseGroupAddress">${jboss.mod_cluster.advertise.address,jboss.modcluster.advertise.address,jboss.partition.udpGroup:224.0.1.105}</property>
54
- <!-- Port to listen to for advertisements -->
55
- <property name="advertisePort">${jboss.mod_cluster.advertise.port,jboss.modcluster.advertise.port:23364}</property>
56
-
57
- <!-- Comma delimited list of contexts that should *not* be auto-registered with httpd. -->
58
- <!-- ROOT indicates the root context. -->
59
- <!-- Context may be qualified by host using a colon, e.g. host1:context1 -->
60
- <!-- If no host is defined, localhost is assumed. -->
61
- <property name="excludedContexts">${jboss.mod_cluster.excludedContexts,jboss.modcluster.excludedContexts:ROOT,admin-console,invoker,jbossws,jmx-console,juddi,web-console}</property>
62
- <property name="autoEnableContexts">${jboss.mod_cluster.autoEnableContexts:true}</property>
63
-
64
- <!-- Security key the proxy is going to send with advertise messages.
65
- Default is none. -->
66
- <!--property name="advertiseSecurityKey"></property-->
67
-
68
- <!-- Whether to use SSL to communicate with mod_cluster. Note this
69
- has nothing to do with handling of https requests by JBoss Web -->
70
- <property name="ssl">false</property>
71
-
72
- <!-- Configuration values for the load balancer itself (must be the
73
- same on all nodes in the cluster). These will be passed to the
74
- load balancer. -->
75
- <property name="stickySession">true</property>
76
- <property name="stickySessionForce">false</property>
77
- <property name="stickySessionRemove">false</property>
78
- <property name="maxAttempts">1</property>
79
- <property name="workerTimeout">-1</property>
80
- </bean>
81
-
82
- <!-- Provides information to ModClusterService informing it how much load
83
- this server should take. This impl calculates load factor from a
84
- number of metrics and adjusts the value periodically based on runtime
85
- conditions, using to the JBossWeb engine's backgroundProcessorDelay. -->
86
- <bean name="DynamicLoadBalanceFactorProvider" class="org.jboss.modcluster.load.impl.DynamicLoadBalanceFactorProvider" mode="On Demand">
87
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor",exposedInterface=org.jboss.modcluster.load.impl.DynamicLoadBalanceFactorProviderMBean.class)</annotation>
88
- <constructor>
89
- <parameter>
90
- <!-- Define the load metrics to use in your load balance factor calculation here -->
91
- <set elementClass="org.jboss.modcluster.load.metric.LoadMetric">
92
- <inject bean="BusyConnectorsLoadMetric"/>
93
- <inject bean="HeapMemoryUsageLoadMetric"/>
94
- </set>
95
- </parameter>
96
- </constructor>
97
- <!-- The number of historical load values used to determine load factor -->
98
- <!--property name="history">9</property-->
99
- <!-- The exponential decay factor for historical load values -->
100
- <!--property name="decayFactor">2</property-->
101
- </bean>
102
-
103
- <!-- Default load metrics/sources -->
104
- <!-- The JBossWeb connector thread pool usage as a ratio of busy threads to max thread pool size -->
105
- <!-- Analogous to method=B in mod_jk -->
106
- <bean name="BusyConnectorsLoadMetric" class="org.jboss.modcluster.load.metric.impl.BusyConnectorsLoadMetric" mode="On Demand">
107
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor,metric=BusyConnectors",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
108
- <constructor>
109
- <parameter><inject bean="ThreadPoolLoadMetricSource"/></parameter>
110
- </constructor>
111
- <!-- The weight determines the significance of this metric with respect
112
- to others in the overall load balance factor calculation -->
113
- <property name="weight">2</property>
114
- </bean>
115
- <!-- Queries all JBossWeb ThreadPool mbeans -->
116
- <bean name="ThreadPoolLoadMetricSource" class="org.jboss.modcluster.load.metric.impl.ThreadPoolLoadMetricSource" mode="On Demand">
117
- <constructor>
118
- <parameter class="javax.management.MBeanServer"><inject bean="JMXKernel" property="mbeanServer"/></parameter>
119
- <!-- Object name pattern for connector thread pools -->
120
- <!--parameter>jboss.web:type=ThreadPool,*</parameter-->
121
- </constructor>
122
- </bean>
123
-
124
- <!-- The heap memory usage as a ratio of used heap to max heap size -->
125
- <!-- N.B. This load metric is its own source -->
126
- <bean name="HeapMemoryUsageLoadMetric" class="org.jboss.modcluster.load.metric.impl.HeapMemoryUsageLoadMetric" mode="On Demand">
127
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor,metric=HeapMemoryUsage",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
128
- <!--property name="weight">1</property-->
129
- </bean>
130
-
131
-
132
- <!-- Alternative load balance factor providers -->
133
-
134
- <!-- Basic impl that returns a static load balance factor.
135
- This would replace the DynamicLoadBalanceFactorProvider
136
- used above.
137
- -->
138
- <bean name="SimpleLoadBalanceFactorProvider" class="org.jboss.modcluster.load.impl.SimpleLoadBalanceFactorProvider" mode="On Demand">
139
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor",exposedInterface=org.jboss.modcluster.load.impl.SimpleLoadBalanceFactorProviderMBean.class)</annotation>
140
- <property name="loadBalanceFactor">1</property>
141
- </bean>
142
-
143
- <!--
144
- Alternative load metrics, grouped by source.
145
- To use these, inject them into the set passed to the
146
- DynamicLoadBalanceFactorProvider bean's constructor above.
147
- -->
148
-
149
- <!-- CPU usage -->
150
- <!-- Perhaps the best metric for determining system load - but only available on Java 1.6 or later -->
151
- <bean name="AverageSystemLoadMetric" class="org.jboss.modcluster.load.metric.impl.AverageSystemLoadMetric" mode="On Demand">
152
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor,metric=AverageSystemLoad",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
153
- <constructor>
154
- <parameter><inject bean="OperatingSystemLoadMetricSource"/></parameter>
155
- </constructor>
156
- </bean>
157
- <!-- The system memory usage as ratio of used memory to total memory size -->
158
- <!-- Requires com.sun.management.OperatingSystemMXBean, i.e. Sun or OpenJDK JVM -->
159
- <bean name="SystemMemoryUsageLoadMetric" class="org.jboss.modcluster.load.metric.impl.SystemMemoryUsageLoadMetric" mode="On Demand">
160
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor,metric=SystemMemoryUsage",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
161
- <constructor>
162
- <parameter><inject bean="OperatingSystemLoadMetricSource"/></parameter>
163
- </constructor>
164
- </bean>
165
- <!-- Uses the platform's OperatingSystemMXBean -->
166
- <bean name="OperatingSystemLoadMetricSource" class="org.jboss.modcluster.load.metric.impl.OperatingSystemLoadMetricSource" mode="On Demand">
167
- </bean>
168
-
169
-
170
- <!-- The number of requests/sec processed by the JBossWeb connectors, with respect to the defined capacity -->
171
- <!-- Analogous to method=R in mod_jk -->
172
- <bean name="RequestCountLoadMetric" class="org.jboss.modcluster.load.metric.impl.RequestCountLoadMetric" mode="On Demand">
173
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor,metric=RequestCount",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
174
- <constructor>
175
- <parameter class="org.jboss.modcluster.load.metric.impl.RequestProcessorLoadMetricSource"><inject bean="RequestProcessorLoadMetricSource"/></parameter>
176
- <!--parameter>requestCount</parameter-->
177
- </constructor>
178
- <!-- This metric requires an explicit capacity, e.g. maximum capacity of 1000 requests/sec -->
179
- <property name="capacity">1000</property>
180
- </bean>
181
- <!-- The incoming traffic received by JBossWeb connectors in KB/sec, with respect to the defined capacity -->
182
- <!-- Analogous to method=T in mod_jk -->
183
- <bean name="ReceiveTrafficLoadMetric" class="org.jboss.modcluster.load.metric.impl.ReceiveTrafficLoadMetric" mode="On Demand">
184
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor,metric=ReceiveTraffic",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
185
- <constructor>
186
- <parameter class="org.jboss.modcluster.load.metric.impl.RequestProcessorLoadMetricSource"><inject bean="RequestProcessorLoadMetricSource"/></parameter>
187
- <!--parameter>bytesReceived</parameter-->
188
- </constructor>
189
- <!-- This metric requires an explicit capacity, e.g. max capacity of 1024 KB/s -->
190
- <property name="capacity">1024</property>
191
- </bean>
192
- <!-- The outgoing traffic sent by JBossWeb connectors in KB/sec, with respect to the defined capacity -->
193
- <bean name="SendTrafficLoadMetric" class="org.jboss.modcluster.load.metric.impl.SendTrafficLoadMetric" mode="On Demand">
194
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor,metric=SendTraffic",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
195
- <constructor>
196
- <parameter class="org.jboss.modcluster.load.metric.impl.RequestProcessorLoadMetricSource"><inject bean="RequestProcessorLoadMetricSource"/></parameter>
197
- <!--parameter>bytesSent</parameter-->
198
- </constructor>
199
- <!-- This metric requires an explicit capacity, e.g. max capacity of 512 KB/s -->
200
- <property name="capacity">512</property>
201
- </bean>
202
- <!-- Queries all JBossWeb GlobalRequestProcessor mbeans -->
203
- <bean name="RequestProcessorLoadMetricSource" class="org.jboss.modcluster.load.metric.impl.RequestProcessorLoadMetricSource" mode="On Demand">
204
- <constructor>
205
- <parameter class="javax.management.MBeanServer"><inject bean="JMXKernel" property="mbeanServer"/></parameter>
206
- <!-- Object name pattern for request processors -->
207
- <!--parameter>jboss.web:type=GlobalRequestProcessor,*</parameter-->
208
- </constructor>
209
- </bean>
210
-
211
-
212
- <!-- The number of active sessions, with respect to the defined capacity -->
213
- <!-- Analogous to method=S in mod_jk -->
214
- <bean name="ActiveSessionsLoadMetric" class="org.jboss.modcluster.load.metric.impl.ActiveSessionsLoadMetric" mode="On Demand">
215
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor,metric=ActiveSessions",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
216
- <constructor>
217
- <parameter><inject bean="SessionLoadMetricSource"/></parameter>
218
- <!--parameter>activeSessions</parameter-->
219
- </constructor>
220
- <!-- This metric requires an explicit capacity, e.g. max capacity of 1000 active sessions -->
221
- <property name="capacity">1000</property>
222
- </bean>
223
- <!-- Queries all JBossWeb session manager mbeans -->
224
- <bean name="SessionLoadMetricSource" class="org.jboss.modcluster.load.metric.impl.SessionLoadMetricSource" mode="On Demand">
225
- <constructor>
226
- <parameter class="javax.management.MBeanServer"><inject bean="JMXKernel" property="mbeanServer"/></parameter>
227
- <!-- Object name pattern for session managers -->
228
- <!--parameter>jboss.web:type=Manager,*</parameter-->
229
- </constructor>
230
- </bean>
231
-
232
-
233
- <!-- Returns the connection pool usage as a ratio of used to max pool size -->
234
- <bean name="ConnectionPoolUsageMetric" class="org.jboss.modcluster.load.metric.impl.ConnectionPoolUsageLoadMetric" mode="On Demand">
235
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor,metric=ConnectionPoolUsage",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
236
- <constructor>
237
- <parameter><inject bean="ConnectionPoolLoadMetricSource"/></parameter>
238
- <!--parameter>InUseConnectionCount</parameter-->
239
- <!--parameter>MaxSize</parameter-->
240
- </constructor>
241
- </bean>
242
- <!-- Queries all JCA connection pools -->
243
- <bean name="ConnectionPoolLoadMetricSource" class="org.jboss.modcluster.load.metric.impl.ConnectionPoolLoadMetricSource" mode="On Demand">
244
- <constructor>
245
- <parameter class="javax.management.MBeanServer"><inject bean="JMXKernel" property="mbeanServer"/></parameter>
246
- <!-- Object name pattern for connector thread pools -->
247
- <!--parameter>jboss.jca:service=ManagedConnectionPool,*</parameter-->
248
- </constructor>
249
- </bean>
250
-
251
- <!-- Generic load metrics/sources -->
252
-
253
- <!-- Uses the sum of the values of the specified attribute for each
254
- mbean matching the query, with respect to a defined capacity. -->
255
- <bean name="MBeanAttributeLoadMetric" class="org.jboss.modcluster.load.metric.impl.MBeanAttributeLoadMetric" mode="On Demand">
256
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor,metric=MBeanAttribute",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
257
- <constructor>
258
- <parameter><inject bean="MBeanQueryLoadMetricSource"/></parameter>
259
- <parameter><!-- mbean attribute --></parameter>
260
- </constructor>
261
- <property name="capacity">1</property>
262
- </bean>
263
- <!-- Uses the ratio of the sum of the values of the specified dividend attribute,
264
- to the sum of the values of the specified divisor attribute for each mbean
265
- matching the query. -->
266
- <bean name="MBeanAttributeRatioLoadMetric" class="org.jboss.modcluster.load.metric.impl.MBeanAttributeRatioLoadMetric" mode="On Demand">
267
- <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster,provider=LoadBalanceFactor,metric=MBeanAttributeRatio",exposedInterface=org.jboss.modcluster.load.metric.LoadMetricMBean.class)</annotation>
268
- <constructor>
269
- <parameter><inject bean="MBeanQueryLoadMetricSource"/></parameter>
270
- <parameter><!-- dividend attribute --></parameter>
271
- <parameter><!-- divisor attribute --></parameter>
272
- </constructor>
273
- </bean>
274
- <!-- Queries for mbeans matching the specified pattern -->
275
- <bean name="MBeanQueryLoadMetricSource" class="org.jboss.modcluster.load.metric.impl.MBeanQueryLoadMetricSource" mode="On Demand">
276
- <constructor>
277
- <parameter><!-- ObjectName pattern --></parameter>
278
- <parameter><inject bean="JMXKernel" property="mbeanServer"/></parameter>
279
- </constructor>
280
- </bean>
281
-
282
- </deployment>
@@ -1,60 +0,0 @@
1
- rem ### -*- batch file -*- ######################################################
2
- rem # ##
3
- rem # JBoss Bootstrap Script Configuration ##
4
- rem # ##
5
- rem #############################################################################
6
-
7
- rem # $Id: run.conf.bat 112288 2011-10-04 14:59:56Z mbenitez $
8
-
9
- rem #
10
- rem # This batch file is executed by run.bat to initialize the environment
11
- rem # variables that run.bat uses. It is recommended to use this file to
12
- rem # configure these variables, rather than modifying run.bat itself.
13
- rem #
14
-
15
- if not "x%JAVA_OPTS%" == "x" goto JAVA_OPTS_SET
16
-
17
- rem #
18
- rem # Specify the JBoss Profiler configuration file to load.
19
- rem #
20
- rem # Default is to not load a JBoss Profiler configuration file.
21
- rem #
22
- rem set "PROFILER=%JBOSS_HOME%\bin\jboss-profiler.properties"
23
-
24
- rem #
25
- rem # Specify the location of the Java home directory (it is recommended that
26
- rem # this always be set). If set, then "%JAVA_HOME%\bin\java" will be used as
27
- rem # the Java VM executable; otherwise, "%JAVA%" will be used (see below).
28
- rem #
29
- rem set "JAVA_HOME=C:\opt\jdk1.6.0_13"
30
-
31
- rem #
32
- rem # Specify the exact Java VM executable to use - only used if JAVA_HOME is
33
- rem # not set. Default is "java".
34
- rem #
35
- rem set "JAVA=C:\opt\jdk1.6.0_13\bin\java"
36
-
37
- rem #
38
- rem # Specify options to pass to the Java VM. Note, there are some additional
39
- rem # options that are always passed by run.bat.
40
- rem #
41
-
42
- rem # JVM memory allocation pool parameters - modify as appropriate.
43
- set "JAVA_OPTS=-Xms<%= @config[:heap_size] %> -Xmx<%= @config[:heap_size] %>"
44
- set "JAVA_OPTS=%JAVA_OPTS% -XX:PermSize=<%= @config[:perm_size] %> -XX:MaxPermSize=<%= @config[:perm_size] %>"
45
- set "JAVA_OPTS=%JAVA_OPTS% -Xss<%= @config[:stack_size] %>"
46
- set "JAVA_OPTS=%JAVA_OPTS% -Dorg.jboss.resolver.warning=true -Dsun.lang.ClassLoader.allowArraySyntax=true"
47
-
48
- rem # Reduce the RMI GCs to once per hour for Sun JVMs.
49
- set "JAVA_OPTS=%JAVA_OPTS% -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
50
-
51
- rem # Warn when resolving remote XML DTDs or schemas.
52
- set "JAVA_OPTS=%JAVA_OPTS% -Dorg.jboss.resolver.warning=true"
53
-
54
- rem # Sample JPDA settings for remote socket debugging
55
- <%= "rem" unless @config[:debug] == :socket %> set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
56
-
57
- rem # Sample JPDA settings for shared memory debugging
58
- <%= "rem" unless @config[:debug] == :shared_memory %> set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_shmem,address=jboss,server=y,suspend=n"
59
-
60
- :JAVA_OPTS_SET