Hi, 

I think you need to checkout the log file to see if there is any related error.
BTW, as camel 2.10 does not use the Spring 3.1.x out box, you may need to check 
the class patch setting of you test.

-- 
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
          http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang 
Weibo: willemjiang





On Wednesday, October 17, 2012 at 6:23 AM, jiunjiunma wrote:

> Hi, 
> I am trying to use Spring 3.1's ActiveProfiles feature to start an
> embedded activemq in my test context. However, it doesn't seem the profile
> was chosen since the embedded broker was never created. I am using Spring
> 3.1.2 with Camel 2.10 and using testng. 
> 
> Here is the snippet of my application context:
> 
> 
> 
> <beans profile="test">
> <broker:broker useJmx="false" persistent="false"
> brokerName="localhost">
> <broker:transportConnectors>
> <broker:transportConnector name="tcp"
> uri="tcp://localhost:61616"/>
> </broker:transportConnectors>
> </broker:broker>
> 
> <bean id="jmsConnectionFactory"
> class="org.apache.activemq.ActiveMQConnectionFactory">
> <property name="brokerURL" value="tcp://localhost:61616" />
> </bean>
> </beans>
> 
> <beans profile="production">
> <bean id="jmsConnectionFactory"
> class="org.apache.activemq.ActiveMQConnectionFactory">
> <property name="brokerURL" value="tcp://localhost:61616" />
> </bean>
> </beans>
> 
> 
> My test looks liks this:
> 
> @ContextConfiguration(locations={
> "classpath:config/applicationContext.xml"})
> @ActiveProfiles("test")
> public class SimpleApplicationTest extends
> AbstractCamelTestNGSpringContextTests {
> @Autowired
> protected CamelContext camelContext;
> ...
> }
> 
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Is-Spring-ActiveProfiles-annotation-supported-in-camel-test-2-10-tp5721145.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).
> 



Reply via email to