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 2010/11/05 08:40:03 UTC

svn commit: r1031461 [2/2] - in /camel/trunk: apache-camel/ apache-camel/src/main/descriptors/ components/ components/camel-jmx/ components/camel-jmx/src/ components/camel-jmx/src/main/ components/camel-jmx/src/main/java/ components/camel-jmx/src/main/...

Added: camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXRemoteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXRemoteTest.java?rev=1031461&view=auto
==============================================================================
--- camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXRemoteTest.java (added)
+++ camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXRemoteTest.java Fri Nov  5 07:40:01 2010
@@ -0,0 +1,77 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jmx;
+
+import java.io.File;
+import java.rmi.registry.LocateRegistry;
+import java.rmi.registry.Registry;
+import java.util.Collections;
+import javax.management.MBeanServerFactory;
+import javax.management.remote.JMXConnectorServer;
+import javax.management.remote.JMXConnectorServerFactory;
+import javax.management.remote.JMXServiceURL;
+
+import org.junit.After;
+import org.junit.Ignore;
+import org.junit.Test;
+
+/**
+ * Tests against a "remote" JMX server. Creates an RMI Registry at port 61000
+ * and registers the simple mbean
+ * <p/>
+ * Only test here is the notification test since everything should work the
+ * same as the platform server. May want to refactor the exisiting tests to
+ * run the full suite on the local platform and this "remote" setup.
+ */
+@Ignore("TODO: Fails with timestamp diff error")
+public class JMXRemoteTest extends SimpleBeanFixture {
+
+    JMXServiceURL url;
+    JMXConnectorServer connector;
+    Registry registry;
+
+    @After
+    public void tearDown() throws Exception {
+        super.tearDown();
+        connector.stop();
+    }
+
+    @Override
+    protected void initServer() throws Exception {
+        registry = LocateRegistry.createRegistry(61000);
+
+        url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:61000/" + DOMAIN);
+        // create MBean server
+        server = MBeanServerFactory.createMBeanServer(DOMAIN);
+        // create JMXConnectorServer MBean
+        connector = JMXConnectorServerFactory.newJMXConnectorServer(url, Collections.EMPTY_MAP, server);
+        connector.start();
+    }
+
+    @Override
+    protected JMXUriBuilder buildFromURI() {
+        String uri = url.toString();
+        return super.buildFromURI().withServerName(uri);
+    }
+
+    @Test
+    public void notification() throws Exception {
+        getSimpleMXBean().touch();
+        waitForMessages();
+        assertMessageReceived(new File("src/test/resources/consumer-test/touched.xml"));
+    }
+}

Propchange: camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXRemoteTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXRemoteTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXUriBuilderTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXUriBuilderTest.java?rev=1031461&view=auto
==============================================================================
--- camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXUriBuilderTest.java (added)
+++ camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXUriBuilderTest.java Fri Nov  5 07:40:01 2010
@@ -0,0 +1,87 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jmx;
+
+import java.util.LinkedHashMap;
+
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Various tests for the uri builder
+ */
+public class JMXUriBuilderTest {
+
+    @Test
+    public void defaultsToPlatform() throws Exception {
+        assertEquals("jmx:platform", new JMXUriBuilder().toString());
+    }
+
+    @Test
+    public void remote() throws Exception {
+        assertEquals("jmx:service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi", new JMXUriBuilder("service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi").toString());
+    }
+
+    @Test
+    public void withServerName() throws Exception {
+        assertEquals("jmx:service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi", new JMXUriBuilder().withServerName("service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi").toString());
+    }
+
+    @Test
+    public void format() throws Exception {
+        assertEquals("jmx:platform?format=raw", new JMXUriBuilder().withFormat("raw").toString());
+    }
+
+    @Test
+    public void credentials() throws Exception {
+        assertEquals("jmx:platform?user=me&password=pass", new JMXUriBuilder().withUser("me").withPassword("pass").toString());
+    }
+
+    @Test
+    public void objectName() throws Exception {
+        assertEquals("jmx:platform?objectDomain=myDomain&objectName=oname", new JMXUriBuilder().withObjectDomain("myDomain").withObjectName("oname").toString());
+    }
+
+    @Test
+    public void notificationFilter() throws Exception {
+        assertEquals("jmx:platform?notificationFilter=#foo", new JMXUriBuilder().withNotificationFilter("#foo").toString());
+    }
+
+    @Test
+    public void handback() throws Exception {
+        assertEquals("jmx:platform?handback=#hb", new JMXUriBuilder().withHandback("#hb").toString());
+    }
+
+    @Test
+    public void objectProperties() throws Exception {
+        LinkedHashMap<String, String> map = new LinkedHashMap<String, String>();
+        map.put("one", "1");
+        map.put("two", "2");
+        assertEquals("jmx:platform?key.one=1&key.two=2", new JMXUriBuilder().withObjectProperties(map).toString());
+    }
+
+    @Test
+    public void withObjectPropertiesReference() throws Exception {
+        assertEquals("jmx:platform?objectProperties=#op", new JMXUriBuilder().withObjectPropertiesReference("#op").toString());
+    }
+
+    @Test
+    public void withObjectPropertiesReferenceSansHashmark() throws Exception {
+        assertEquals("jmx:platform?objectProperties=#op", new JMXUriBuilder().withObjectPropertiesReference("op").toString());
+    }
+}

Propchange: camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXUriBuilderTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXUriBuilderTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/SimpleBeanFixture.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/SimpleBeanFixture.java?rev=1031461&view=auto
==============================================================================
--- camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/SimpleBeanFixture.java (added)
+++ camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/SimpleBeanFixture.java Fri Nov  5 07:40:01 2010
@@ -0,0 +1,268 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jmx;
+
+import java.io.File;
+import java.lang.management.ManagementFactory;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import javax.management.InstanceNotFoundException;
+import javax.management.JMX;
+import javax.management.MBeanRegistrationException;
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Message;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.jmx.beans.ISimpleMXBean;
+import org.apache.camel.component.jmx.beans.SimpleBean;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.impl.SimpleRegistry;
+import org.junit.After;
+import org.junit.Before;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+/**
+ * MBean that is registered for the unit tests. The fixture will register a bean
+ * and provide access to the mxbean so tests can invoke methods on the mxbean
+ * to trigger notifications.
+ */
+public class SimpleBeanFixture {
+
+    /**
+     * domain to use for the mbean
+     */
+    protected static final String DOMAIN = "TestDomain";
+    /**
+     * key for the object name
+     */
+    protected static final String NAME = "name";
+
+    protected MBeanServer server;
+
+    /**
+     * camel context to stand up for the test
+     */
+    private DefaultCamelContext mContext = new DefaultCamelContext();
+    /**
+     * registry to store referenced beans (i.e. objectProperties or NotificationFilter)
+     */
+    private SimpleRegistry mRegistry = new SimpleRegistry();
+    /**
+     * destination for the simple route created.
+     */
+    private MockEndpoint mMockEndpoint;
+
+
+    @Before
+    public void setUp() throws Exception {
+        initServer();
+        initBean();
+        initRegistry();
+        initContext();
+        startContext();
+    }
+
+    protected void startContext() throws Exception {
+        mContext.start();
+    }
+
+    @After
+    public void tearDown() throws Exception {
+        if (!mContext.isStopped()) {
+            mContext.stop();
+        }
+        unregisterBean(makeObjectName("simpleBean"));
+    }
+
+    protected void waitForMessages() throws InterruptedException {
+        waitForMessages(mMockEndpoint);
+    }
+
+    protected void waitForMessages(MockEndpoint aMockEndpoint) throws InterruptedException {
+        mMockEndpoint.await(10, TimeUnit.SECONDS);
+        assertEquals("Expected number of messages didn't arrive before timeout", aMockEndpoint.getExpectedCount(), aMockEndpoint.getReceivedCounter());
+    }
+
+    protected void initServer() throws Exception {
+        server = ManagementFactory.getPlatformMBeanServer();
+    }
+
+    /**
+     * Registers the bean on the platform mbean server
+     */
+    protected void registerBean(Object aBean, ObjectName aObjectName) throws Exception {
+        server.registerMBean(aBean, aObjectName);
+    }
+
+    /**
+     * Unregisters the bean
+     */
+    protected void unregisterBean(ObjectName aObjectName) throws MBeanRegistrationException, InstanceNotFoundException {
+        server.unregisterMBean(aObjectName);
+    }
+
+    /**
+     * Gets the mxbean for our remote object using the specified name
+     */
+    protected ISimpleMXBean getMXBean(ObjectName aObjectName) {
+        ISimpleMXBean simpleBean = JMX.newMXBeanProxy(server, aObjectName, ISimpleMXBean.class);
+        return simpleBean;
+    }
+
+    /**
+     * Gets the mxbean for our remote object using the default name "simpleBean"
+     */
+    protected ISimpleMXBean getSimpleMXBean() throws MalformedObjectNameException {
+        return getMXBean(makeObjectName("simpleBean"));
+    }
+
+    /**
+     * Makes an ObjectName for the given domain using our domain and the name attribute.
+     */
+    protected ObjectName makeObjectName(String aName) throws MalformedObjectNameException {
+        ObjectName objectName = new ObjectName(DOMAIN, NAME, aName);
+        return objectName;
+    }
+
+    /**
+     * Gets the body of the received message at the specified index
+     */
+    protected <T> T getBody(int aIndex, Class<T> aType) {
+        Message in = getMessage(aIndex);
+        T body = in.getBody(aType);
+        assertNotNull(body);
+        return body;
+    }
+
+    /**
+     * Gets the received message at the specified index
+     */
+    protected Message getMessage(int aIndex) {
+        Exchange exchange = getExchange(aIndex);
+        Message in = exchange.getIn();
+        return in;
+    }
+
+    /**
+     * Gets the received exchange at the specified index
+     */
+    protected Exchange getExchange(int aIndex) {
+        List<Exchange> exchanges = mMockEndpoint.getReceivedExchanges();
+        Exchange exchange = exchanges.get(aIndex);
+        return exchange;
+    }
+
+    /**
+     * Creates the bean and registers it within the mbean server.
+     * Note that we're using a fixed timestamp here to simplify the assertions in the tests
+     */
+    protected void initBean() throws Exception {
+        registerBean(createSimpleBean(), makeObjectName("simpleBean"));
+    }
+
+    protected SimpleBean createSimpleBean() throws ParseException {
+        SimpleBean simpleBean = new SimpleBean();
+
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-dd-MM'T'HH:mm:ss");
+        Date date = sdf.parse("2010-07-01T10:30:15");
+        simpleBean.setTimestamp(date.getTime());
+        return simpleBean;
+    }
+
+    /**
+     * Initializes the camel context by creating a simple route from our mbean
+     * to the mock endpoint.
+     */
+    protected void initContext() throws Exception {
+        mMockEndpoint = (MockEndpoint) mContext.getEndpoint("mock:sink");
+        mMockEndpoint.setExpectedMessageCount(1);
+        mContext.setRegistry(getRegistry());
+        mContext.addRoutes(new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from(buildFromURI().toString()).to(mMockEndpoint);
+            }
+        });
+    }
+
+    /**
+     * Override this to control the properties that make up the endpoint
+     */
+    protected JMXUriBuilder buildFromURI() {
+        JMXUriBuilder uri = new JMXUriBuilder().withObjectDomain(DOMAIN)
+                .withObjectName("simpleBean");
+        return uri;
+    }
+
+    /**
+     * Override this to put stuff into the registry so it's available to be
+     * referenced. (i.e. NotificationFilter or Hashtable<String,String> for ObjectProperties
+     */
+    protected void initRegistry() {
+    }
+
+    protected DefaultCamelContext getContext() {
+        return mContext;
+    }
+
+    protected void setContext(DefaultCamelContext aContext) {
+        mContext = aContext;
+    }
+
+    protected SimpleRegistry getRegistry() {
+        return mRegistry;
+    }
+
+    protected void setRegistry(SimpleRegistry aRegistry) {
+        mRegistry = aRegistry;
+    }
+
+    protected MockEndpoint getMockEndpoint() {
+        return mMockEndpoint;
+    }
+
+    protected void setMockEndpoint(MockEndpoint aMockEndpoint) {
+        mMockEndpoint = aMockEndpoint;
+    }
+
+    /**
+     * Assert that we've received the message and resets the mock endpoint
+     */
+    protected void assertMessageReceived(File aExpectedFile) throws Exception {
+        XmlFixture.assertXMLIgnorePrefix("failed to match",
+                XmlFixture.toDoc(aExpectedFile),
+                XmlFixture.toDoc(getBody(0, String.class)));
+        resetMockEndpoint();
+    }
+
+    /**
+     * Resets the mock endpoint so we can run another test. This will clear out any
+     * previously received messages.
+     */
+    protected void resetMockEndpoint() {
+        getMockEndpoint().reset();
+    }
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/SimpleBeanFixture.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/SimpleBeanFixture.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/XmlFixture.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/XmlFixture.java?rev=1031461&view=auto
==============================================================================
--- camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/XmlFixture.java (added)
+++ camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/XmlFixture.java Fri Nov  5 07:40:01 2010
@@ -0,0 +1,94 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jmx;
+
+import java.io.File;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.xml.sax.InputSource;
+
+import org.custommonkey.xmlunit.Diff;
+import org.custommonkey.xmlunit.Difference;
+import org.custommonkey.xmlunit.DifferenceConstants;
+import org.custommonkey.xmlunit.DifferenceListener;
+import org.custommonkey.xmlunit.XMLAssert;
+import org.custommonkey.xmlunit.XMLUnit;
+
+import static org.junit.Assert.fail;
+
+public final class XmlFixture {
+
+    private XmlFixture() {
+    }
+
+    public static Document toDoc(String aXmlString) throws Exception {
+        return XMLUnit.buildControlDocument(aXmlString);
+    }
+
+    public static Document toDoc(File aFile) throws Exception {
+        return XMLUnit.buildControlDocument(new InputSource(aFile.toString()));
+    }
+
+    public static void assertXMLIgnorePrefix(String aMessage, Document aExpected, Document aActual) throws Exception {
+        XMLUnit.setIgnoreComments(true);
+        XMLUnit.setIgnoreWhitespace(true);
+        XMLUnit.setIgnoreAttributeOrder(true);
+
+        Diff diff = new Diff(aExpected, aActual);
+        diff.overrideDifferenceListener(new DifferenceListener() {
+
+            public void skippedComparison(Node aArg0, Node aArg1) {
+            }
+
+            public int differenceFound(Difference aDifference) {
+                if (aDifference.getId() == DifferenceConstants.NAMESPACE_PREFIX_ID) {
+                    return DifferenceListener.RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL;
+                }
+                return DifferenceListener.RETURN_ACCEPT_DIFFERENCE;
+            }
+        });
+        try {
+            XMLAssert.assertXMLEqual(diff, true);
+        } catch (Throwable t) {
+            XMLUnit.getTransformerFactory().newTransformer().transform(new DOMSource(aActual), new StreamResult(System.out));
+            StringWriter sw = new StringWriter();
+            t.printStackTrace(new PrintWriter(sw));
+            fail(sw.toString());
+        }
+    }
+
+    public static Document stripTimestamp(Document aDocument) throws Exception {
+        TransformerFactory tf = TransformerFactory.newInstance();
+        InputStream in = XmlFixture.class.getResourceAsStream("/stripTimestamp.xsl");
+        Source src = new StreamSource(in);
+        Transformer t = tf.newTransformer(src);
+        DOMResult result = new DOMResult();
+        t.transform(new DOMSource(aDocument), result);
+        return (Document) result.getNode();
+    }
+}

Propchange: camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/XmlFixture.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/XmlFixture.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/beans/ISimpleMXBean.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/beans/ISimpleMXBean.java?rev=1031461&view=auto
==============================================================================
--- camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/beans/ISimpleMXBean.java (added)
+++ camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/beans/ISimpleMXBean.java Fri Nov  5 07:40:01 2010
@@ -0,0 +1,38 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jmx.beans;
+
+public interface ISimpleMXBean {
+
+    String getStringValue();
+
+    void setStringValue(String aValue);
+
+    void touch();
+
+    void userData(String aUserData);
+
+    void triggerConnectionNotification();
+
+    void triggerMBeanServerNotification() throws Exception;
+
+    void triggerRelationNotification() throws Exception;
+
+    void triggerTimerNotification();
+
+    int getMonitorNumber();
+}

Propchange: camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/beans/ISimpleMXBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/beans/ISimpleMXBean.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/beans/SimpleBean.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/beans/SimpleBean.java?rev=1031461&view=auto
==============================================================================
--- camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/beans/SimpleBean.java (added)
+++ camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/beans/SimpleBean.java Fri Nov  5 07:40:01 2010
@@ -0,0 +1,119 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jmx.beans;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.management.AttributeChangeNotification;
+import javax.management.MBeanServerNotification;
+import javax.management.Notification;
+import javax.management.NotificationBroadcasterSupport;
+import javax.management.ObjectName;
+import javax.management.relation.RelationNotification;
+import javax.management.remote.JMXConnectionNotification;
+import javax.management.timer.TimerNotification;
+
+/**
+ * Simple bean that is used for testing.
+ */
+public class SimpleBean extends NotificationBroadcasterSupport implements ISimpleMXBean {
+    private int mSequence;
+    /**
+     * Use the same timestamp every time so the assertions are easier
+     */
+    private long mTimestamp;
+
+    private String mStringValue;
+
+    public String getStringValue() {
+        return mStringValue;
+    }
+
+    public void setStringValue(String aStringValue) {
+        String oldValue = getStringValue();
+        mStringValue = aStringValue;
+
+        AttributeChangeNotification acn = new AttributeChangeNotification(
+                this, mSequence++, mTimestamp, "attribute changed", "stringValue", "string", oldValue, mStringValue);
+        sendNotification(acn);
+    }
+
+    public int getMonitorNumber() {
+        return getSequence();
+    }
+
+
+    public int getSequence() {
+        return mSequence;
+    }
+
+    public void setSequence(int aSequence) {
+        mSequence = aSequence;
+    }
+
+    public long getTimestamp() {
+        return mTimestamp;
+    }
+
+    public void setTimestamp(long aTimestamp) {
+        mTimestamp = aTimestamp;
+    }
+
+    public void userData(String aUserData) {
+        Notification n = new Notification("userData", this, mSequence++, mTimestamp, "Here's my user data");
+        n.setUserData(aUserData);
+        sendNotification(n);
+    }
+
+    public void touch() {
+        Notification n = new Notification("touched", this, mSequence++, mTimestamp, "I was touched");
+        sendNotification(n);
+    }
+
+    public void triggerConnectionNotification() {
+        JMXConnectionNotification n = new JMXConnectionNotification("connection", this,
+                "conn-123", mSequence++, "connection notification", null);
+        n.setTimeStamp(mTimestamp);
+        sendNotification(n);
+    }
+
+    public void triggerMBeanServerNotification() throws Exception {
+        MBeanServerNotification n = new MBeanServerNotification("mbeanserver", this, mSequence++, new ObjectName("TestDomain", "name", "foo"));
+        n.setTimeStamp(mTimestamp);
+        sendNotification(n);
+    }
+
+    public void triggerRelationNotification() throws Exception {
+        List<ObjectName> list = new ArrayList<ObjectName>();
+        for (int i = 1; i <= 3; i++) {
+            list.add(new ObjectName("TestDomain", "name", "mbean-" + i));
+        }
+        RelationNotification n = new RelationNotification(RelationNotification.RELATION_BASIC_CREATION,
+                new ObjectName("TestDomain", "name", "source"), mSequence++, mTimestamp,
+                "relation message",
+                "relation-id",
+                "relation.type",
+                new ObjectName("TestDomain", "name", "foo"),
+                list);
+        sendNotification(n);
+    }
+
+    public void triggerTimerNotification() {
+        TimerNotification n = new TimerNotification("timer.notification", this, mSequence++, mTimestamp, "timer-notification", 100);
+        sendNotification(n);
+    }
+}

Propchange: camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/beans/SimpleBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/beans/SimpleBean.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/attributeChange-0.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jmx/src/test/resources/consumer-test/attributeChange-0.xml?rev=1031461&view=auto
==============================================================================
--- camel/trunk/components/camel-jmx/src/test/resources/consumer-test/attributeChange-0.xml (added)
+++ camel/trunk/components/camel-jmx/src/test/resources/consumer-test/attributeChange-0.xml Fri Nov  5 07:40:01 2010
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<AttributeChangeNotification xmlns="urn:org.apache.camel.component:jmx"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <source>TestDomain:name=simpleBean</source>
+    <message>attribute changed</message>
+    <sequence>0</sequence>
+    <timestamp>1262878215000</timestamp>
+    <dateTime>2010-01-07T10:30:15.000-05:00</dateTime>
+    <type>jmx.attribute.change</type>
+    <attributeName>stringValue</attributeName>
+    <attributeType>string</attributeType>
+    <newValue>foo</newValue>
+    <oldValue xsi:nil="true"/>
+</AttributeChangeNotification>

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/attributeChange-0.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/attributeChange-0.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/attributeChange-0.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/attributeChange-1.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jmx/src/test/resources/consumer-test/attributeChange-1.xml?rev=1031461&view=auto
==============================================================================
--- camel/trunk/components/camel-jmx/src/test/resources/consumer-test/attributeChange-1.xml (added)
+++ camel/trunk/components/camel-jmx/src/test/resources/consumer-test/attributeChange-1.xml Fri Nov  5 07:40:01 2010
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<AttributeChangeNotification xmlns="urn:org.apache.camel.component:jmx"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <source>TestDomain:name=simpleBean</source>
+    <message>attribute changed</message>
+    <sequence>1</sequence>
+    <timestamp>1262878215000</timestamp>
+    <dateTime>2010-01-07T10:30:15.000-05:00</dateTime>
+    <type>jmx.attribute.change</type>
+    <attributeName>stringValue</attributeName>
+    <attributeType>string</attributeType>
+    <newValue>bar</newValue>
+    <oldValue>foo</oldValue>
+</AttributeChangeNotification>

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/attributeChange-1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/attributeChange-1.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/attributeChange-1.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/attributeChange-2.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jmx/src/test/resources/consumer-test/attributeChange-2.xml?rev=1031461&view=auto
==============================================================================
--- camel/trunk/components/camel-jmx/src/test/resources/consumer-test/attributeChange-2.xml (added)
+++ camel/trunk/components/camel-jmx/src/test/resources/consumer-test/attributeChange-2.xml Fri Nov  5 07:40:01 2010
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<AttributeChangeNotification xmlns="urn:org.apache.camel.component:jmx"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <source>TestDomain:name=simpleBean</source>
+    <message>attribute changed</message>
+    <sequence>2</sequence>
+    <timestamp>1262878215000</timestamp>
+    <dateTime>2010-01-07T10:30:15.000-05:00</dateTime>
+    <type>jmx.attribute.change</type>
+    <attributeName>stringValue</attributeName>
+    <attributeType>string</attributeType>
+    <newValue xsi:nil="true"/>
+    <oldValue>bar</oldValue>
+</AttributeChangeNotification>

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/attributeChange-2.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/attributeChange-2.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/attributeChange-2.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/jmxConnectionNotification.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jmx/src/test/resources/consumer-test/jmxConnectionNotification.xml?rev=1031461&view=auto
==============================================================================
--- camel/trunk/components/camel-jmx/src/test/resources/consumer-test/jmxConnectionNotification.xml (added)
+++ camel/trunk/components/camel-jmx/src/test/resources/consumer-test/jmxConnectionNotification.xml Fri Nov  5 07:40:01 2010
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<JMXConnectionNotification xmlns="urn:org.apache.camel.component:jmx">
+    <source>TestDomain:name=simpleBean</source>
+    <message>connection notification</message>
+    <sequence>0</sequence>
+    <timestamp>1262878215000</timestamp>
+    <dateTime>2010-01-07T10:30:15.000-05:00</dateTime>
+    <type>connection</type>
+    <connectionId>conn-123</connectionId>
+</JMXConnectionNotification>

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/jmxConnectionNotification.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/jmxConnectionNotification.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/jmxConnectionNotification.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/mbeanServerNotification.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jmx/src/test/resources/consumer-test/mbeanServerNotification.xml?rev=1031461&view=auto
==============================================================================
--- camel/trunk/components/camel-jmx/src/test/resources/consumer-test/mbeanServerNotification.xml (added)
+++ camel/trunk/components/camel-jmx/src/test/resources/consumer-test/mbeanServerNotification.xml Fri Nov  5 07:40:01 2010
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<MBeanServerNotification xmlns="urn:org.apache.camel.component:jmx">
+    <source>TestDomain:name=simpleBean</source>
+    <message/>
+    <sequence>0</sequence>
+    <timestamp>1262878215000</timestamp>
+    <dateTime>2010-01-07T10:30:15.000-05:00</dateTime>
+    <type>mbeanserver</type>
+    <MBeanName>TestDomain:name=foo</MBeanName>
+</MBeanServerNotification>

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/mbeanServerNotification.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/mbeanServerNotification.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/mbeanServerNotification.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/monitorNotification.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jmx/src/test/resources/consumer-test/monitorNotification.xml?rev=1031461&view=auto
==============================================================================
--- camel/trunk/components/camel-jmx/src/test/resources/consumer-test/monitorNotification.xml (added)
+++ camel/trunk/components/camel-jmx/src/test/resources/consumer-test/monitorNotification.xml Fri Nov  5 07:40:01 2010
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<MonitorNotification xmlns="urn:org.apache.camel.component:jmx">
+    <source>TestDomain:name=counter</source>
+    <message/>
+    <sequence>0</sequence>
+    <type>jmx.monitor.counter.threshold</type>
+    <derivedGauge>2</derivedGauge>
+    <observedAttribute>MonitorNumber</observedAttribute>
+    <observedObject>TestDomain:name=simpleBean</observedObject>
+    <trigger>1</trigger>
+</MonitorNotification>

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/monitorNotification.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/monitorNotification.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/monitorNotification.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/relationNotification.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jmx/src/test/resources/consumer-test/relationNotification.xml?rev=1031461&view=auto
==============================================================================
--- camel/trunk/components/camel-jmx/src/test/resources/consumer-test/relationNotification.xml (added)
+++ camel/trunk/components/camel-jmx/src/test/resources/consumer-test/relationNotification.xml Fri Nov  5 07:40:01 2010
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<RelationNotification xmlns="urn:org.apache.camel.component:jmx">
+    <source>TestDomain:name=source</source>
+    <message>relation message</message>
+    <sequence>0</sequence>
+    <timestamp>1262878215000</timestamp>
+    <dateTime>2010-01-07T10:30:15.000-05:00</dateTime>
+    <type>jmx.relation.creation.basic</type>
+    <objectName>TestDomain:name=foo</objectName>
+    <relationId>relation-id</relationId>
+    <relationTypeName>relation.type</relationTypeName>
+    <MBeansToUnregister>
+        <objectName>TestDomain:name=mbean-1</objectName>
+        <objectName>TestDomain:name=mbean-2</objectName>
+        <objectName>TestDomain:name=mbean-3</objectName>
+    </MBeansToUnregister>
+    <newRoleValue/>
+    <oldRoleValue/>
+</RelationNotification>

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/relationNotification.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/relationNotification.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/relationNotification.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/timerNotification.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jmx/src/test/resources/consumer-test/timerNotification.xml?rev=1031461&view=auto
==============================================================================
--- camel/trunk/components/camel-jmx/src/test/resources/consumer-test/timerNotification.xml (added)
+++ camel/trunk/components/camel-jmx/src/test/resources/consumer-test/timerNotification.xml Fri Nov  5 07:40:01 2010
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<TimerNotification xmlns="urn:org.apache.camel.component:jmx">
+    <source>TestDomain:name=simpleBean</source>
+    <message>timer-notification</message>
+    <sequence>0</sequence>
+    <timestamp>1262878215000</timestamp>
+    <dateTime>2010-01-07T10:30:15.000-05:00</dateTime>
+    <type>timer.notification</type>
+    <notificationId>100</notificationId>
+</TimerNotification>

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/timerNotification.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/timerNotification.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/timerNotification.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/touched.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jmx/src/test/resources/consumer-test/touched.xml?rev=1031461&view=auto
==============================================================================
--- camel/trunk/components/camel-jmx/src/test/resources/consumer-test/touched.xml (added)
+++ camel/trunk/components/camel-jmx/src/test/resources/consumer-test/touched.xml Fri Nov  5 07:40:01 2010
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<NotificationEvent xmlns="urn:org.apache.camel.component:jmx"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <source>TestDomain:name=simpleBean</source>
+    <message>I was touched</message>
+    <sequence>0</sequence>
+    <timestamp>1262878215000</timestamp>
+    <dateTime>2010-01-07T10:30:15.000-05:00</dateTime>
+    <type>touched</type>
+</NotificationEvent>

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/touched.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/touched.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/touched.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/userdata.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jmx/src/test/resources/consumer-test/userdata.xml?rev=1031461&view=auto
==============================================================================
--- camel/trunk/components/camel-jmx/src/test/resources/consumer-test/userdata.xml (added)
+++ camel/trunk/components/camel-jmx/src/test/resources/consumer-test/userdata.xml Fri Nov  5 07:40:01 2010
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<NotificationEvent xmlns="urn:org.apache.camel.component:jmx"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <source>TestDomain:name=simpleBean</source>
+    <message>Here's my user data</message>
+    <sequence>0</sequence>
+    <timestamp>1262878215000</timestamp>
+    <dateTime>2010-01-07T10:30:15.000-05:00</dateTime>
+    <type>userData</type>
+    <userData>myUserData</userData>
+</NotificationEvent>

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/userdata.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/userdata.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/components/camel-jmx/src/test/resources/consumer-test/userdata.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: camel/trunk/components/camel-jmx/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jmx/src/test/resources/log4j.properties?rev=1031461&view=auto
==============================================================================
--- camel/trunk/components/camel-jmx/src/test/resources/log4j.properties (added)
+++ camel/trunk/components/camel-jmx/src/test/resources/log4j.properties Fri Nov  5 07:40:01 2010
@@ -0,0 +1,36 @@
+## ------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ------------------------------------------------------------------------
+
+#
+# The logging properties used for eclipse testing, We want to see debug output on the console.
+#
+log4j.rootLogger=INFO, file
+
+# uncomment the following to enable camel debugging
+#log4j.logger.org.apache.camel.component.jmx=DEBUG
+
+# CONSOLE appender not used by default
+log4j.appender.out=org.apache.log4j.ConsoleAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+#log4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n
+log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+
+# File appender
+log4j.appender.file=org.apache.log4j.FileAppender
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+log4j.appender.file.file=target/camel-jmx-test.log
\ No newline at end of file

Propchange: camel/trunk/components/camel-jmx/src/test/resources/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-jmx/src/test/resources/log4j.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/components/camel-jmx/src/test/resources/log4j.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: camel/trunk/components/camel-jmx/src/test/resources/stripTimestamp.xsl
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jmx/src/test/resources/stripTimestamp.xsl?rev=1031461&view=auto
==============================================================================
--- camel/trunk/components/camel-jmx/src/test/resources/stripTimestamp.xsl (added)
+++ camel/trunk/components/camel-jmx/src/test/resources/stripTimestamp.xsl Fri Nov  5 07:40:01 2010
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<xsl:stylesheet version="2.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:jmx="urn:org.apache.camel.component:jmx"
+    exclude-result-prefixes="jmx">
+    
+    <xsl:template match="@*|node()">
+        <xsl:copy>
+            <xsl:apply-templates/>
+        </xsl:copy>
+    </xsl:template>
+    
+    <xsl:template match="jmx:timestamp"/>
+    <xsl:template match="jmx:dateTime"/>
+    
+</xsl:stylesheet>

Propchange: camel/trunk/components/camel-jmx/src/test/resources/stripTimestamp.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-jmx/src/test/resources/stripTimestamp.xsl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/components/camel-jmx/src/test/resources/stripTimestamp.xsl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: camel/trunk/components/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/pom.xml?rev=1031461&r1=1031460&r2=1031461&view=diff
==============================================================================
--- camel/trunk/components/pom.xml (original)
+++ camel/trunk/components/pom.xml Fri Nov  5 07:40:01 2010
@@ -68,6 +68,7 @@
     <module>camel-jetty</module>
     <module>camel-jing</module>
     <module>camel-jms</module>
+    <module>camel-jmx</module>
     <module>camel-josql</module>
     <module>camel-jasypt</module>
     <module>camel-jcr</module>

Modified: camel/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/parent/pom.xml?rev=1031461&r1=1031460&r2=1031461&view=diff
==============================================================================
--- camel/trunk/parent/pom.xml (original)
+++ camel/trunk/parent/pom.xml Fri Nov  5 07:40:01 2010
@@ -426,6 +426,11 @@
       </dependency>
       <dependency>
         <groupId>org.apache.camel</groupId>
+        <artifactId>camel-jmx</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.camel</groupId>
         <artifactId>camel-josql</artifactId>
         <version>${project.version}</version>
       </dependency>