Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 549207 Details for
Bug 769861
[as4 and as5 plugins] add maxThreads trait to JBossAS Embedded JBossWeb Connector Resources
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh92 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
the patch to add the feature (against 3.0.1.GA)
0003-Adding-connector-maxThreads-as-a-Trait.patch (text/plain), 4.10 KB, created by
Mohamed Hamza Ben Mansour
on 2011-12-22 15:07:07 UTC
(
hide
)
Description:
the patch to add the feature (against 3.0.1.GA)
Filename:
MIME Type:
Creator:
Mohamed Hamza Ben Mansour
Created:
2011-12-22 15:07:07 UTC
Size:
4.10 KB
patch
obsolete
>From e32ee82c2790e11c1562fc286e254c8a0a2bdda8 Mon Sep 17 00:00:00 2001 >From: mbenmans <hamza@redhat.com> >Date: Thu, 22 Dec 2011 15:30:15 +0100 >Subject: [PATCH 3/3] Adding connector maxThreads as a Trait > >--- > .../src/main/resources/META-INF/rhq-plugin.xml | 5 +++++ > .../jbossas/JBossASTomcatConnectorComponent.java | 9 ++++++++- > .../src/main/resources/META-INF/rhq-plugin.xml | 5 +++++ > 3 files changed, 18 insertions(+), 1 deletions(-) > >diff --git a/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml >index 5ca45a1..9346f0c 100644 >--- a/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml >+++ b/modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml >@@ -1238,6 +1238,11 @@ > displayName="Current Thread Count" > defaultOn="true" category="utilization" displayType="summary" > description="the number of threads for this connector that currently exist"/> >+ >+ <metric property="ThreadPool|maxThreads" >+ displayName="Threadpool Max Threads" >+ defaultOn="true" category="utilization" displayType="summary" dataType="trait" >+ description="Maximum number of threads that can be allocated for the ThreadPool."/> > > </service> > >diff --git a/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/JBossASTomcatConnectorComponent.java b/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/JBossASTomcatConnectorComponent.java >index 94788e7..e35885f 100644 >--- a/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/JBossASTomcatConnectorComponent.java >+++ b/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/JBossASTomcatConnectorComponent.java >@@ -30,7 +30,9 @@ import org.mc4j.ems.connection.bean.EmsBean; > import org.mc4j.ems.connection.bean.attribute.EmsAttribute; > > import org.rhq.core.domain.configuration.Configuration; >+import org.rhq.core.domain.measurement.DataType; > import org.rhq.core.domain.measurement.MeasurementDataNumeric; >+import org.rhq.core.domain.measurement.MeasurementDataTrait; > import org.rhq.core.domain.measurement.MeasurementReport; > import org.rhq.core.domain.measurement.MeasurementScheduleRequest; > import org.rhq.plugins.jmx.MBeanResourceComponent; >@@ -94,7 +96,12 @@ public class JBossASTomcatConnectorComponent extends MBeanResourceComponent<JBos > Object valueObject = attribute.refresh(); > Number value = (Number) valueObject; > >- report.addData(new MeasurementDataNumeric(request, value.doubleValue())); >+ if (request.getDataType().equals(DataType.TRAIT)) { >+ report.addData(new MeasurementDataTrait(request, String.valueOf(value))); >+ } else { >+ report.addData(new MeasurementDataNumeric(request, value >+ .doubleValue())); >+ } > } catch (Exception e) { > log.error("Failed to obtain measurement [" + name + "]", e); > } >diff --git a/modules/plugins/jboss-as/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as/src/main/resources/META-INF/rhq-plugin.xml >index 990ac37..9623c4c 100644 >--- a/modules/plugins/jboss-as/src/main/resources/META-INF/rhq-plugin.xml >+++ b/modules/plugins/jboss-as/src/main/resources/META-INF/rhq-plugin.xml >@@ -374,6 +374,11 @@ > <metric property="jboss.web:name=%schema%%dash%%address%-%port%,type=ThreadPool:currentThreadCount" > displayName="Threads Allocated" > defaultOn="true" category="utilization" displayType="summary"/> >+ >+ <!-- jboss.web:name=http-0.0.0.0-8080,type=ThreadPool:maxThreads --> >+ <metric property="jboss.web:name=%schema%%dash%%address%-%port%,type=ThreadPool:maxThreads" >+ displayName="Threadpool Max Threads." >+ defaultOn="true" category="utilization" displayType="detail" dataType="trait" measurementType="dynamic"/> > > </service> > <service name="VHost" >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 769861
: 549207