servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r1572938 - in /servicemix/smx5/trunk: ./ activemq/ activemq/activemq-service/ activemq/activemq-service/src/ activemq/activemq-service/src/main/ activemq/activemq-service/src/main/resources/ activemq/activemq-service/src/main/resources/OSGI...
Date Fri, 28 Feb 2014 12:48:13 GMT
Author: gertv
Date: Fri Feb 28 12:48:12 2014
New Revision: 1572938

URL: http://svn.apache.org/r1572938
Log:
SM-2183: Provide JMS ConnectionFactory in the OSGi Service Registry

Added:
    servicemix/smx5/trunk/activemq/
    servicemix/smx5/trunk/activemq/activemq-service/
    servicemix/smx5/trunk/activemq/activemq-service/pom.xml
    servicemix/smx5/trunk/activemq/activemq-service/src/
    servicemix/smx5/trunk/activemq/activemq-service/src/main/
    servicemix/smx5/trunk/activemq/activemq-service/src/main/resources/
    servicemix/smx5/trunk/activemq/activemq-service/src/main/resources/OSGI-INF/
    servicemix/smx5/trunk/activemq/activemq-service/src/main/resources/OSGI-INF/blueprint/
    servicemix/smx5/trunk/activemq/activemq-service/src/main/resources/OSGI-INF/blueprint/activemq-service.xml
    servicemix/smx5/trunk/activemq/pom.xml
Modified:
    servicemix/smx5/trunk/assembly/pom.xml
    servicemix/smx5/trunk/assembly/src/main/filtered-resources/etc/org.apache.karaf.features.cfg
    servicemix/smx5/trunk/assembly/src/main/filtered-resources/features.xml
    servicemix/smx5/trunk/logging/jms-appender/src/main/resources/OSGI-INF/blueprint/config.xml
    servicemix/smx5/trunk/pom.xml

Added: servicemix/smx5/trunk/activemq/activemq-service/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/activemq/activemq-service/pom.xml?rev=1572938&view=auto
==============================================================================
--- servicemix/smx5/trunk/activemq/activemq-service/pom.xml (added)
+++ servicemix/smx5/trunk/activemq/activemq-service/pom.xml Fri Feb 28 12:48:12 2014
@@ -0,0 +1,50 @@
+<?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/xsd/maven-4.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>activemq</artifactId>
+        <version>5.0.0-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.servicemix.activemq</groupId>
+    <artifactId>activemq-service</artifactId>
+    <packaging>bundle</packaging>
+    <name>Apache ServiceMix :: ActiveMQ :: Service</name>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+                        <Import-Package>*</Import-Package>
+                        <Bundle-Description>${project.description}</Bundle-Description>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file

Added: servicemix/smx5/trunk/activemq/activemq-service/src/main/resources/OSGI-INF/blueprint/activemq-service.xml
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/activemq/activemq-service/src/main/resources/OSGI-INF/blueprint/activemq-service.xml?rev=1572938&view=auto
==============================================================================
--- servicemix/smx5/trunk/activemq/activemq-service/src/main/resources/OSGI-INF/blueprint/activemq-service.xml
(added)
+++ servicemix/smx5/trunk/activemq/activemq-service/src/main/resources/OSGI-INF/blueprint/activemq-service.xml
Fri Feb 28 12:48:12 2014
@@ -0,0 +1,94 @@
+<?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.
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
+           xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">
+
+    <ext:property-placeholder placeholder-prefix="$[" placeholder-suffix="]" />
+
+    <cm:property-placeholder persistent-id="org.apache.activemq.server-default" update-strategy="reload">
+        <cm:default-properties>
+            <cm:property name="broker-name" value="amq-broker"/>
+        </cm:default-properties>
+    </cm:property-placeholder>
+
+    <bean id="activemqConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
+        <property name="brokerURL" value="vm://${broker-name}?create=false&amp;waitForStart=10000"/>
+        <property name="userName" value="$[activemq.jmx.user]" />
+        <property name="password" value="$[activemq.jmx.password]" />
+    </bean>
+
+    <bean id="pooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory">
+        <property name="maxConnections" value="8"/>
+        <property name="connectionFactory" ref="activemqConnectionFactory"/>
+    </bean>
+
+    <!-- connection factory wrapper to support auto-enlisting of XA resource -->
+    <bean id="jmsXaPoolConnectionFactory" class="org.apache.activemq.pool.XaPooledConnectionFactory">
+        <property name="maxConnections" value="1" />
+        <property name="connectionFactory" ref="jmsXaConnectionFactory" />
+        <property name="transactionManager" ref="osgiJtaTransactionManager" />
+    </bean>
+
+    <bean id="jmsXaConnectionFactory" class="org.apache.activemq.ActiveMQXAConnectionFactory">
+        <property name="brokerURL" value="vm://${broker-name}?create=false&amp;waitForStart=10000"/>
+        <property name="userName" value="$[activemq.jmx.user]" />
+        <property name="password" value="$[activemq.jmx.password]" />
+        <property name="redeliveryPolicy">
+            <bean class="org.apache.activemq.RedeliveryPolicy">
+                <property name="maximumRedeliveries" value="0"/>
+            </bean>
+        </property>
+    </bean>
+
+    <!--
+        ActiveMQ XA Resource Manager
+    -->
+    <bean id="resourceManager"
+          class="org.apache.activemq.pool.ActiveMQResourceManager"
+          init-method="recoverResource">
+        <property name="transactionManager" ref="osgiJtaTransactionManager" />
+        <property name="connectionFactory" ref="jmsXaPoolConnectionFactory" />
+        <property name="resourceName" value="activemq.${broker-name}" />
+    </bean>
+
+
+    <reference id="osgiJtaTransactionManager"
+               interface="javax.transaction.TransactionManager"
+               availability="mandatory" />
+
+    <!--
+        Register the javax.jms.ConnectionFactory in the OSGi Service Registry
+    -->
+    <service ref="pooledConnectionFactory" interface="javax.jms.ConnectionFactory">
+        <service-properties>
+            <entry key="name" value="${broker-name}"/>
+            <entry key="transacted" value="false" />
+        </service-properties>
+    </service>
+
+    <!--
+        Register the javax.jms.ConnectionFactory for the XA PooledConnectionFactory in the
OSGi Service Registry
+    -->
+    <service ref="jmsXaPoolConnectionFactory" interface="javax.jms.ConnectionFactory">
+        <service-properties>
+            <entry key="name" value="${broker-name}" />
+            <entry key="transacted" value="true" />
+        </service-properties>
+    </service>
+</blueprint>
\ No newline at end of file

Added: servicemix/smx5/trunk/activemq/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/activemq/pom.xml?rev=1572938&view=auto
==============================================================================
--- servicemix/smx5/trunk/activemq/pom.xml (added)
+++ servicemix/smx5/trunk/activemq/pom.xml Fri Feb 28 12:48:12 2014
@@ -0,0 +1,39 @@
+<?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/xsd/maven-4.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>parent</artifactId>
+        <version>5.0.0-SNAPSHOT</version>
+        <relativePath>../parent/pom.xml</relativePath>
+    </parent>
+
+    <groupId>org.apache.servicemix</groupId>
+    <artifactId>activemq</artifactId>
+    <packaging>pom</packaging>
+    <name>Apache ServiceMix :: ActiveMQ</name>
+
+    <modules>
+        <module>activemq-service</module>
+    </modules>
+
+</project>
\ No newline at end of file

Modified: servicemix/smx5/trunk/assembly/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/assembly/pom.xml?rev=1572938&r1=1572937&r2=1572938&view=diff
==============================================================================
--- servicemix/smx5/trunk/assembly/pom.xml (original)
+++ servicemix/smx5/trunk/assembly/pom.xml Fri Feb 28 12:48:12 2014
@@ -150,7 +150,8 @@
                                 <feature>cxf</feature>
                                 <feature>obr</feature>
                                 <feature>config</feature>
-                                <feature>activemq</feature>
+                                <feature>activemq-broker-noweb</feature>
+                                <feature>activemq-service</feature>
                                 <feature>camel</feature>
                                 <feature>camel-cxf</feature>
                                 <feature>camel-blueprint</feature>

Modified: servicemix/smx5/trunk/assembly/src/main/filtered-resources/etc/org.apache.karaf.features.cfg
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/assembly/src/main/filtered-resources/etc/org.apache.karaf.features.cfg?rev=1572938&r1=1572937&r2=1572938&view=diff
==============================================================================
--- servicemix/smx5/trunk/assembly/src/main/filtered-resources/etc/org.apache.karaf.features.cfg
(original)
+++ servicemix/smx5/trunk/assembly/src/main/filtered-resources/etc/org.apache.karaf.features.cfg
Fri Feb 28 12:48:12 2014
@@ -25,7 +25,7 @@ featuresRepositories=mvn:org.apache.kara
 #
 # Comma separated list of features to install at startup
 #
-featuresBoot=config,activemq-broker-noweb,jaxrs-api,camel,camel-cxf,camel-blueprint,war
+featuresBoot=config,activemq-broker-noweb,activemq-service,jaxrs-api,camel,camel-cxf,camel-blueprint,war
 
 #
 # Defines if the boot features are started in asynchronous mode (in a dedicated thread)

Modified: servicemix/smx5/trunk/assembly/src/main/filtered-resources/features.xml
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/assembly/src/main/filtered-resources/features.xml?rev=1572938&r1=1572937&r2=1572938&view=diff
==============================================================================
--- servicemix/smx5/trunk/assembly/src/main/filtered-resources/features.xml (original)
+++ servicemix/smx5/trunk/assembly/src/main/filtered-resources/features.xml Fri Feb 28 12:48:12
2014
@@ -171,6 +171,11 @@
         <bundle>mvn:org.apache.servicemix.logging/jms-appender/${version}</bundle>
     </feature>
 
+    <feature name="activemq-service" version="${version}" resolver="(obr)" start-level="50">
+        <feature version="${activemq.version}">activemq-broker-noweb</feature>
+        <bundle>mvn:org.apache.servicemix.activemq/activemq-service/${version}</bundle>
+    </feature>
+
     <!-- Activiti support -->
     <feature name="activiti" version="${activiti.version}" resolver="(obr)">
         <feature version="${cxf.version}">cxf-specs</feature>

Modified: servicemix/smx5/trunk/logging/jms-appender/src/main/resources/OSGI-INF/blueprint/config.xml
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/logging/jms-appender/src/main/resources/OSGI-INF/blueprint/config.xml?rev=1572938&r1=1572937&r2=1572938&view=diff
==============================================================================
--- servicemix/smx5/trunk/logging/jms-appender/src/main/resources/OSGI-INF/blueprint/config.xml
(original)
+++ servicemix/smx5/trunk/logging/jms-appender/src/main/resources/OSGI-INF/blueprint/config.xml
Fri Feb 28 12:48:12 2014
@@ -17,8 +17,7 @@
 
 -->
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
-           xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">
+           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0">
 
     <cm:property-placeholder persistent-id="org.apache.servicemix.logging.jms" update-strategy="reload">
         <cm:default-properties>
@@ -28,7 +27,7 @@
     </cm:property-placeholder>
 
     <!-- Need OSGI JMS Connection Factory Service exposed  -->
-    <reference id="jmsConnectionFactory" interface="javax.jms.ConnectionFactory"/>
+    <reference id="jmsConnectionFactory" interface="javax.jms.ConnectionFactory" filter="(transacted=false)"
/>
 
     <bean id="appender" class="org.apache.servicemix.logging.jms.JMSAppender" destroy-method="close">
         <property name="jmsConnectionFactory" ref="jmsConnectionFactory"/>

Modified: servicemix/smx5/trunk/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx5/trunk/pom.xml?rev=1572938&r1=1572937&r2=1572938&view=diff
==============================================================================
--- servicemix/smx5/trunk/pom.xml (original)
+++ servicemix/smx5/trunk/pom.xml Fri Feb 28 12:48:12 2014
@@ -37,6 +37,7 @@
 
     <modules>
         <module>parent</module>
+        <module>activemq</module>
         <module>activiti</module>
         <module>branding</module>
         <module>logging</module>



Mime
View raw message