Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 9th, 2012  |  syntax: None  |  size: 3.77 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <beans xmlns="http://www.springframework.org/schema/beans"
  2.        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ctx="http://www.springframework.org/schema/context"
  3.        xmlns:amq="http://activemq.apache.org/schema/core"
  4.        xmlns:camel-osgi="http://camel.apache.org/schema/osgi" xmlns:tx="http://www.springframework.org/schema/tx"
  5.        xmlns:osgi="http://www.springframework.org/schema/osgi"
  6.        xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
  7.        xsi:schemaLocation="
  8.        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  9.        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
  10.        http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
  11.        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
  12.        http://camel.apache.org/schema/osgi http://camel.apache.org/schema/osgi/camel-osgi.xsd
  13.        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
  14.        http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd
  15.        http://www.springframework.org/schema/osgi-compendium http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd">
  16.  
  17.     <!--  Mock properties -->
  18.     <ctx:property-placeholder location="classpath:mock.properties"/>
  19.  
  20.     <!--  Mock persistence -->
  21.     <!--  Subscription DAO is here purely to aid in testing -->
  22.     <bean id="subscriptionDAO" class="edu.ucar.ral.wcsri.pubsub.getcvg.SubscriptionMockDAO"/>
  23.     <bean id="messageDAO" class="edu.ucar.ral.wcsri.pubsub.getcvg.MessageMockDAO"/>
  24.     <bean id="streamingFactory" class="edu.ucar.ral.wcsri.pubsub.getcvg.MockStreamingFactory">
  25.         <constructor-arg ref="subscriptionDAO"/>
  26.     </bean>
  27.  
  28.     <!-- ActiveMQ Test Broker -->
  29.     <amq:broker brokerName="Test" useJmx="false" persistent="false" xmlns="http://activemq.apache.org/schema/core"/>
  30.  
  31.     <camel-osgi:camelContext xmlns="http://camel.apache.org/schema/spring"/>
  32.  
  33.     <!-- Transaction Configuration -->
  34.     <tx:annotation-driven transaction-manager="transactionManager"/>
  35.  
  36.     <bean class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator"/>
  37.  
  38.     <!-- GetCoverageProcessor -->
  39.     <bean id="getCoverageProcessor" class="edu.ucar.ral.wcsri.pubsub.getcvg.GetCoverageProcessor">
  40.         <property name="messageDAO" ref="messageDAO"/>
  41.         <property name="streamingFactory" ref="streamingFactory" />
  42.         <property name="jmsTemplate" ref="jmsTemplate"/>
  43.     </bean>
  44.  
  45.     <!-- Spring JMS Template -->
  46.     <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
  47.         <property name="connectionFactory">
  48.             <ref local="jmsConnectionFactory"/>
  49.         </property>
  50.     </bean>
  51.  
  52.     <!-- AMQ config -->
  53.     <bean id="jmsConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory" destroy-method="stop">
  54.         <property name="connectionFactory">
  55.             <bean class="org.apache.activemq.ActiveMQConnectionFactory">
  56.                 <property name="brokerURL" value="${amq.connection.url}"/>
  57.             </bean>
  58.         </property>
  59.     </bean>
  60.  
  61.     <bean id="transactionManager" class="org.springframework.jms.connection.JmsTransactionManager">
  62.         <property name="connectionFactory" ref="jmsConnectionFactory"/>
  63.     </bean>
  64.  
  65.     <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
  66.         <property name="connectionFactory" ref="jmsConnectionFactory"/>
  67.         <property name="transacted" value="true"/>
  68.         <property name="transactionManager" ref="transactionManager"/>
  69.     </bean>
  70.  
  71. </beans>