Author: remy.maucherat(a)jboss.com
Date: 2012-04-26 12:23:56 -0400 (Thu, 26 Apr 2012)
New Revision: 2033
Modified:
branches/7.0.x/java/org/apache/coyote/ajp/AjpAprProtocol.java
branches/7.0.x/java/org/apache/coyote/ajp/AjpProtocol.java
branches/7.0.x/java/org/apache/coyote/http11/Http11AprProtocol.java
branches/7.0.x/java/org/apache/coyote/http11/Http11Protocol.java
trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
trunk/java/org/apache/coyote/ajp/AjpProtocol.java
trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
trunk/java/org/apache/coyote/http11/Http11Protocol.java
Log:
Separate the JMX name for the regular name for better addresses.
Modified: branches/7.0.x/java/org/apache/coyote/ajp/AjpAprProtocol.java
===================================================================
--- branches/7.0.x/java/org/apache/coyote/ajp/AjpAprProtocol.java 2012-04-26 13:33:04 UTC
(rev 2032)
+++ branches/7.0.x/java/org/apache/coyote/ajp/AjpAprProtocol.java 2012-04-26 16:23:56 UTC
(rev 2033)
@@ -284,8 +284,7 @@
}
}
- // *
- public String getName() {
+ public String getJmxName() {
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
@@ -294,6 +293,14 @@
return ("ajp-" + encodedAddr + endpoint.getPort());
}
+ public String getName() {
+ String encodedAddr = "";
+ if (getAddress() != null) {
+ encodedAddr = getAddress() + ":";
+ }
+ return ("ajp-" + encodedAddr + endpoint.getPort());
+ }
+
/**
* Processor cache.
*/
@@ -533,7 +540,7 @@
long count = registerCount.incrementAndGet();
ObjectName rpName = new ObjectName
(proto.getDomain() + ":type=RequestProcessor,worker="
- + proto.getName() + ",name=AjpRequest" +
count);
+ + proto.getJmxName() + ",name=AjpRequest" +
count);
if (log.isDebugEnabled()) {
log.debug("Register " + rpName);
}
Modified: branches/7.0.x/java/org/apache/coyote/ajp/AjpProtocol.java
===================================================================
--- branches/7.0.x/java/org/apache/coyote/ajp/AjpProtocol.java 2012-04-26 13:33:04 UTC
(rev 2032)
+++ branches/7.0.x/java/org/apache/coyote/ajp/AjpProtocol.java 2012-04-26 16:23:56 UTC
(rev 2033)
@@ -261,8 +261,7 @@
}
}
- // *
- public String getName() {
+ public String getJmxName() {
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
@@ -271,6 +270,14 @@
return ("ajp-" + encodedAddr + endpoint.getPort());
}
+ public String getName() {
+ String encodedAddr = "";
+ if (getAddress() != null) {
+ encodedAddr = getAddress() + ":";
+ }
+ return ("ajp-" + encodedAddr + endpoint.getPort());
+ }
+
/**
* Processor cache.
*/
@@ -499,7 +506,7 @@
long count = registerCount.incrementAndGet();
ObjectName rpName = new ObjectName
(proto.getDomain() +
":type=RequestProcessor,worker="
- + proto.getName() + ",name=AjpRequest" +
count);
+ + proto.getJmxName() + ",name=AjpRequest" +
count);
if (log.isDebugEnabled()) {
log.debug("Register " + rpName);
}
Modified: branches/7.0.x/java/org/apache/coyote/http11/Http11AprProtocol.java
===================================================================
--- branches/7.0.x/java/org/apache/coyote/http11/Http11AprProtocol.java 2012-04-26
13:33:04 UTC (rev 2032)
+++ branches/7.0.x/java/org/apache/coyote/http11/Http11AprProtocol.java 2012-04-26
16:23:56 UTC (rev 2033)
@@ -230,7 +230,7 @@
}
}
- public String getName() {
+ public String getJmxName() {
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
@@ -239,6 +239,14 @@
return ("http-" + encodedAddr + endpoint.getPort());
}
+ public String getName() {
+ String encodedAddr = "";
+ if (getAddress() != null) {
+ encodedAddr = getAddress() + ":";
+ }
+ return ("http-" + encodedAddr + endpoint.getPort());
+ }
+
protected AprEndpoint endpoint=new AprEndpoint();
protected HashMap<String, Object> attributes = new HashMap<String,
Object>();
@@ -694,7 +702,7 @@
long count = registerCount.incrementAndGet();
ObjectName rpName = new ObjectName
(proto.getDomain() +
":type=RequestProcessor,worker="
- + proto.getName() + ",name=HttpRequest" +
count);
+ + proto.getJmxName() + ",name=HttpRequest" +
count);
if (log.isDebugEnabled()) {
log.debug("Register " + rpName);
}
Modified: branches/7.0.x/java/org/apache/coyote/http11/Http11Protocol.java
===================================================================
--- branches/7.0.x/java/org/apache/coyote/http11/Http11Protocol.java 2012-04-26 13:33:04
UTC (rev 2032)
+++ branches/7.0.x/java/org/apache/coyote/http11/Http11Protocol.java 2012-04-26 16:23:56
UTC (rev 2033)
@@ -277,7 +277,7 @@
}
}
- public String getName() {
+ public String getJmxName() {
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
@@ -286,6 +286,14 @@
return ("http-" + encodedAddr + endpoint.getPort());
}
+ public String getName() {
+ String encodedAddr = "";
+ if (getAddress() != null) {
+ encodedAddr = getAddress() + ":";
+ }
+ return ("http-" + encodedAddr + endpoint.getPort());
+ }
+
// ------------------------------------------------------------- Properties
@@ -735,7 +743,7 @@
long count = registerCount.incrementAndGet();
ObjectName rpName = new ObjectName
(proto.getDomain() +
":type=RequestProcessor,worker="
- + proto.getName() + ",name=HttpRequest" +
count);
+ + proto.getJmxName() + ",name=HttpRequest" +
count);
if (log.isDebugEnabled()) {
log.debug("Register " + rpName);
}
Modified: trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
===================================================================
--- trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java 2012-04-26 13:33:04 UTC (rev
2032)
+++ trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java 2012-04-26 16:23:56 UTC (rev
2033)
@@ -284,8 +284,7 @@
}
}
- // *
- public String getName() {
+ public String getJmxName() {
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
@@ -294,6 +293,14 @@
return ("ajp-" + encodedAddr + endpoint.getPort());
}
+ public String getName() {
+ String encodedAddr = "";
+ if (getAddress() != null) {
+ encodedAddr = getAddress() + ":";
+ }
+ return ("ajp-" + encodedAddr + endpoint.getPort());
+ }
+
/**
* Processor cache.
*/
@@ -533,7 +540,7 @@
long count = registerCount.incrementAndGet();
ObjectName rpName = new ObjectName
(proto.getDomain() + ":type=RequestProcessor,worker="
- + proto.getName() + ",name=AjpRequest" +
count);
+ + proto.getJmxName() + ",name=AjpRequest" +
count);
if (log.isDebugEnabled()) {
log.debug("Register " + rpName);
}
Modified: trunk/java/org/apache/coyote/ajp/AjpProtocol.java
===================================================================
--- trunk/java/org/apache/coyote/ajp/AjpProtocol.java 2012-04-26 13:33:04 UTC (rev 2032)
+++ trunk/java/org/apache/coyote/ajp/AjpProtocol.java 2012-04-26 16:23:56 UTC (rev 2033)
@@ -261,8 +261,7 @@
}
}
- // *
- public String getName() {
+ public String getJmxName() {
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
@@ -271,6 +270,14 @@
return ("ajp-" + encodedAddr + endpoint.getPort());
}
+ public String getName() {
+ String encodedAddr = "";
+ if (getAddress() != null) {
+ encodedAddr = getAddress() + ":";
+ }
+ return ("ajp-" + encodedAddr + endpoint.getPort());
+ }
+
/**
* Processor cache.
*/
@@ -499,7 +506,7 @@
long count = registerCount.incrementAndGet();
ObjectName rpName = new ObjectName
(proto.getDomain() +
":type=RequestProcessor,worker="
- + proto.getName() + ",name=AjpRequest" +
count);
+ + proto.getJmxName() + ",name=AjpRequest" +
count);
if (log.isDebugEnabled()) {
log.debug("Register " + rpName);
}
Modified: trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11AprProtocol.java 2012-04-26 13:33:04 UTC
(rev 2032)
+++ trunk/java/org/apache/coyote/http11/Http11AprProtocol.java 2012-04-26 16:23:56 UTC
(rev 2033)
@@ -230,7 +230,7 @@
}
}
- public String getName() {
+ public String getJmxName() {
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
@@ -239,6 +239,14 @@
return ("http-" + encodedAddr + endpoint.getPort());
}
+ public String getName() {
+ String encodedAddr = "";
+ if (getAddress() != null) {
+ encodedAddr = getAddress() + ":";
+ }
+ return ("http-" + encodedAddr + endpoint.getPort());
+ }
+
protected AprEndpoint endpoint=new AprEndpoint();
protected HashMap<String, Object> attributes = new HashMap<String,
Object>();
@@ -694,7 +702,7 @@
long count = registerCount.incrementAndGet();
ObjectName rpName = new ObjectName
(proto.getDomain() +
":type=RequestProcessor,worker="
- + proto.getName() + ",name=HttpRequest" +
count);
+ + proto.getJmxName() + ",name=HttpRequest" +
count);
if (log.isDebugEnabled()) {
log.debug("Register " + rpName);
}
Modified: trunk/java/org/apache/coyote/http11/Http11Protocol.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11Protocol.java 2012-04-26 13:33:04 UTC (rev
2032)
+++ trunk/java/org/apache/coyote/http11/Http11Protocol.java 2012-04-26 16:23:56 UTC (rev
2033)
@@ -277,7 +277,7 @@
}
}
- public String getName() {
+ public String getJmxName() {
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
@@ -286,6 +286,14 @@
return ("http-" + encodedAddr + endpoint.getPort());
}
+ public String getName() {
+ String encodedAddr = "";
+ if (getAddress() != null) {
+ encodedAddr = getAddress() + ":";
+ }
+ return ("http-" + encodedAddr + endpoint.getPort());
+ }
+
// ------------------------------------------------------------- Properties
@@ -735,7 +743,7 @@
long count = registerCount.incrementAndGet();
ObjectName rpName = new ObjectName
(proto.getDomain() +
":type=RequestProcessor,worker="
- + proto.getName() + ",name=HttpRequest" +
count);
+ + proto.getJmxName() + ",name=HttpRequest" +
count);
if (log.isDebugEnabled()) {
log.debug("Register " + rpName);
}