Permalink
Browse files

Add repro case for SPR-9119

  • Loading branch information...
1 parent 12804f2 commit 75b5f0f2690b5c7c1c8af527f8c0174072baa2bd @cbeams cbeams committed Feb 15, 2012
View
@@ -0,0 +1,56 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.springframework.issues</groupId>
+ <artifactId>SPR-9119</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <properties>
+ <maven.compiler.source>1.6</maven.compiler.source>
+ <maven.compiler.target>1.6</maven.compiler.target>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jms</artifactId>
+ <version>3.1.1.BUILD-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>activemq-core</artifactId>
+ <version>5.5.1</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>spring-context</artifactId>
+ <groupId>org.springframework</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.10</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xbean</groupId>
+ <artifactId>xbean-spring</artifactId>
+ <version>3.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.6.4</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.6</version>
+ </dependency>
+ </dependencies>
+ <repositories>
+ <repository>
+ <id>springsource</id>
+ <url>http://repo.springsource.org/snapshot</url>
+ </repository>
+ </repositories>
+</project>
@@ -0,0 +1,23 @@
+package org.mcp.test;
+
+import junit.framework.Assert;
+
+import org.apache.commons.lang.ArrayUtils;
+import org.junit.Test;
+import org.springframework.context.support.GenericXmlApplicationContext;
+
+public class ActiveMQTest {
+
+ @Test
+ public void testJmsConnectionFactory() {
+ GenericXmlApplicationContext applicationContext = new GenericXmlApplicationContext();
+ applicationContext.getEnvironment().setActiveProfiles("test");
+ applicationContext.load("/jmsContext.xml");
+ applicationContext.refresh();
+ String[] profiles = applicationContext.getEnvironment().getActiveProfiles();
+ Assert.assertTrue(ArrayUtils.contains(profiles, "test"));
+ String[] beanNames = applicationContext.getBeanDefinitionNames();
+ Assert.assertTrue(ArrayUtils.contains(beanNames, "jmsConnectionFactory"));
+ }
+
+}
@@ -0,0 +1,20 @@
+<?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:amq="http://activemq.apache.org/schema/core"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
+ http://activemq.apache.org/schema/core
+ http://activemq.apache.org/schema/core/activemq-core.xsd">
+
+ <beans>
+ <amq:broker useJmx="false" persistent="false">
+ <amq:transportConnectors>
+ <amq:transportConnector uri="tcp://localhost:0" />
+ </amq:transportConnectors>
+ </amq:broker>
+
+ <amq:connectionFactory id="jmsConnectionFactory" brokerURL="vm://localhost"/>
+ </beans>
+</beans>

0 comments on commit 75b5f0f

Please sign in to comment.