mirror of https://github.com/apache/activemq.git
Removed all un-needed dependencies from the activemq-broker pom. Moved the remaining spring support classes into activemq-spring.
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1406852 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
804ad67d21
commit
7c9fec6e25
|
@ -39,30 +39,12 @@
|
|||
<!-- Required Dependencies -->
|
||||
<!-- =============================== -->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-jms_1.1_spec</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>activeio-core</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.activemq.protobuf</groupId>
|
||||
<artifactId>activemq-protobuf</artifactId>
|
||||
<optional>false</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.fusesource.mqtt-client</groupId>
|
||||
<artifactId>mqtt-client</artifactId>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-client</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-client</artifactId>
|
||||
<artifactId>activemq-openwire-legacy</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- =============================== -->
|
||||
|
@ -80,67 +62,17 @@
|
|||
<artifactId>activemq-jaas</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-jta_1.0.1B_spec</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-j2ee-management_1.1_spec</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-annotation_1.0_spec</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-jacc_1.1_spec</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
<artifactId>xstream</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.jettison</groupId>
|
||||
<artifactId>jettison</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<!--<dependency>-->
|
||||
<!--<groupId>org.springframework</groupId>-->
|
||||
<!--<artifactId>spring-context</artifactId>-->
|
||||
<!--</dependency>-->
|
||||
|
||||
<!-- for XML parsing -->
|
||||
<dependency>
|
||||
<groupId>org.apache.xbean</groupId>
|
||||
<artifactId>xbean-spring</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.derby</groupId>
|
||||
<artifactId>derby</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<!-- to support XPath based Selectors -->
|
||||
<dependency>
|
||||
<groupId>xalan</groupId>
|
||||
<artifactId>xalan</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-net</groupId>
|
||||
<artifactId>commons-net</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- not really a dependency at all - just added optionally to get the generator working -->
|
||||
<dependency>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-openwire-generator</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- =============================== -->
|
||||
<!-- Testing Dependencies -->
|
||||
|
@ -150,123 +82,11 @@
|
|||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hamcrest</groupId>
|
||||
<artifactId>hamcrest-all</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-jms</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.jmdns</groupId>
|
||||
<artifactId>jmdns</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jasypt</groupId>
|
||||
<artifactId>jasypt</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jasypt</groupId>
|
||||
<artifactId>jasypt-spring3</artifactId>
|
||||
<version>${jasypt-version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty-util</artifactId>
|
||||
<version>6.1.26</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- database testing -->
|
||||
<dependency>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-primitives</groupId>
|
||||
<artifactId>commons-primitives</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>axion</groupId>
|
||||
<artifactId>axion</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>regexp</groupId>
|
||||
<artifactId>regexp</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Joram JMS conformance tests -->
|
||||
<dependency>
|
||||
<groupId>org.fusesource.joram-jms-tests</groupId>
|
||||
<artifactId>joram-jms-tests</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<!-- using it for Jetty's JNDI context to work /w Joram tests. -->
|
||||
<groupId>org.eclipse.jetty.aggregate</groupId>
|
||||
<artifactId>jetty-all-server</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- LDAP tests -->
|
||||
<dependency>
|
||||
<groupId>org.apache.directory.server</groupId>
|
||||
<artifactId>apacheds-core-integ</artifactId>
|
||||
<version>${directory-version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.directory.server</groupId>
|
||||
<artifactId>apacheds-server-integ</artifactId>
|
||||
<version>${directory-version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jmock</groupId>
|
||||
<artifactId>jmock-junit4</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jmock</groupId>
|
||||
<artifactId>jmock-legacy</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.ftpserver</groupId>
|
||||
<artifactId>ftpserver-core</artifactId>
|
||||
<version>${ftpserver-version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<reporting>
|
||||
|
@ -354,52 +174,6 @@
|
|||
</reporting>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${project.basedir}/src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>${project.basedir}/src/main/filtered-resources</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>**/*</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<!--This plugin's configuration is used to store Eclipse m2e settings only.
|
||||
It has no influence on the Maven build itself.-->
|
||||
<plugin>
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
<artifactId>lifecycle-mapping</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<configuration>
|
||||
<lifecycleMappingMetadata>
|
||||
<pluginExecutions>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>org.apache.activemq.protobuf</groupId>
|
||||
<artifactId>activemq-protobuf</artifactId>
|
||||
<versionRange>[0.0.0,)</versionRange>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore />
|
||||
</action>
|
||||
</pluginExecution>
|
||||
</pluginExecutions>
|
||||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
|
@ -430,18 +204,6 @@
|
|||
</includes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.activemq.protobuf</groupId>
|
||||
<artifactId>activemq-protobuf</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
|
@ -453,52 +215,6 @@
|
|||
</filesets>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>package</id>
|
||||
<phase>package</phase>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<echo>Deleting unwanted resources from the test-jar</echo>
|
||||
<delete dir="${project.build.directory}/test-classes" verbose="true">
|
||||
<include name="*.*" />
|
||||
</delete>
|
||||
</tasks>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>site</id>
|
||||
<phase>site</phase>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<echo>Running the XSDDoc task</echo>
|
||||
<taskdef name="xsddoc" classname="net.sf.xframe.xsddoc.Task" />
|
||||
<mkdir dir="${basedir}/target/site/xsddoc" />
|
||||
<xsddoc file="${basedir}/target/classes/activemq.xsd" out="${basedir}/target/site/xsddoc" doctitle="Apache ActiveMQ XML Schema Reference" header="<a href='http://activemq.apache.org/'>Apache ActiveMQ</a>" footer="Copyright 2005-2012 (c) the <a href='http://www.apache.org/'>Apache Software Foundation</a>" verbose="false" />
|
||||
<!--
|
||||
css="${basedir}/../etc/css/stylesheet.css"
|
||||
-->
|
||||
</tasks>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>xsddoc</groupId>
|
||||
<artifactId>maven-xsddoc-plugin</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<!-- generate the attached tests jar -->
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
|
@ -510,19 +226,6 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<check>
|
||||
<branchRate>50</branchRate>
|
||||
<lineRate>50</lineRate>
|
||||
<haltOnFailure>true</haltOnFailure>
|
||||
<totalBranchRate>50</totalBranchRate>
|
||||
<totalLineRate>50</totalLineRate>
|
||||
</check>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
|
|
|
@ -38,7 +38,6 @@ import org.apache.activemq.util.LRUCache;
|
|||
import org.apache.activemq.util.ThreadPoolUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.jndi.JndiTemplate;
|
||||
|
||||
/**
|
||||
* This bridge joins the gap between foreign JMS providers and ActiveMQ As some
|
||||
|
@ -51,8 +50,8 @@ public abstract class JmsConnector implements Service {
|
|||
private static final Logger LOG = LoggerFactory.getLogger(JmsConnector.class);
|
||||
|
||||
protected boolean preferJndiDestinationLookup = false;
|
||||
protected JndiTemplate jndiLocalTemplate;
|
||||
protected JndiTemplate jndiOutboundTemplate;
|
||||
protected JndiLookupFactory jndiLocalTemplate;
|
||||
protected JndiLookupFactory jndiOutboundTemplate;
|
||||
protected JmsMesageConvertor inboundMessageConvertor;
|
||||
protected JmsMesageConvertor outboundMessageConvertor;
|
||||
protected AtomicBoolean initialized = new AtomicBoolean(false);
|
||||
|
@ -104,10 +103,10 @@ public abstract class JmsConnector implements Service {
|
|||
boolean result = initialized.compareAndSet(false, true);
|
||||
if (result) {
|
||||
if (jndiLocalTemplate == null) {
|
||||
jndiLocalTemplate = new JndiTemplate();
|
||||
jndiLocalTemplate = new JndiLookupFactory();
|
||||
}
|
||||
if (jndiOutboundTemplate == null) {
|
||||
jndiOutboundTemplate = new JndiTemplate();
|
||||
jndiOutboundTemplate = new JndiLookupFactory();
|
||||
}
|
||||
if (inboundMessageConvertor == null) {
|
||||
inboundMessageConvertor = new SimpleJmsMessageConvertor();
|
||||
|
@ -210,28 +209,28 @@ public abstract class JmsConnector implements Service {
|
|||
/**
|
||||
* @return Returns the jndiTemplate.
|
||||
*/
|
||||
public JndiTemplate getJndiLocalTemplate() {
|
||||
public JndiLookupFactory getJndiLocalTemplate() {
|
||||
return jndiLocalTemplate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param jndiTemplate The jndiTemplate to set.
|
||||
*/
|
||||
public void setJndiLocalTemplate(JndiTemplate jndiTemplate) {
|
||||
public void setJndiLocalTemplate(JndiLookupFactory jndiTemplate) {
|
||||
this.jndiLocalTemplate = jndiTemplate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the jndiOutboundTemplate.
|
||||
*/
|
||||
public JndiTemplate getJndiOutboundTemplate() {
|
||||
public JndiLookupFactory getJndiOutboundTemplate() {
|
||||
return jndiOutboundTemplate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param jndiOutboundTemplate The jndiOutboundTemplate to set.
|
||||
*/
|
||||
public void setJndiOutboundTemplate(JndiTemplate jndiOutboundTemplate) {
|
||||
public void setJndiOutboundTemplate(JndiLookupFactory jndiOutboundTemplate) {
|
||||
this.jndiOutboundTemplate = jndiOutboundTemplate;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
/**
|
||||
* 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.activemq.network.jms;
|
||||
|
||||
import javax.naming.InitialContext;
|
||||
import javax.naming.NamingException;
|
||||
|
||||
/**
|
||||
* @author <a href="http://hiramchirino.com">Hiram Chirino</a>
|
||||
*/
|
||||
public class JndiLookupFactory {
|
||||
|
||||
public <T> T lookup(String name, Class<T> clazz) throws NamingException {
|
||||
InitialContext ctx = new InitialContext();
|
||||
try {
|
||||
return clazz.cast(ctx.lookup(name));
|
||||
} finally {
|
||||
ctx.close();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -31,12 +31,9 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* A Bridge to other JMS Queue providers
|
||||
*
|
||||
* @org.apache.xbean.XBean
|
||||
*/
|
||||
public class JmsQueueConnector extends JmsConnector {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(JmsQueueConnector.class);
|
||||
public class SimpleJmsQueueConnector extends JmsConnector {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(SimpleJmsQueueConnector.class);
|
||||
private String outboundQueueConnectionFactoryName;
|
||||
private String localConnectionFactoryName;
|
||||
private QueueConnectionFactory outboundQueueConnectionFactory;
|
|
@ -32,11 +32,9 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
/**
|
||||
* A Bridge to other JMS Topic providers
|
||||
*
|
||||
* @org.apache.xbean.XBean
|
||||
*/
|
||||
public class JmsTopicConnector extends JmsConnector {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(JmsTopicConnector.class);
|
||||
public class SimpleJmsTopicConnector extends JmsConnector {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(SimpleJmsTopicConnector.class);
|
||||
private String outboundTopicConnectionFactoryName;
|
||||
private String localConnectionFactoryName;
|
||||
private TopicConnectionFactory outboundTopicConnectionFactory;
|
|
@ -24,30 +24,19 @@ import org.apache.activemq.jaas.GroupPrincipal;
|
|||
import org.apache.activemq.jaas.UserPrincipal;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.DisposableBean;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
|
||||
import javax.naming.Binding;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InvalidNameException;
|
||||
import javax.naming.NamingEnumeration;
|
||||
import javax.naming.NamingException;
|
||||
import javax.naming.*;
|
||||
import javax.naming.directory.*;
|
||||
import javax.naming.event.*;
|
||||
import javax.naming.ldap.LdapName;
|
||||
import javax.naming.ldap.Rdn;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* A {@link DefaultAuthorizationMap} implementation which uses LDAP to initialize and update authorization
|
||||
* policy.
|
||||
*
|
||||
* @org.apache.xbean.XBean
|
||||
*/
|
||||
public class CachedLDAPAuthorizationMap extends DefaultAuthorizationMap implements InitializingBean, DisposableBean {
|
||||
public class SimpleCachedLDAPAuthorizationMap extends DefaultAuthorizationMap {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(CachedLDAPAuthorizationMap.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(SimpleCachedLDAPAuthorizationMap.class);
|
||||
|
||||
// Configuration Options
|
||||
private String initialContextFactory = "com.sun.jndi.ldap.LdapCtxFactory";
|
||||
|
@ -878,13 +867,10 @@ public class CachedLDAPAuthorizationMap extends DefaultAuthorizationMap implemen
|
|||
}
|
||||
|
||||
// Init / Destroy
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
query();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() throws Exception {
|
||||
if (eventContext != null) {
|
||||
eventContext.close();
|
||||
|
@ -1112,7 +1098,7 @@ public class CachedLDAPAuthorizationMap extends DefaultAuthorizationMap implemen
|
|||
|
||||
@Override
|
||||
public void namingExceptionThrown(NamingExceptionEvent evt) {
|
||||
CachedLDAPAuthorizationMap.this.namingExceptionThrown(evt);
|
||||
SimpleCachedLDAPAuthorizationMap.this.namingExceptionThrown(evt);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1120,7 +1106,7 @@ public class CachedLDAPAuthorizationMap extends DefaultAuthorizationMap implemen
|
|||
// This test is a hack to work around the fact that Apache DS 2.0 seems to trigger notifications
|
||||
// for the entire sub-tree even when one-level is the selected search scope.
|
||||
if (permissionType != null) {
|
||||
CachedLDAPAuthorizationMap.this.objectAdded(evt, destinationType, permissionType);
|
||||
SimpleCachedLDAPAuthorizationMap.this.objectAdded(evt, destinationType, permissionType);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1129,13 +1115,13 @@ public class CachedLDAPAuthorizationMap extends DefaultAuthorizationMap implemen
|
|||
// This test is a hack to work around the fact that Apache DS 2.0 seems to trigger notifications
|
||||
// for the entire sub-tree even when one-level is the selected search scope.
|
||||
if (permissionType != null) {
|
||||
CachedLDAPAuthorizationMap.this.objectRemoved(evt, destinationType, permissionType);
|
||||
SimpleCachedLDAPAuthorizationMap.this.objectRemoved(evt, destinationType, permissionType);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void objectRenamed(NamingEvent evt) {
|
||||
CachedLDAPAuthorizationMap.this.objectRenamed(evt, destinationType, permissionType);
|
||||
SimpleCachedLDAPAuthorizationMap.this.objectRenamed(evt, destinationType, permissionType);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1143,7 +1129,7 @@ public class CachedLDAPAuthorizationMap extends DefaultAuthorizationMap implemen
|
|||
// This test is a hack to work around the fact that Apache DS 2.0 seems to trigger notifications
|
||||
// for the entire sub-tree even when one-level is the selected search scope.
|
||||
if (permissionType != null) {
|
||||
CachedLDAPAuthorizationMap.this.objectChanged(evt, destinationType, permissionType);
|
||||
SimpleCachedLDAPAuthorizationMap.this.objectChanged(evt, destinationType, permissionType);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -36,7 +36,7 @@ public class QueueBridgeStandaloneReconnectTest {
|
|||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(QueueBridgeStandaloneReconnectTest.class);
|
||||
|
||||
private JmsQueueConnector jmsQueueConnector;
|
||||
private SimpleJmsQueueConnector jmsQueueConnector;
|
||||
|
||||
private BrokerService localBroker;
|
||||
private BrokerService foreignBroker;
|
||||
|
@ -206,7 +206,7 @@ public class QueueBridgeStandaloneReconnectTest {
|
|||
outbound = new ActiveMQQueue("RECONNECT.TEST.OUT.QUEUE");
|
||||
inbound = new ActiveMQQueue("RECONNECT.TEST.IN.QUEUE");
|
||||
|
||||
jmsQueueConnector = new JmsQueueConnector();
|
||||
jmsQueueConnector = new SimpleJmsQueueConnector();
|
||||
|
||||
// Wire the bridges.
|
||||
jmsQueueConnector.setOutboundQueueBridges(
|
||||
|
|
|
@ -279,7 +279,7 @@ public class QueueOutboundBridgeReconnectTest {
|
|||
broker.addConnector("tcp://localhost:61616");
|
||||
broker.addConnector("vm://broker1");
|
||||
|
||||
JmsQueueConnector jmsQueueConnector = new JmsQueueConnector();
|
||||
SimpleJmsQueueConnector jmsQueueConnector = new SimpleJmsQueueConnector();
|
||||
jmsQueueConnector.setOutboundQueueBridges(
|
||||
new OutboundQueueBridge[] {new OutboundQueueBridge("RECONNECT.TEST.QUEUE")});
|
||||
jmsQueueConnector.setOutboundQueueConnectionFactory(
|
||||
|
|
|
@ -36,7 +36,7 @@ public class TopicBridgeStandaloneReconnectTest {
|
|||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(TopicBridgeStandaloneReconnectTest.class);
|
||||
|
||||
private JmsTopicConnector jmsTopicConnector;
|
||||
private SimpleJmsTopicConnector jmsTopicConnector;
|
||||
|
||||
private BrokerService localBroker;
|
||||
private BrokerService foreignBroker;
|
||||
|
@ -203,7 +203,7 @@ public class TopicBridgeStandaloneReconnectTest {
|
|||
outbound = new ActiveMQTopic("RECONNECT.TEST.OUT.TOPIC");
|
||||
inbound = new ActiveMQTopic("RECONNECT.TEST.IN.TOPIC");
|
||||
|
||||
jmsTopicConnector = new JmsTopicConnector();
|
||||
jmsTopicConnector = new SimpleJmsTopicConnector();
|
||||
|
||||
// Wire the bridges.
|
||||
jmsTopicConnector.setOutboundTopicBridges(
|
||||
|
|
|
@ -268,7 +268,7 @@ public class TopicOutboundBridgeReconnectTest {
|
|||
broker.addConnector("tcp://localhost:61616");
|
||||
broker.addConnector("vm://broker1");
|
||||
|
||||
JmsTopicConnector jmsTopicConnector = new JmsTopicConnector();
|
||||
SimpleJmsTopicConnector jmsTopicConnector = new SimpleJmsTopicConnector();
|
||||
jmsTopicConnector.setOutboundTopicBridges(
|
||||
new OutboundTopicBridge[] {new OutboundTopicBridge("RECONNECT.TEST.TOPIC")});
|
||||
jmsTopicConnector.setOutboundTopicConnectionFactory(
|
||||
|
|
|
@ -57,7 +57,7 @@ public abstract class AbstractCachedLDAPAuthorizationMapLegacyTest extends Abstr
|
|||
static final GroupPrincipal ADMINS = new GroupPrincipal("admins");
|
||||
|
||||
protected LdapConnection connection;
|
||||
protected CachedLDAPAuthorizationMap map;
|
||||
protected SimpleCachedLDAPAuthorizationMap map;
|
||||
|
||||
@Before
|
||||
public void setup() throws Exception {
|
||||
|
@ -334,8 +334,8 @@ public abstract class AbstractCachedLDAPAuthorizationMapLegacyTest extends Abstr
|
|||
assertEquals("set size: " + failedACLs, 2, failedACLs.size());
|
||||
}
|
||||
|
||||
protected CachedLDAPAuthorizationMap createMap() {
|
||||
return new CachedLDAPAuthorizationMap();
|
||||
protected SimpleCachedLDAPAuthorizationMap createMap() {
|
||||
return new SimpleCachedLDAPAuthorizationMap();
|
||||
}
|
||||
|
||||
protected abstract InputStream getAddLdif();
|
||||
|
|
|
@ -54,8 +54,8 @@ public abstract class AbstractCachedLDAPAuthorizationModuleTest
|
|||
protected abstract String getMemberAttributeValueForModifyRequest();
|
||||
|
||||
@Override
|
||||
protected CachedLDAPAuthorizationMap createMap() {
|
||||
CachedLDAPAuthorizationMap map = super.createMap();
|
||||
protected SimpleCachedLDAPAuthorizationMap createMap() {
|
||||
SimpleCachedLDAPAuthorizationMap map = super.createMap();
|
||||
map.setLegacyGroupMapping(false);
|
||||
return map;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.junit.Ignore;
|
|||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Test of the {@link CachedLDAPAuthorizationMap} that tests against a basic OpenLDAP instance.
|
||||
* Test of the {@link SimpleCachedLDAPAuthorizationMap} that tests against a basic OpenLDAP instance.
|
||||
* Disabled by default because it requires external setup to provide the OpenLDAP instance.
|
||||
*
|
||||
* To enable, you need an OpenLDAP with a minimum of the following in the slapd.conf file:
|
||||
|
@ -64,8 +64,8 @@ public class CachedLDAPAuthorizationModuleLegacyOpenLDAPTest extends
|
|||
// Subtree rename not implemented by OpenLDAP.
|
||||
}
|
||||
|
||||
protected CachedLDAPAuthorizationMap createMap() {
|
||||
CachedLDAPAuthorizationMap newMap = super.createMap();
|
||||
protected SimpleCachedLDAPAuthorizationMap createMap() {
|
||||
SimpleCachedLDAPAuthorizationMap newMap = super.createMap();
|
||||
newMap.setConnectionURL("ldap://" + LDAP_HOST + ":" + String.valueOf(LDAP_PORT));
|
||||
newMap.setConnectionUsername(LDAP_USER);
|
||||
newMap.setConnectionPassword(LDAP_PASS);
|
||||
|
|
|
@ -38,8 +38,8 @@ import java.io.InputStream;
|
|||
public class CachedLDAPAuthorizationModuleLegacyTest extends AbstractCachedLDAPAuthorizationMapLegacyTest {
|
||||
|
||||
@Override
|
||||
protected CachedLDAPAuthorizationMap createMap() {
|
||||
CachedLDAPAuthorizationMap map = super.createMap();
|
||||
protected SimpleCachedLDAPAuthorizationMap createMap() {
|
||||
SimpleCachedLDAPAuthorizationMap map = super.createMap();
|
||||
map.setConnectionURL("ldap://localhost:" + getLdapServer().getPort());
|
||||
return map;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ import java.io.IOException;
|
|||
import java.io.InputStream;
|
||||
|
||||
/**
|
||||
* Test of the {@link CachedLDAPAuthorizationMap} that tests against a basic OpenLDAP instance.
|
||||
* Test of the {@link SimpleCachedLDAPAuthorizationMap} that tests against a basic OpenLDAP instance.
|
||||
* Disabled by default because it requires external setup to provide the OpenLDAP instance.
|
||||
*
|
||||
* To enable, you need an OpenLDAP with a minimum of the following in the slapd.conf file:
|
||||
|
@ -64,8 +64,8 @@ public class CachedLDAPAuthorizationModuleOpenLDAPTest extends AbstractCachedLDA
|
|||
}
|
||||
|
||||
@Override
|
||||
protected CachedLDAPAuthorizationMap createMap() {
|
||||
CachedLDAPAuthorizationMap newMap = super.createMap();
|
||||
protected SimpleCachedLDAPAuthorizationMap createMap() {
|
||||
SimpleCachedLDAPAuthorizationMap newMap = super.createMap();
|
||||
newMap.setConnectionURL("ldap://" + LDAP_HOST + ":" + String.valueOf(LDAP_PORT));
|
||||
newMap.setConnectionUsername(LDAP_USER);
|
||||
newMap.setConnectionPassword(LDAP_PASS);
|
||||
|
|
|
@ -36,8 +36,8 @@ import java.io.InputStream;
|
|||
public class CachedLDAPAuthorizationModuleTest extends AbstractCachedLDAPAuthorizationModuleTest {
|
||||
|
||||
@Override
|
||||
protected CachedLDAPAuthorizationMap createMap() {
|
||||
CachedLDAPAuthorizationMap map = super.createMap();
|
||||
protected SimpleCachedLDAPAuthorizationMap createMap() {
|
||||
SimpleCachedLDAPAuthorizationMap map = super.createMap();
|
||||
map.setConnectionURL("ldap://localhost:" + getLdapServer().getPort());
|
||||
return map;
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
|
||||
<!--JmsQueueConnector - the Jms bridge -->
|
||||
<bean id="jmsConnector"
|
||||
class="org.apache.activemq.network.jms.JmsQueueConnector">
|
||||
class="org.apache.activemq.network.jms.SimpleJmsQueueConnector">
|
||||
<property name = "outboundQueueConnectionFactory" ref = "remoteFactory"/>
|
||||
|
||||
<property name = "inboundQueueBridges">
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
|
||||
<!--JmsTopicConnector - the Jms bridge -->
|
||||
<bean id="jmsConnector"
|
||||
class="org.apache.activemq.network.jms.JmsTopicConnector">
|
||||
class="org.apache.activemq.network.jms.SimpleJmsTopicConnector">
|
||||
<property name = "outboundTopicConnectionFactory" ref = "remoteFactory"/>
|
||||
|
||||
<property name = "inboundTopicBridges">
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
|
||||
<!--JmsTopicConnector - the Jms bridge -->
|
||||
<bean id="jmsConnector"
|
||||
class="org.apache.activemq.network.jms.JmsTopicConnector">
|
||||
class="org.apache.activemq.network.jms.SimpleJmsTopicConnector">
|
||||
<property name = "outboundTopicConnectionFactory" ref = "remoteFactory"/>
|
||||
|
||||
<property name = "inboundTopicBridges">
|
||||
|
|
|
@ -38,6 +38,9 @@
|
|||
*
|
||||
</activemq.osgi.import.pkg>
|
||||
<activemq.osgi.export>
|
||||
org.apache.activemq.store*;version=${project.version};-noimport:=;-split-package:=merge-last,
|
||||
org.apache.activemq.security*;version=${project.version};-noimport:=;-split-package:=merge-last,
|
||||
org.apache.activemq.network*;version=${project.version};-noimport:=;-split-package:=merge-last,
|
||||
org.apache.activemq.spring*;version=${project.version};-noimport:=;-split-package:=merge-last,
|
||||
org.apache.activemq.pool*;version=${project.version};-noimport:=;-split-package:=merge-last,
|
||||
org.apache.activemq.xbean*;version=${project.version};-noimport:=true;-split-package:=merge-last,
|
||||
|
@ -54,6 +57,11 @@
|
|||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.xbean</groupId>
|
||||
<artifactId>xbean-spring</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.activemq</groupId>
|
||||
<artifactId>activemq-broker</artifactId>
|
||||
|
@ -134,11 +142,6 @@
|
|||
<artifactId>spring-jms</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.xbean</groupId>
|
||||
<artifactId>xbean-spring</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
/**
|
||||
* 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.activemq.network.jms;
|
||||
|
||||
import org.springframework.jndi.JndiTemplate;
|
||||
|
||||
/**
|
||||
* A Bridge to other JMS Queue providers
|
||||
*
|
||||
* @org.apache.xbean.XBean
|
||||
* @author <a href="http://hiramchirino.com">Hiram Chirino</a>
|
||||
*/
|
||||
public class JmsQueueConnector extends SimpleJmsQueueConnector {
|
||||
public void setJndiLocalTemplate(JndiTemplate template) {
|
||||
super.setJndiLocalTemplate(new JndiTemplateLookupFactory(template));
|
||||
}
|
||||
|
||||
public void setJndiOutboundTemplate(JndiTemplate template) {
|
||||
super.setJndiOutboundTemplate(new JndiTemplateLookupFactory(template));
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
/**
|
||||
* 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.activemq.network.jms;
|
||||
|
||||
import org.springframework.jndi.JndiTemplate;
|
||||
|
||||
/**
|
||||
* A Bridge to other JMS Topic providers
|
||||
*
|
||||
* @org.apache.xbean.XBean
|
||||
* @author <a href="http://hiramchirino.com">Hiram Chirino</a>
|
||||
*/
|
||||
public class JmsTopicConnector extends SimpleJmsTopicConnector {
|
||||
|
||||
public void setJndiLocalTemplate(JndiTemplate template) {
|
||||
super.setJndiLocalTemplate(new JndiTemplateLookupFactory(template));
|
||||
}
|
||||
|
||||
public void setJndiOutboundTemplate(JndiTemplate template) {
|
||||
super.setJndiOutboundTemplate(new JndiTemplateLookupFactory(template));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
/**
|
||||
* 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.activemq.network.jms;
|
||||
|
||||
import org.springframework.jndi.JndiTemplate;
|
||||
|
||||
import javax.naming.NamingException;
|
||||
|
||||
/**
|
||||
* @author <a href="http://hiramchirino.com">Hiram Chirino</a>
|
||||
*/
|
||||
public class JndiTemplateLookupFactory extends JndiLookupFactory {
|
||||
private final JndiTemplate template;
|
||||
|
||||
public JndiTemplateLookupFactory(JndiTemplate template) {
|
||||
this.template = template;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T lookup(String name, Class<T> clazz) throws NamingException {
|
||||
return template.lookup(name, clazz);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package org.apache.activemq.security;
|
||||
|
||||
import org.springframework.beans.factory.DisposableBean;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
|
||||
/**
|
||||
* A {@link DefaultAuthorizationMap} implementation which uses LDAP to initialize and update authorization
|
||||
* policy.
|
||||
*
|
||||
* @org.apache.xbean.XBean
|
||||
*
|
||||
* @author <a href="http://hiramchirino.com">Hiram Chirino</a>
|
||||
*/
|
||||
public class CachedLDAPAuthorizationMap extends SimpleCachedLDAPAuthorizationMap implements InitializingBean, DisposableBean {
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
super.afterPropertiesSet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() throws Exception {
|
||||
super.destroy();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue