0

I am deploying came jmxAgent in Jboss 6.3.0. Follwing is the code snippet:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xmlns:camel="http://camel.apache.org/schema/spring"
          xmlns:context="http://www.springframework.org/schema/context"
            xmlns:util="http://www.springframework.org/schema/util"
         xsi:schemaLocation=" http://www.springframework.org/schema/beans
                http://www.springframework.org/schema/beans/spring-beans.xsd 
                 http://camel.apache.org/schema/spring 
                 http://camel.apache.org/schema/spring/camel-spring.xsd   
                http://www.springframework.org/schema/util     
                http://www.springframework.org/schema/util/spring-util-3.0.xsd
               http://www.springframework.org/schema/context  
               http://www.springframework.org/schema/context/spring-context.xsd ">

    <context:annotation-config />

    <!-- start : Files import to camel context-->
    <!-- Active MQ message broker -->
    <!-- <import resource="classpath:META-INF/spring/message-borker/integration-message-broker.xml" /> -->
    <import resource="file:${FIS_HOME}/COMMON/database-context.xml" />
    <import resource="file:${FIS_HOME}/CA/job-scheduer-route-context.xml" />
    <import resource="file:${FIS_HOME}/CA/jobs-process-route-context.xml" />
    <import resource="file:${FIS_HOME}/CA/pci-jobs-process-route-context.xml" />
    <import resource="file:${FIS_HOME}/CA/archiving_reports.xml" />
    <import resource="file:${FIS_HOME}/COMMON/powercard-sqlFetcher-route-context.xml" />
    <import resource="file:${FIS_HOME}/COMMON/rest/rest-context.xml" />
    <!-- End : Files import to camel context-->

    <camelContext xmlns="http://camel.apache.org/schema/spring" trace="true" streamCache="true"
                  lazyLoadTypeConverters="true" id="main">


        <properties>
            <property key="CamelLogEipName" value="com.hp.rcu.rtsp.filemanager.route"/>
        </properties>

        <propertyPlaceholder id="properties"
                             location="file:${FIS_HOME}/COMMON/routes.properties"
                             xmlns="http://camel.apache.org/schema/spring"/>

        <jmxAgent id="agent" createConnector="true"/>

</camelContext>

An although the deployment is successful i am able to see the below exception in the logs:

13:50:47,163 ERROR [stderr] (Camel Thread #2 - Camel Thread #1 - JMXConnector: service:jmx:rmi:///jndi/rmi://uspnsvulx785.elabs.svcs.lxp.com:1099/jmxrmi/camel) Exception in thread "Camel Thread #2 - Camel Thread #1 - JMXConnector: service:jmx:rmi:///jndi/rmi://205.239.212.91:1099/jmxrmi/camel" java.lang.UnsupportedOperationException: JBAS011859: Naming context is read-only
13:50:47,164 ERROR [stderr] (Camel Thread #2 - Camel Thread #1 - JMXConnector: service:jmx:rmi:///jndi/rmi://uspnsvulx785.elabs.svcs.lxp.com:1099/jmxrmi/camel)         at org.jboss.as.naming.WritableServiceBasedNamingStore.requireOwner(WritableServiceBasedNamingStore.java:155)
13:50:47,165 ERROR [stderr] (Camel Thread #2 - Camel Thread #1 - JMXConnector: service:jmx:rmi:///jndi/rmi://uspnsvulx785.elabs.svcs.lxp.com:1099/jmxrmi/camel)         at org.jboss.as.naming.WritableServiceBasedNamingStore.bind(WritableServiceBasedNamingStore.java:63)
13:50:47,165 ERROR [stderr] (Camel Thread #2 - Camel Thread #1 - JMXConnector: service:jmx:rmi:///jndi/rmi://uspnsvulx785.elabs.svcs.lxp.com:1099/jmxrmi/camel)         at org.jboss.as.naming.NamingContext.bind(NamingContext.java:248)
13:50:47,165 ERROR [stderr] (Camel Thread #2 - Camel Thread #1 - JMXConnector: service:jmx:rmi:///jndi/rmi://uspnsvulx785.elabs.svcs.lxp.com:1099/jmxrmi/camel)         at org.jboss.as.naming.InitialContext$DefaultInitialContext.bind(InitialContext.java:268)
13:50:47,167 ERROR [stderr] (Camel Thread #2 - Camel Thread #1 - JMXConnector: service:jmx:rmi:///jndi/rmi://uspnsvulx785.elabs.svcs.lxp.com:1099/jmxrmi/camel)         at org.jboss.as.naming.NamingContext.bind(NamingContext.java:257)
13:50:47,167 ERROR [stderr] (Camel Thread #2 - Camel Thread #1 - JMXConnector: service:jmx:rmi:///jndi/rmi://uspnsvulx785.elabs.svcs.lxp.com:1099/jmxrmi/camel)         at javax.naming.InitialContext.bind(InitialContext.java:425)
13:50:47,168 ERROR [stderr] (Camel Thread #2 - Camel Thread #1 - JMXConnector: service:jmx:rmi:///jndi/rmi://uspnsvulx785.elabs.svcs.lxp.com:1099/jmxrmi/camel)         at javax.naming.InitialContext.bind(InitialContext.java:425)
13:50:47,168 ERROR [stderr] (Camel Thread #2 - Camel Thread #1 - JMXConnector: service:jmx:rmi:///jndi/rmi://uspnsvulx785.elabs.svcs.lxp.com:1099/jmxrmi/camel)         at javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:644)
13:50:47,168 ERROR [stderr] (Camel Thread #2 - Camel Thread #1 - JMXConnector: service:jmx:rmi:///jndi/rmi://uspnsvulx785.elabs.svcs.lxp.com:1099/jmxrmi/camel)         at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:427)
13:50:47,169 ERROR [stderr] (Camel Thread #2 - Camel Thread #1 - JMXConnector: service:jmx:rmi:///jndi/rmi://uspnsvulx785.elabs.svcs.lxp.com:1099/jmxrmi/camel)         at org.apache.camel.management.DefaultManagementAgent$1.run(DefaultManagementAgent.java:570)
13:50:47,170 ERROR [stderr] (Camel Thread #2 - Camel Thread #1 - JMXConnector: service:jmx:rmi:///jndi/rmi://uspnsvulx785.elabs.svcs.lxp.com:1099/jmxrmi/camel)         at java.lang.Thread.run(Thread.java:748)

Also I am not able to connect to the above url from jconsole.

Note: The jboss container is not in my local and in another server. So the JMX url is service:jmx:rmi:///jndi/rmi://uspnsvulx785.elabs.svcs.lxp.com:1099/jmxrmi/camel

Camel version: 2.23.2

2 Answers2

0

You can check this - http://camel.apache.org/camel-jmx.html. There is a section for JBoss here which will help you configure it.

Sumeet Patil
  • 422
  • 3
  • 14
0

Ok for now i have a workaround. Rather than implementing jmx connector in Camel, i have used the connector of Jboss itself. You can see all the mbeans of jboss within it. You will find all the mbeans of camel under org.apache.camel.

It will not fix the above exception but you can monitor camel routes and processors.

Also you can remove the jmxAgent line given below from the camel-context.xml if using the jboss connector.

<jmxAgent id="agent" createConnector="true"/>