| <?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. |
| --> |
| |
| <!-- |
| |
| The default Application Context used by the org.apache.camel.spring.Main if there |
| is no /META-INF/sprint.xml |
| |
| --> |
| |
| <beans xmlns="http://www.springframework.org/schema/beans" |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xsi:schemaLocation=" |
| http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd |
| http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd"> |
| |
| <camelContext id="camel" useJmx="true" mbeanServer="mbeanServer" |
| xmlns="http://activemq.apache.org/camel/schema/spring"> |
| <package>org.apache.camel.example.spring</package> |
| </camelContext> |
| |
| <!-- lets configure the default ActiveMQ broker URL --> |
| <bean id="jms" class="org.apache.camel.component.jms.JmsComponent"> |
| <property name="connectionFactory"> |
| <bean class="org.apache.activemq.ActiveMQConnectionFactory"> |
| <property name="brokerURL" value="vm://localhost?broker.persistent=false&broker.useJmx=false"/> |
| </bean> |
| </property> |
| </bean> |
| |
| <!-- Use JMX --> |
| <bean id="agent" class="org.apache.camel.spring.SpringInstrumentationAgent"> |
| <property name="MBeanServer" ref="mbeanServer"/> |
| </bean> |
| |
| <!-- |
| this bean needs to be eagerly pre-instantiated in order for the exporting to occur; |
| this means that it must not be marked as lazily initialized |
| --> |
| <bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean"> |
| <property name="defaultDomain" value="org.apache.camel.test"/> |
| </bean> |
| <bean id="registry" class="org.springframework.remoting.rmi.RmiRegistryFactoryBean"> |
| <property name="port" value="1099"/> |
| </bean> |
| <bean id="serverConnector" |
| class="org.springframework.jmx.support.ConnectorServerFactoryBean" depends-on="registry"> |
| <property name="objectName" value="connector:name=rmi"/> |
| <property name="serviceUrl" |
| value="service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi"/> |
| <property name="threaded" value="true"/> |
| <property name="daemon" value="true"/> |
| </bean> |
| |
| </beans> |