You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2013/10/28 15:28:15 UTC

[3/3] git commit: CAMEL-6910: Added missing attributes to xslt endpoint for JMX.

CAMEL-6910: Added missing attributes to xslt endpoint for JMX.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/36acab20
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/36acab20
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/36acab20

Branch: refs/heads/camel-2.11.x
Commit: 36acab20f96bdcbf83792d18fbe0c164b53da9d9
Parents: c9c74ec
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Oct 28 15:28:16 2013 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Oct 28 15:28:44 2013 +0100

----------------------------------------------------------------------
 .../org/apache/camel/component/xslt/XsltEndpoint.java    | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/36acab20/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
index 0e687e1..cdff08c 100644
--- a/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
@@ -58,6 +58,16 @@ public class XsltEndpoint extends ProcessorEndpoint {
         return cacheStylesheet;
     }
 
+    @ManagedAttribute(description = "Endpoint State")
+    public String getState() {
+        return getStatus().name();
+    }
+
+    @ManagedAttribute(description = "Camel ID")
+    public String getCamelId() {
+        return getCamelContext().getName();
+    }
+
     public XsltEndpoint findOrCreateEndpoint(String uri, String newResourceUri) {
         String newUri = uri.replace(resourceUri, newResourceUri);
         LOG.trace("Getting endpoint with URI: {}", newUri);
@@ -73,7 +83,6 @@ public class XsltEndpoint extends ProcessorEndpoint {
             LOG.trace("{} set to {} creating new endpoint to handle exchange", XsltConstants.XSLT_RESOURCE_URI, newResourceUri);
             XsltEndpoint newEndpoint = findOrCreateEndpoint(getEndpointUri(), newResourceUri);
             newEndpoint.onExchange(exchange);
-            return;
         } else {
             if (!cacheStylesheet || cacheCleared) {
                 loadResource(resourceUri);