Author: ffang
Date: Thu Nov 15 19:42:46 2007
New Revision: 595538
URL: http://svn.apache.org/viewvc?rev=595538&view=rev
Log:
[SM-1065] apply patch provided by Jeff Yu
Added:
incubator/servicemix/branches/servicemix-4.0/activemq/
incubator/servicemix/branches/servicemix-4.0/activemq/pom.xml (with props)
incubator/servicemix/branches/servicemix-4.0/activemq/src/
incubator/servicemix/branches/servicemix-4.0/activemq/src/main/
incubator/servicemix/branches/servicemix-4.0/activemq/src/main/resources/
incubator/servicemix/branches/servicemix-4.0/activemq/src/main/resources/META-INF/
incubator/servicemix/branches/servicemix-4.0/activemq/src/main/resources/META-INF/spring/
incubator/servicemix/branches/servicemix-4.0/activemq/src/main/resources/META-INF/spring/servicemix-activemq.xml
(with props)
Modified:
incubator/servicemix/branches/servicemix-4.0/itests/pom.xml
incubator/servicemix/branches/servicemix-4.0/itests/src/test/java/org/apache/servicemix/IntegrationTest.java
incubator/servicemix/branches/servicemix-4.0/itests/src/test/resources/org/apache/servicemix/MANIFEST.MF
incubator/servicemix/branches/servicemix-4.0/pom.xml
Added: incubator/servicemix/branches/servicemix-4.0/activemq/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-4.0/activemq/pom.xml?rev=595538&view=auto
==============================================================================
--- incubator/servicemix/branches/servicemix-4.0/activemq/pom.xml (added)
+++ incubator/servicemix/branches/servicemix-4.0/activemq/pom.xml Thu Nov 15
19:42:46 2007
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/maven-v4_0_0.xsd">
+
+ <!--
+
+ 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.
+ -->
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.servicemix</groupId>
+ <artifactId>servicemix</artifactId>
+ <version>4.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.apache.servicemix</groupId>
+ <artifactId>org.apache.servicemix.activemq</artifactId>
+ <packaging>bundle</packaging>
+ <version>4.0-SNAPSHOT</version>
+ <name>ServiceMix ActiveMQ</name>
+
+ <properties>
+ <commons-pool.version>1.3</commons-pool.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jms_1.1_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jta_1.1_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>activemq-core</artifactId>
+ <version>${activemq.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.osgi</groupId>
+ <artifactId>spring-osgi-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-pool</groupId>
+ <artifactId>commons-pool</artifactId>
+ <version>${commons-pool.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <configuration>
+ <instructions>
+
<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+ <Import-Package></Import-Package>
+ <DynamicImport-Package>*</DynamicImport-Package>
+ <Private-Package>
+ org.apache.commons.pool*,
+ javax.transaction*
+ </Private-Package>
+ <Export-Package>
+ org.apache.commons.pool
+ </Export-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+
+</project>
Propchange: incubator/servicemix/branches/servicemix-4.0/activemq/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/servicemix/branches/servicemix-4.0/activemq/pom.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/servicemix/branches/servicemix-4.0/activemq/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added:
incubator/servicemix/branches/servicemix-4.0/activemq/src/main/resources/META-INF/spring/servicemix-activemq.xml
URL:
http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-4.0/activemq/src/main/resources/META-INF/spring/servicemix-activemq.xml?rev=595538&view=auto
==============================================================================
---
incubator/servicemix/branches/servicemix-4.0/activemq/src/main/resources/META-INF/spring/servicemix-activemq.xml
(added)
+++
incubator/servicemix/branches/servicemix-4.0/activemq/src/main/resources/META-INF/spring/servicemix-activemq.xml
Thu Nov 15 19:42:46 2007
@@ -0,0 +1,76 @@
+<?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.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:osgi="http://www.springframework.org/schema/osgi"
+ xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/util
+ http://www.springframework.org/schema/util/spring-util.xsd
+ http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd
+ http://www.springframework.org/schema/osgi-compendium
+ http://www.springframework.org/schema/osgi/spring-osgi-compendium.xsd
+ ">
+
+ <bean id="broker" class="org.apache.activemq.broker.BrokerService"
init-method="start">
+ <property name="transportConnectorURIs">
+ <list>
+ <value>${brokerURL}</value>
+ </list>
+ </property>
+ <property name="useJmx">
+ <value>${useJmx}</value>
+ </property>
+ <property name="persistent">
+ <value>${persistent}</value>
+ </property>
+ </bean>
+
+ <bean id="connectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
+ <property name="brokerURL">
+ <value>${brokerURL}</value>
+ </property>
+ </bean>
+
+ <bean id="pooledConnectionFactory"
class="org.apache.activemq.pool.PooledConnectionFactory" destroy-method="stop">
+ <property name="connectionFactory">
+ <ref bean="connectionFactory" />
+ </property>
+ </bean>
+
+ <osgi:service ref="pooledConnectionFactory">
+ <osgi:interfaces>
+ <value>javax.jms.ConnectionFactory</value>
+ </osgi:interfaces>
+ </osgi:service>
+
+ <osgix:property-placeholder
persistent-id="org.apache.servicemix.jms.activemq">
+ <osgix:default-properties>
+ <prop key="brokerURL">tcp://localhost:61616</prop>
+ <prop key="persistent">false</prop>
+ <prop key="useJmx">false</prop>
+ </osgix:default-properties>
+ </osgix:property-placeholder>
+
+</beans>
\ No newline at end of file
Propchange:
incubator/servicemix/branches/servicemix-4.0/activemq/src/main/resources/META-INF/spring/servicemix-activemq.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/servicemix/branches/servicemix-4.0/activemq/src/main/resources/META-INF/spring/servicemix-activemq.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
incubator/servicemix/branches/servicemix-4.0/activemq/src/main/resources/META-INF/spring/servicemix-activemq.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: incubator/servicemix/branches/servicemix-4.0/itests/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-4.0/itests/pom.xml?rev=595538&r1=595537&r2=595538&view=diff
==============================================================================
--- incubator/servicemix/branches/servicemix-4.0/itests/pom.xml (original)
+++ incubator/servicemix/branches/servicemix-4.0/itests/pom.xml Thu Nov 15
19:42:46 2007
@@ -133,6 +133,12 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>commons-pool</groupId>
+ <artifactId>commons-pool</artifactId>
+ <version>1.3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
@@ -261,6 +267,10 @@
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jta_1.1_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
<scope>test</scope>
</dependency>
@@ -285,7 +295,12 @@
<version>5.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
-
+ <dependency>
+ <groupId>org.apache.servicemix</groupId>
+ <artifactId>org.apache.servicemix.activemq</artifactId>
+ <version>4.0-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
<!--
<dependency>
<groupId>org.apache.felix</groupId>
@@ -334,6 +349,17 @@
<exclusion>
<groupId>org.apache.felix</groupId>
<artifactId>javax.servlet</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.configadmin</artifactId>
+ <version>0.9.0-SNAPSHOT</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.osgi.core</artifactId>
</exclusion>
</exclusions>
</dependency>
Modified:
incubator/servicemix/branches/servicemix-4.0/itests/src/test/java/org/apache/servicemix/IntegrationTest.java
URL:
http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-4.0/itests/src/test/java/org/apache/servicemix/IntegrationTest.java?rev=595538&r1=595537&r2=595538&view=diff
==============================================================================
---
incubator/servicemix/branches/servicemix-4.0/itests/src/test/java/org/apache/servicemix/IntegrationTest.java
(original)
+++
incubator/servicemix/branches/servicemix-4.0/itests/src/test/java/org/apache/servicemix/IntegrationTest.java
Thu Nov 15 19:42:46 2007
@@ -21,9 +21,10 @@
import java.io.FileInputStream;
import java.util.Properties;
+import javax.jms.ConnectionFactory;
+
import org.apache.servicemix.nmr.api.Endpoint;
import org.apache.servicemix.nmr.api.NMR;
-import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.springframework.osgi.test.AbstractConfigurableBundleCreatorTests;
@@ -100,6 +101,9 @@
getBundle("org.apache.servicemix", "org.apache.servicemix.jaxws"),
getBundle("org.apache.servicemix.examples",
"org.apache.servicemix.examples.intermediary"),
getBundle("org.apache.servicemix.examples",
"org.apache.servicemix.examples.jaxws"),
+ getBundle("org.apache.felix","org.apache.felix.configadmin"),
+ getBundle("org.apache.geronimo.specs","geronimo-jta_1.1_spec"),
+ getBundle("org.apache.servicemix","org.apache.servicemix.activemq")
};
}
@@ -150,8 +154,10 @@
waitOnContextCreation("org.apache.servicemix.examples.intermediary");
ServiceReference ref =
bundleContext.getServiceReference(NMR.class.getName());
ServiceReference endpointRef =
bundleContext.getServiceReference(Endpoint.class.getName());
+ ServiceReference connectionFactoryRef =
bundleContext.getServiceReference(ConnectionFactory.class.getName());
assertNotNull("Service Reference is null", ref);
assertNotNull("Endpoint Reference is null", endpointRef);
+ assertNotNull("ConnectionFacotory Reference is null",
connectionFactoryRef);
try {
NMR nmr = (NMR) bundleContext.getService(ref);
assertNotNull("Cannot find the service", nmr);
@@ -159,6 +165,10 @@
assertNotNull(jaxwsProvider);
assertEquals(jaxwsProvider.getClass().getName(),
"org.apache.servicemix.jaxws.JAXWSProvider");
+
+ ConnectionFactory connFactory =
(ConnectionFactory)bundleContext.getService(connectionFactoryRef);
+ assertNotNull(connFactory);
+ assertEquals(connFactory.getClass().getName(),
"org.apache.activemq.pool.PooledConnectionFactory");
} finally {
bundleContext.ungetService(ref);
}
Modified:
incubator/servicemix/branches/servicemix-4.0/itests/src/test/resources/org/apache/servicemix/MANIFEST.MF
URL:
http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-4.0/itests/src/test/resources/org/apache/servicemix/MANIFEST.MF?rev=595538&r1=595537&r2=595538&view=diff
==============================================================================
---
incubator/servicemix/branches/servicemix-4.0/itests/src/test/resources/org/apache/servicemix/MANIFEST.MF
(original)
+++
incubator/servicemix/branches/servicemix-4.0/itests/src/test/resources/org/apache/servicemix/MANIFEST.MF
Thu Nov 15 19:42:46 2007
@@ -24,4 +24,6 @@
org.springframework.core.io,
org.springframework.osgi.test,
org.apache.servicemix.nmr.api,
- org.apache.servicemix.nmr.core
+ org.apache.servicemix.nmr.core,
+ javax.jms
+
Modified: incubator/servicemix/branches/servicemix-4.0/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-4.0/pom.xml?rev=595538&r1=595537&r2=595538&view=diff
==============================================================================
--- incubator/servicemix/branches/servicemix-4.0/pom.xml (original)
+++ incubator/servicemix/branches/servicemix-4.0/pom.xml Thu Nov 15 19:42:46
2007
@@ -42,6 +42,7 @@
<module>main</module>
<module>apache-servicemix</module>
<module>jaxws</module>
+ <module>activemq</module>
</modules>
<distributionManagement>
@@ -274,6 +275,11 @@
<dependency>
<groupId>org.apache.servicemix</groupId>
<artifactId>org.apache.servicemix.jaxws</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.servicemix</groupId>
+ <artifactId>org.apache.servicemix.activemq</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>