You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2016/08/22 09:30:25 UTC
[27/50] [abbrv] karaf git commit: [KARAF-4624] Remove module again as
it is now at ActiveMQ
[KARAF-4624] Remove module again as it is now at ActiveMQ
Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/a72269ca
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/a72269ca
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/a72269ca
Branch: refs/heads/master
Commit: a72269ca80f46eb451f49182c3b3258cc691a8fd
Parents: e5beeb0
Author: Christian Schneider <ch...@die-schneider.net>
Authored: Tue Aug 2 14:29:40 2016 +0200
Committer: Jean-Baptiste Onofr� <jb...@apache.org>
Committed: Mon Aug 22 11:29:20 2016 +0200
----------------------------------------------------------------------
jms/activemq-cf/.gitignore | 1 -
jms/activemq-cf/README.md | 11 ---
jms/activemq-cf/org.apache.karaf.activemq.cfg | 5 --
jms/activemq-cf/pom.xml | 77 -------------------
.../activemq/ConnectionFactoryProvider.java | 80 --------------------
jms/pom.xml | 1 -
6 files changed, 175 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/karaf/blob/a72269ca/jms/activemq-cf/.gitignore
----------------------------------------------------------------------
diff --git a/jms/activemq-cf/.gitignore b/jms/activemq-cf/.gitignore
deleted file mode 100644
index b83d222..0000000
--- a/jms/activemq-cf/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/target/
http://git-wip-us.apache.org/repos/asf/karaf/blob/a72269ca/jms/activemq-cf/README.md
----------------------------------------------------------------------
diff --git a/jms/activemq-cf/README.md b/jms/activemq-cf/README.md
deleted file mode 100644
index 6c16215..0000000
--- a/jms/activemq-cf/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# Activemq-cf
-
-Allows to create a Pooled ActiveMQ ConnectionFactory from a config.
-
-## Install
-
-Install the activemq-client and scr features and this bundle. Then put the example config org.apache.karaf.activemq.cfg in etc.
-
- service:list ConnectionFactory
-
-This should show the ConnectionFactory as a service.
http://git-wip-us.apache.org/repos/asf/karaf/blob/a72269ca/jms/activemq-cf/org.apache.karaf.activemq.cfg
----------------------------------------------------------------------
diff --git a/jms/activemq-cf/org.apache.karaf.activemq.cfg b/jms/activemq-cf/org.apache.karaf.activemq.cfg
deleted file mode 100644
index 51897fc..0000000
--- a/jms/activemq-cf/org.apache.karaf.activemq.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-# Example ConnectionFactory def for decanter
-osgi.jndi.service.name=jms/decanter
-url=tcp://localhost:61616
-userName=karaf
-password=karaf
http://git-wip-us.apache.org/repos/asf/karaf/blob/a72269ca/jms/activemq-cf/pom.xml
----------------------------------------------------------------------
diff --git a/jms/activemq-cf/pom.xml b/jms/activemq-cf/pom.xml
deleted file mode 100644
index f471b2b..0000000
--- a/jms/activemq-cf/pom.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?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.karaf</groupId>
- <artifactId>karaf</artifactId>
- <version>4.1.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
-
- <groupId>org.apache.karaf.jms</groupId>
- <artifactId>org.apache.karaf.jms.activemq-cf</artifactId>
- <packaging>bundle</packaging>
- <name>Apache Karaf :: JMS :: ActiveMQ Connection Factory</name>
- <description>Creates ACTIVEMQ ConnectionFactory services from config</description>
-
- <properties>
- <appendedResourcesDirectory>${basedir}/../../etc/appended-resources</appendedResourcesDirectory>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-client</artifactId>
- <version>5.13.3</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-jms-pool</artifactId>
- <version>5.13.3</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Private-Package>
- org.apache.karaf.activemq
- </Private-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
http://git-wip-us.apache.org/repos/asf/karaf/blob/a72269ca/jms/activemq-cf/src/main/java/org/apache/karaf/activemq/ConnectionFactoryProvider.java
----------------------------------------------------------------------
diff --git a/jms/activemq-cf/src/main/java/org/apache/karaf/activemq/ConnectionFactoryProvider.java b/jms/activemq-cf/src/main/java/org/apache/karaf/activemq/ConnectionFactoryProvider.java
deleted file mode 100644
index 574c346..0000000
--- a/jms/activemq-cf/src/main/java/org/apache/karaf/activemq/ConnectionFactoryProvider.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.
- */
-package org.apache.karaf.activemq;
-
-import java.util.Dictionary;
-import java.util.Hashtable;
-
-import javax.jms.ConnectionFactory;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.jms.pool.PooledConnectionFactory;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-import org.osgi.service.component.ComponentContext;
-import org.osgi.service.component.annotations.Activate;
-import org.osgi.service.component.annotations.Component;
-import org.osgi.service.component.annotations.ConfigurationPolicy;
-import org.osgi.service.component.annotations.Deactivate;
-
-@Component //
-( //
- configurationPid = "org.apache.karaf.activemq", //
- immediate = true, //
- configurationPolicy = ConfigurationPolicy.REQUIRE //
-)
-public class ConnectionFactoryProvider {
-
- private static final String OSGI_JNDI_SERVICE_NAME = "osgi.jndi.service.name";
- private ServiceRegistration<ConnectionFactory> reg;
-
- @Activate
- public void create(ComponentContext compContext) {
- BundleContext context = compContext.getBundleContext();
- Dictionary<String, Object> config = compContext.getProperties();
- String brokerURL = getString(config, "url", "tcp://localhost:61616");
- String jndiName = getString(config, OSGI_JNDI_SERVICE_NAME, "jms/local");
- String userName = getString(config, "userName", null);
- String password = getString(config, "password", null);
- long expiryTimeout = new Long(getString(config, "expiryTimeout", "0"));
- int idleTimeout = new Integer(getString(config, "idleTimeout", "30000"));
- int maxConnections = new Integer(getString(config, "maxConnections", "8"));
- ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(brokerURL);
- if (userName != null) {
- cf.setUserName(userName);
- cf.setPassword(password);
- }
- PooledConnectionFactory pcf = new PooledConnectionFactory();
- pcf.setConnectionFactory(cf);
- pcf.setExpiryTimeout(expiryTimeout);
- pcf.setIdleTimeout(idleTimeout);
- pcf.setMaxConnections(maxConnections);
- Dictionary<String, String> props = new Hashtable<String, String>();
- props.put(OSGI_JNDI_SERVICE_NAME, jndiName);
- reg = context.registerService(ConnectionFactory.class, pcf, props);
- }
-
- @Deactivate
- public void deactivate() {
- reg.unregister();
- }
-
- private String getString(Dictionary<String, Object> config, String key, String defaultValue) {
- Object value = config.get(key);
- return value != null ? value.toString() : defaultValue;
- }
-}
http://git-wip-us.apache.org/repos/asf/karaf/blob/a72269ca/jms/pom.xml
----------------------------------------------------------------------
diff --git a/jms/pom.xml b/jms/pom.xml
index 756f654..fdc3b17 100644
--- a/jms/pom.xml
+++ b/jms/pom.xml
@@ -34,7 +34,6 @@
<name>Apache Karaf :: Features</name>
<modules>
- <module>activemq-cf</module>
<module>core</module>
</modules>
</project>