[ 
https://issues.apache.org/jira/browse/CAMEL-9518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15101710#comment-15101710
 ] 

Thomas Diesler edited comment on CAMEL-9518 at 1/15/16 12:30 PM:
-----------------------------------------------------------------

Not quite, the spec {code}new ObjectName("*:type=context,*"){code} would find 
any MBean that happens to have that attribute/value combination. I wasn't sure 
whether being specific on the domain would be correct i.e.  {code}new 
ObjectName("org.apache.camel:type=context,*"){code}


was (Author: tdiesler):
Not quite, the spec {code}new ObjectName("*:type=context,*"){code} would find 
any MBean that happens to have that attribute/value combination. I wasn't sure 
whether being specific on the domain would be correct or not. i.e.  {code}new 
ObjectName("org.apache.camel:type=context,*"){code}

> Swagger may see non-camel MBeans
> --------------------------------
>
>                 Key: CAMEL-9518
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9518
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.16.1
>            Reporter: Thomas Diesler
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.16.2, 2.17.0
>
>
> {code}
> 10:06:13,591 INFO  [org.apache.camel.impl.DefaultCamelContext] 
> (pool-1-thread-1) Apache Camel 2.16.1.redhat-630008 (CamelContext: 
> swagger-test) started in 0.399 seconds
> 10:06:14,413 INFO  [stdout] (pool-1-thread-1) 
> org.apache.camel:context=swagger-test,type=context,name="swagger-test": <?xml 
> version="1.0" encoding="UTF-8" standalone="yes"?>
> 10:06:14,413 INFO  [stdout] (pool-1-thread-1) <rests 
> xmlns="http://camel.apache.org/schema/spring";>
> 10:06:14,414 INFO  [stdout] (pool-1-thread-1)     <rest path="/hello">
> 10:06:14,414 INFO  [stdout] (pool-1-thread-1)         <get uri="/{name}" 
> consumes="application/json" produces="application/json" 
> outType="org.wildfly.camel.test.swagger.subA.User" routeId="route1">
> 10:06:14,414 INFO  [stdout] (pool-1-thread-1)             <description>A user 
> object</description>
> 10:06:14,414 INFO  [stdout] (pool-1-thread-1)             <param name="name" 
> type="path"/>
> 10:06:14,414 INFO  [stdout] (pool-1-thread-1)             <to 
> uri="direct:hello" customId="true" id="route1"/>
> 10:06:14,414 INFO  [stdout] (pool-1-thread-1)         </get>
> 10:06:14,414 INFO  [stdout] (pool-1-thread-1)     </rest>
> 10:06:14,414 INFO  [stdout] (pool-1-thread-1) </rests>
> 10:06:14,415 INFO  [stdout] (pool-1-thread-1) 
> 10:06:14,416 INFO  [stdout] (pool-1-thread-1) 
> jboss.jsr77:j2eeType=JVM,name=default,J2EEServer=default: null
> 10:06:14,417 INFO  [stdout] (pool-1-thread-1) 
> jboss.jsr77:j2eeType=J2EEServer,name=default: null
> 10:06:14,417 INFO  [stdout] (pool-1-thread-1) 
> jboss.jsr77:j2eeType=J2EEDomain,name=jboss.jsr77: null
> 10:06:14,447 WARN  [org.apache.camel.swagger.servlet.RestSwaggerServlet] 
> (http-/127.0.0.1:8080-1) Error rendering Swagger API due JBAS019903: No 
> attribute called CamelVersion: javax.management.AttributeNotFoundException: 
> JBAS019903: No attribute called CamelVersion
>       at 
> org.jboss.as.jsr77.managedobject.BaseHandler.getAttribute(BaseHandler.java:59)
>       at 
> org.jboss.as.jsr77.managedobject.JVMHandler.getAttribute(JVMHandler.java:80)
>       at 
> org.jboss.as.jsr77.managedobject.ManagedObjectHandlerRegistry.getAttribute(ManagedObjectHandlerRegistry.java:91)
>       at 
> org.jboss.as.jsr77.subsystem.JSR77ManagementMBeanServer.getAttribute(JSR77ManagementMBeanServer.java:141)
>       at 
> org.jboss.as.jmx.PluggableMBeanServerImpl.getAttribute(PluggableMBeanServerImpl.java:392)
>       at 
> org.apache.camel.swagger.RestSwaggerSupport.findCamelContexts(RestSwaggerSupport.java:162)
>  [camel-swagger-java-2.16.1.redhat-630008.jar:2.16.1.redhat-630008]
>       at 
> org.apache.camel.swagger.servlet.RestSwaggerServlet.doGet(RestSwaggerServlet.java:140)
>  [camel-swagger-java-2.16.1.redhat-630008.jar:2.16.1.redhat-630008]
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) 
> [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to