You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2006/02/22 00:14:17 UTC
svn commit: r379619 [25/30] - in /incubator/activemq/trunk: ./
activecluster/ activecluster/src/java/org/apache/activecluster/
activecluster/src/java/org/apache/activecluster/election/
activecluster/src/java/org/apache/activecluster/election/impl/ acti...
Modified: incubator/activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/ldap/ServerContextFactory.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/ldap/ServerContextFactory.java?rev=379619&r1=379618&r2=379619&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/ldap/ServerContextFactory.java (original)
+++ incubator/activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/ldap/ServerContextFactory.java Tue Feb 21 15:12:56 2006
@@ -1,200 +1,200 @@
-/**
- *
- * Copyright 2005-2006 The Apache Software Foundation
- *
- * Licensed 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.jaas.ldap;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Properties;
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.naming.directory.DirContext;
-import javax.naming.ldap.Control;
-import javax.naming.ldap.InitialLdapContext;
-import javax.naming.ldap.LdapContext;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.kerberos.protocol.KerberosProtocolProvider;
-import org.apache.kerberos.sam.SamSubsystem;
-import org.apache.kerberos.service.KdcConfiguration;
-import org.apache.kerberos.store.JndiPrincipalStoreImpl;
-import org.apache.kerberos.store.PrincipalStore;
-import org.apache.ldap.common.exception.LdapConfigurationException;
-import org.apache.ldap.common.name.LdapName;
-import org.apache.ldap.common.util.NamespaceTools;
-import org.apache.ldap.common.util.PropertiesUtils;
-import org.apache.ldap.server.jndi.ContextFactoryService;
-import org.apache.ldap.server.jndi.CoreContextFactory;
-import org.apache.ldap.server.protocol.LdapProtocolProvider;
-import org.apache.mina.common.TransportType;
-import org.apache.mina.registry.Service;
-import org.apache.mina.registry.ServiceRegistry;
-
-
-/**
- * Adds additional bootstrapping for server socket listeners when firing
- * up the server.
- *
- * @version $Rev: 233391 $ $Date: 2005-08-18 16:38:47 -0600 (Thu, 18 Aug 2005) $
- * @see javax.naming.spi.InitialContextFactory
- */
-public class ServerContextFactory extends CoreContextFactory {
- private static final Log log = LogFactory.getLog(ServerContextFactory.class);
- private static Service ldapService;
- private static Service kerberosService;
- private static ServiceRegistry minaRegistry;
-
- protected ServiceRegistry getMinaRegistry() {
- return minaRegistry;
- }
-
- public void afterShutdown(ContextFactoryService service) {
- if (minaRegistry != null) {
- if (ldapService != null) {
- minaRegistry.unbind(ldapService);
- if (log.isInfoEnabled()) {
- log.info("Unbind of LDAP Service complete: " + ldapService);
- }
- ldapService = null;
- }
-
- if (kerberosService != null) {
- minaRegistry.unbind(kerberosService);
- if (log.isInfoEnabled()) {
- log.info("Unbind of KRB5 Service complete: " + kerberosService);
- }
- kerberosService = null;
- }
- }
- }
-
- public void afterStartup(ContextFactoryService service) throws NamingException {
- ServerStartupConfiguration cfg =
- (ServerStartupConfiguration) service.getConfiguration().getStartupConfiguration();
- Hashtable env = service.getConfiguration().getEnvironment();
-
- if (cfg.isEnableNetworking()) {
- setupRegistry(cfg);
- startLdapProtocol(cfg, env);
-
- if (cfg.isEnableKerberos()) {
- startKerberosProtocol(env);
- }
- }
- }
-
- /**
- * Starts up the MINA registry so various protocol providers can be started.
- */
- private void setupRegistry(ServerStartupConfiguration cfg) {
- minaRegistry = cfg.getMinaServiceRegistry();
- }
-
-
- /**
- * Starts the Kerberos protocol provider which is backed by the LDAP store.
- *
- * @throws NamingException if there are problems starting up the Kerberos provider
- */
- private void startKerberosProtocol(Hashtable env) throws NamingException {
- /*
- * Looks like KdcConfiguration takes properties and we use Hashtable for JNDI
- * so I'm copying over the String based properties into a new Properties obj.
- */
- Properties props = new Properties();
- Iterator list = env.keySet().iterator();
- while (list.hasNext()) {
- String key = (String) list.next();
-
- if (env.get(key) instanceof String) {
- props.setProperty(key, (String) env.get(key));
- }
- }
-
- // construct the configuration, get the port, create the service, and prepare kdc objects
- KdcConfiguration config = new KdcConfiguration(props);
- int port = PropertiesUtils.get(env, KdcConfiguration.KERBEROS_PORT_KEY, KdcConfiguration.DEFAULT_KERBEROS_PORT);
- Service service = new Service("kerberos", TransportType.DATAGRAM, new InetSocketAddress(port));
- LdapContext ctx = getBaseRealmContext(config, env);
- PrincipalStore store = new JndiPrincipalStoreImpl(ctx, new LdapName("ou=Users"));
- SamSubsystem.getInstance().setUserContext((DirContext) ctx, "ou=Users");
-
- try {
- minaRegistry.bind(service, new KerberosProtocolProvider(config, store));
- kerberosService = service;
- if (log.isInfoEnabled()) {
- log.info("Successful bind of KRB5 Service completed: " + kerberosService);
- }
- }
- catch (IOException e) {
- log.error("Could not start the kerberos service on port " +
- KdcConfiguration.DEFAULT_KERBEROS_PORT, e);
- }
- }
-
-
- /**
- * Maps a Kerberos Realm name to a position within the DIT. The primary realm of
- * the KDC will use this area for configuration and for storing user entries.
- *
- * @param config the KDC's configuration
- * @param env the JNDI environment properties
- * @return the base context for the primary realm of the KDC
- * @throws NamingException
- */
- private LdapContext getBaseRealmContext(KdcConfiguration config, Hashtable env) throws NamingException {
- Hashtable cloned = (Hashtable) env.clone();
- String dn = NamespaceTools.inferLdapName(config.getPrimaryRealm());
- cloned.put(Context.PROVIDER_URL, dn);
-
- if (log.isInfoEnabled()) {
- log.info("Getting initial context for realm base at " + dn + " for " + config.getPrimaryRealm());
- }
-
- return new InitialLdapContext(cloned, new Control[]{});
- }
-
-
- /**
- * Starts up the LDAP protocol provider to service LDAP requests
- *
- * @throws NamingException if there are problems starting the LDAP provider
- */
- private void startLdapProtocol(ServerStartupConfiguration cfg, Hashtable env) throws NamingException {
- int port = cfg.getLdapPort();
- InetAddress host = cfg.getHost();
- Service service = new Service("ldap", TransportType.SOCKET, new InetSocketAddress(host, port));
-
- try {
- minaRegistry.bind(service, new LdapProtocolProvider((Hashtable) env.clone()));
- ldapService = service;
- if (log.isInfoEnabled()) {
- log.info("Successful bind of LDAP Service completed: " + ldapService);
- }
- }
- catch (IOException e) {
- String msg = "Failed to bind the LDAP protocol service to the service registry: " + service;
- LdapConfigurationException lce = new LdapConfigurationException(msg);
- lce.setRootCause(e);
- log.error(msg, e);
- throw lce;
- }
- }
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed 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.jaas.ldap;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Properties;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.naming.directory.DirContext;
+import javax.naming.ldap.Control;
+import javax.naming.ldap.InitialLdapContext;
+import javax.naming.ldap.LdapContext;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.kerberos.protocol.KerberosProtocolProvider;
+import org.apache.kerberos.sam.SamSubsystem;
+import org.apache.kerberos.service.KdcConfiguration;
+import org.apache.kerberos.store.JndiPrincipalStoreImpl;
+import org.apache.kerberos.store.PrincipalStore;
+import org.apache.ldap.common.exception.LdapConfigurationException;
+import org.apache.ldap.common.name.LdapName;
+import org.apache.ldap.common.util.NamespaceTools;
+import org.apache.ldap.common.util.PropertiesUtils;
+import org.apache.ldap.server.jndi.ContextFactoryService;
+import org.apache.ldap.server.jndi.CoreContextFactory;
+import org.apache.ldap.server.protocol.LdapProtocolProvider;
+import org.apache.mina.common.TransportType;
+import org.apache.mina.registry.Service;
+import org.apache.mina.registry.ServiceRegistry;
+
+
+/**
+ * Adds additional bootstrapping for server socket listeners when firing
+ * up the server.
+ *
+ * @version $Rev: 233391 $ $Date: 2005-08-18 16:38:47 -0600 (Thu, 18 Aug 2005) $
+ * @see javax.naming.spi.InitialContextFactory
+ */
+public class ServerContextFactory extends CoreContextFactory {
+ private static final Log log = LogFactory.getLog(ServerContextFactory.class);
+ private static Service ldapService;
+ private static Service kerberosService;
+ private static ServiceRegistry minaRegistry;
+
+ protected ServiceRegistry getMinaRegistry() {
+ return minaRegistry;
+ }
+
+ public void afterShutdown(ContextFactoryService service) {
+ if (minaRegistry != null) {
+ if (ldapService != null) {
+ minaRegistry.unbind(ldapService);
+ if (log.isInfoEnabled()) {
+ log.info("Unbind of LDAP Service complete: " + ldapService);
+ }
+ ldapService = null;
+ }
+
+ if (kerberosService != null) {
+ minaRegistry.unbind(kerberosService);
+ if (log.isInfoEnabled()) {
+ log.info("Unbind of KRB5 Service complete: " + kerberosService);
+ }
+ kerberosService = null;
+ }
+ }
+ }
+
+ public void afterStartup(ContextFactoryService service) throws NamingException {
+ ServerStartupConfiguration cfg =
+ (ServerStartupConfiguration) service.getConfiguration().getStartupConfiguration();
+ Hashtable env = service.getConfiguration().getEnvironment();
+
+ if (cfg.isEnableNetworking()) {
+ setupRegistry(cfg);
+ startLdapProtocol(cfg, env);
+
+ if (cfg.isEnableKerberos()) {
+ startKerberosProtocol(env);
+ }
+ }
+ }
+
+ /**
+ * Starts up the MINA registry so various protocol providers can be started.
+ */
+ private void setupRegistry(ServerStartupConfiguration cfg) {
+ minaRegistry = cfg.getMinaServiceRegistry();
+ }
+
+
+ /**
+ * Starts the Kerberos protocol provider which is backed by the LDAP store.
+ *
+ * @throws NamingException if there are problems starting up the Kerberos provider
+ */
+ private void startKerberosProtocol(Hashtable env) throws NamingException {
+ /*
+ * Looks like KdcConfiguration takes properties and we use Hashtable for JNDI
+ * so I'm copying over the String based properties into a new Properties obj.
+ */
+ Properties props = new Properties();
+ Iterator list = env.keySet().iterator();
+ while (list.hasNext()) {
+ String key = (String) list.next();
+
+ if (env.get(key) instanceof String) {
+ props.setProperty(key, (String) env.get(key));
+ }
+ }
+
+ // construct the configuration, get the port, create the service, and prepare kdc objects
+ KdcConfiguration config = new KdcConfiguration(props);
+ int port = PropertiesUtils.get(env, KdcConfiguration.KERBEROS_PORT_KEY, KdcConfiguration.DEFAULT_KERBEROS_PORT);
+ Service service = new Service("kerberos", TransportType.DATAGRAM, new InetSocketAddress(port));
+ LdapContext ctx = getBaseRealmContext(config, env);
+ PrincipalStore store = new JndiPrincipalStoreImpl(ctx, new LdapName("ou=Users"));
+ SamSubsystem.getInstance().setUserContext((DirContext) ctx, "ou=Users");
+
+ try {
+ minaRegistry.bind(service, new KerberosProtocolProvider(config, store));
+ kerberosService = service;
+ if (log.isInfoEnabled()) {
+ log.info("Successful bind of KRB5 Service completed: " + kerberosService);
+ }
+ }
+ catch (IOException e) {
+ log.error("Could not start the kerberos service on port " +
+ KdcConfiguration.DEFAULT_KERBEROS_PORT, e);
+ }
+ }
+
+
+ /**
+ * Maps a Kerberos Realm name to a position within the DIT. The primary realm of
+ * the KDC will use this area for configuration and for storing user entries.
+ *
+ * @param config the KDC's configuration
+ * @param env the JNDI environment properties
+ * @return the base context for the primary realm of the KDC
+ * @throws NamingException
+ */
+ private LdapContext getBaseRealmContext(KdcConfiguration config, Hashtable env) throws NamingException {
+ Hashtable cloned = (Hashtable) env.clone();
+ String dn = NamespaceTools.inferLdapName(config.getPrimaryRealm());
+ cloned.put(Context.PROVIDER_URL, dn);
+
+ if (log.isInfoEnabled()) {
+ log.info("Getting initial context for realm base at " + dn + " for " + config.getPrimaryRealm());
+ }
+
+ return new InitialLdapContext(cloned, new Control[]{});
+ }
+
+
+ /**
+ * Starts up the LDAP protocol provider to service LDAP requests
+ *
+ * @throws NamingException if there are problems starting the LDAP provider
+ */
+ private void startLdapProtocol(ServerStartupConfiguration cfg, Hashtable env) throws NamingException {
+ int port = cfg.getLdapPort();
+ InetAddress host = cfg.getHost();
+ Service service = new Service("ldap", TransportType.SOCKET, new InetSocketAddress(host, port));
+
+ try {
+ minaRegistry.bind(service, new LdapProtocolProvider((Hashtable) env.clone()));
+ ldapService = service;
+ if (log.isInfoEnabled()) {
+ log.info("Successful bind of LDAP Service completed: " + ldapService);
+ }
+ }
+ catch (IOException e) {
+ String msg = "Failed to bind the LDAP protocol service to the service registry: " + service;
+ LdapConfigurationException lce = new LdapConfigurationException(msg);
+ lce.setRootCause(e);
+ log.error(msg, e);
+ throw lce;
+ }
+ }
}
Propchange: incubator/activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/ldap/ServerContextFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/ldap/ServerStartupConfiguration.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/ldap/ServerStartupConfiguration.java?rev=379619&r1=379618&r2=379619&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/ldap/ServerStartupConfiguration.java (original)
+++ incubator/activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/ldap/ServerStartupConfiguration.java Tue Feb 21 15:12:56 2006
@@ -1,126 +1,126 @@
-/**
- *
- * Copyright 2005-2006 The Apache Software Foundation
- *
- * Licensed 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.jaas.ldap;
-
-import java.net.InetAddress;
-
-import org.apache.ldap.server.configuration.ConfigurationException;
-import org.apache.ldap.server.configuration.StartupConfiguration;
-import org.apache.mina.registry.ServiceRegistry;
-import org.apache.mina.registry.SimpleServiceRegistry;
-
-/**
- * A {@link StartupConfiguration} that starts up ApacheDS with network layer support.
- *
- * @version $Rev: 233391 $ $Date: 2005-08-18 16:38:47 -0600 (Thu, 18 Aug 2005) $
- */
-public class ServerStartupConfiguration extends StartupConfiguration {
- private static final long serialVersionUID = -7138616822614155454L;
-
- private boolean enableNetworking = true;
- private ServiceRegistry minaServiceRegistry = new SimpleServiceRegistry();
- private int ldapPort = 389;
- private int ldapsPort = 636;
- private InetAddress host = null;
- private boolean enableKerberos;
-
- protected ServerStartupConfiguration() {
- }
-
- protected InetAddress getHost() {
- return host;
- }
-
- protected void setHost(InetAddress host) {
- this.host = host;
- }
-
- /**
- * Returns <tt>true</tt> if networking (LDAP, LDAPS, and Kerberos) is enabled.
- */
- public boolean isEnableNetworking() {
- return enableNetworking;
- }
-
- /**
- * Sets whether to enable networking (LDAP, LDAPS, and Kerberos) or not.
- */
- public void setEnableNetworking(boolean enableNetworking) {
- this.enableNetworking = enableNetworking;
- }
-
- /**
- * Returns <tt>true</tt> if Kerberos support is enabled.
- */
- public boolean isEnableKerberos() {
- return enableKerberos;
- }
-
- /**
- * Sets whether to enable Kerberos support or not.
- */
- protected void setEnableKerberos(boolean enableKerberos) {
- this.enableKerberos = enableKerberos;
- }
-
- /**
- * Returns LDAP TCP/IP port number to listen to.
- */
- public int getLdapPort() {
- return ldapPort;
- }
-
- /**
- * Sets LDAP TCP/IP port number to listen to.
- */
- protected void setLdapPort(int ldapPort) {
- this.ldapPort = ldapPort;
- }
-
- /**
- * Returns LDAPS TCP/IP port number to listen to.
- */
- public int getLdapsPort() {
- return ldapsPort;
- }
-
- /**
- * Sets LDAPS TCP/IP port number to listen to.
- */
- protected void setLdapsPort(int ldapsPort) {
- this.ldapsPort = ldapsPort;
- }
-
- /**
- * Returns <a href="http://directory.apache.org/subprojects/network/">MINA</a>
- * {@link ServiceRegistry} that will be used by ApacheDS.
- */
- public ServiceRegistry getMinaServiceRegistry() {
- return minaServiceRegistry;
- }
-
- /**
- * Sets <a href="http://directory.apache.org/subprojects/network/">MINA</a>
- * {@link ServiceRegistry} that will be used by ApacheDS.
- */
- protected void setMinaServiceRegistry(ServiceRegistry minaServiceRegistry) {
- if (minaServiceRegistry == null) {
- throw new ConfigurationException("MinaServiceRegistry cannot be null");
- }
- this.minaServiceRegistry = minaServiceRegistry;
- }
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed 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.jaas.ldap;
+
+import java.net.InetAddress;
+
+import org.apache.ldap.server.configuration.ConfigurationException;
+import org.apache.ldap.server.configuration.StartupConfiguration;
+import org.apache.mina.registry.ServiceRegistry;
+import org.apache.mina.registry.SimpleServiceRegistry;
+
+/**
+ * A {@link StartupConfiguration} that starts up ApacheDS with network layer support.
+ *
+ * @version $Rev: 233391 $ $Date: 2005-08-18 16:38:47 -0600 (Thu, 18 Aug 2005) $
+ */
+public class ServerStartupConfiguration extends StartupConfiguration {
+ private static final long serialVersionUID = -7138616822614155454L;
+
+ private boolean enableNetworking = true;
+ private ServiceRegistry minaServiceRegistry = new SimpleServiceRegistry();
+ private int ldapPort = 389;
+ private int ldapsPort = 636;
+ private InetAddress host = null;
+ private boolean enableKerberos;
+
+ protected ServerStartupConfiguration() {
+ }
+
+ protected InetAddress getHost() {
+ return host;
+ }
+
+ protected void setHost(InetAddress host) {
+ this.host = host;
+ }
+
+ /**
+ * Returns <tt>true</tt> if networking (LDAP, LDAPS, and Kerberos) is enabled.
+ */
+ public boolean isEnableNetworking() {
+ return enableNetworking;
+ }
+
+ /**
+ * Sets whether to enable networking (LDAP, LDAPS, and Kerberos) or not.
+ */
+ public void setEnableNetworking(boolean enableNetworking) {
+ this.enableNetworking = enableNetworking;
+ }
+
+ /**
+ * Returns <tt>true</tt> if Kerberos support is enabled.
+ */
+ public boolean isEnableKerberos() {
+ return enableKerberos;
+ }
+
+ /**
+ * Sets whether to enable Kerberos support or not.
+ */
+ protected void setEnableKerberos(boolean enableKerberos) {
+ this.enableKerberos = enableKerberos;
+ }
+
+ /**
+ * Returns LDAP TCP/IP port number to listen to.
+ */
+ public int getLdapPort() {
+ return ldapPort;
+ }
+
+ /**
+ * Sets LDAP TCP/IP port number to listen to.
+ */
+ protected void setLdapPort(int ldapPort) {
+ this.ldapPort = ldapPort;
+ }
+
+ /**
+ * Returns LDAPS TCP/IP port number to listen to.
+ */
+ public int getLdapsPort() {
+ return ldapsPort;
+ }
+
+ /**
+ * Sets LDAPS TCP/IP port number to listen to.
+ */
+ protected void setLdapsPort(int ldapsPort) {
+ this.ldapsPort = ldapsPort;
+ }
+
+ /**
+ * Returns <a href="http://directory.apache.org/subprojects/network/">MINA</a>
+ * {@link ServiceRegistry} that will be used by ApacheDS.
+ */
+ public ServiceRegistry getMinaServiceRegistry() {
+ return minaServiceRegistry;
+ }
+
+ /**
+ * Sets <a href="http://directory.apache.org/subprojects/network/">MINA</a>
+ * {@link ServiceRegistry} that will be used by ApacheDS.
+ */
+ protected void setMinaServiceRegistry(ServiceRegistry minaServiceRegistry) {
+ if (minaServiceRegistry == null) {
+ throw new ConfigurationException("MinaServiceRegistry cannot be null");
+ }
+ this.minaServiceRegistry = minaServiceRegistry;
+ }
}
Propchange: incubator/activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/ldap/ServerStartupConfiguration.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/axis/ActiveMQVendorAdapter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/BenchmarkSupport.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/Consumer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/Producer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/ProducerConsumer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/AcidTestTool.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/ConsumerTool.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/JndiProducerTool.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/ProducerTool.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/ToolSupport.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/WebServer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/BlockingQueueTransport.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpEmbeddedTunnelServlet.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransport.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportServer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportSupport.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTunnelServlet.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransport.java?rev=379619&r1=379618&r2=379619&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransport.java (original)
+++ incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransport.java Tue Feb 21 15:12:56 2006
@@ -1,54 +1,54 @@
-/**
- *
- * Copyright 2005-2006 The Apache Software Foundation
- *
- * Licensed 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.transport.https;
-
-import org.apache.activemq.transport.http.HttpTransport;
-import org.apache.activemq.transport.util.TextWireFormat;
-
-import javax.net.ssl.HttpsURLConnection;
-
-import java.io.IOException;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.URI;
-
-public class HttpsTransport extends HttpTransport {
-
- public HttpsTransport(TextWireFormat wireFormat, URI remoteUrl) throws MalformedURLException {
- super(wireFormat, remoteUrl);
- }
-
- protected synchronized HttpURLConnection createSendConnection() throws IOException {
- HttpsURLConnection conn = (HttpsURLConnection) getRemoteURL().openConnection();
- conn.setDoOutput(true);
- conn.setRequestMethod("POST");
- configureConnection(conn);
- conn.connect();
- return conn;
- }
-
- protected synchronized HttpURLConnection createReceiveConnection() throws IOException {
- HttpsURLConnection conn = (HttpsURLConnection) getRemoteURL().openConnection();
- conn.setDoOutput(false);
- conn.setDoInput(true);
- conn.setRequestMethod("GET");
- configureConnection(conn);
- conn.connect();
- return conn;
- }
-
-}
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed 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.transport.https;
+
+import org.apache.activemq.transport.http.HttpTransport;
+import org.apache.activemq.transport.util.TextWireFormat;
+
+import javax.net.ssl.HttpsURLConnection;
+
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URI;
+
+public class HttpsTransport extends HttpTransport {
+
+ public HttpsTransport(TextWireFormat wireFormat, URI remoteUrl) throws MalformedURLException {
+ super(wireFormat, remoteUrl);
+ }
+
+ protected synchronized HttpURLConnection createSendConnection() throws IOException {
+ HttpsURLConnection conn = (HttpsURLConnection) getRemoteURL().openConnection();
+ conn.setDoOutput(true);
+ conn.setRequestMethod("POST");
+ configureConnection(conn);
+ conn.connect();
+ return conn;
+ }
+
+ protected synchronized HttpURLConnection createReceiveConnection() throws IOException {
+ HttpsURLConnection conn = (HttpsURLConnection) getRemoteURL().openConnection();
+ conn.setDoOutput(false);
+ conn.setDoInput(true);
+ conn.setRequestMethod("GET");
+ configureConnection(conn);
+ conn.connect();
+ return conn;
+ }
+
+}
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransport.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransportFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransportServer.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransportServer.java?rev=379619&r1=379618&r2=379619&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransportServer.java (original)
+++ incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransportServer.java Tue Feb 21 15:12:56 2006
@@ -1,112 +1,112 @@
-/**
- *
- * Copyright 2005-2006 The Apache Software Foundation
- *
- * Licensed 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.transport.https;
-
-import org.apache.activemq.transport.http.HttpTransportServer;
-import org.mortbay.jetty.security.SslSocketConnector;
-
-import java.net.URI;
-
-public class HttpsTransportServer extends HttpTransportServer {
-
- private String keyPassword = System.getProperty( "javax.net.ssl.keyPassword" );
- private String keyStorePassword = System.getProperty( "javax.net.ssl.keyStorePassword" );
- private String keyStore = System.getProperty( "javax.net.ssl.keyStore" );
- private String keyStoreType = null;
- private String certificateAlgorithm = null;
- private String protocol = null;
-
- public HttpsTransportServer( URI uri ) {
- super( uri );
- }
-
- public void start() throws Exception {
- SslSocketConnector sslConnector = new SslSocketConnector();
- sslConnector.setKeystore( keyStore );
- sslConnector.setPassword( keyStorePassword );
- // if the keyPassword hasn't been set, default it to the
- // key store password
- if ( keyPassword == null ) {
- sslConnector.setKeyPassword( keyStorePassword );
- }
- if ( keyStoreType != null ) {
- sslConnector.setKeystoreType( keyStoreType );
- }
- if ( certificateAlgorithm != null ) {
- sslConnector.setAlgorithm( certificateAlgorithm );
- }
- if ( protocol != null ) {
- sslConnector.setProtocol( protocol );
- }
-
- setConnector(sslConnector);
-
- super.start();
- }
-
- // Properties
- //--------------------------------------------------------------------------------
-
- public String getCertificateAlgorithm() {
- return certificateAlgorithm;
- }
-
- public void setCertificateAlgorithm( String certificateAlgorithm ) {
- this.certificateAlgorithm = certificateAlgorithm;
- }
-
- public String getKeyStore() {
- return keyStore;
- }
-
- public void setKeyStore( String keyStore ) {
- this.keyStore = keyStore;
- }
-
- public String getKeyPassword() {
- return keyPassword;
- }
-
- public void setKeyPassword( String keyPassword ) {
- this.keyPassword = keyPassword;
- }
-
- public String getKeyStoreType() {
- return keyStoreType;
- }
-
- public void setKeyStoreType( String keyStoreType ) {
- this.keyStoreType = keyStoreType;
- }
-
- public String getKeyStorePassword() {
- return keyStorePassword;
- }
-
- public void setKeyStorePassword( String keyStorePassword ) {
- this.keyStorePassword = keyStorePassword;
- }
-
- public String getProtocol() {
- return protocol;
- }
-
- public void setProtocol( String protocol ) {
- this.protocol = protocol;
- }
-
-}
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed 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.transport.https;
+
+import org.apache.activemq.transport.http.HttpTransportServer;
+import org.mortbay.jetty.security.SslSocketConnector;
+
+import java.net.URI;
+
+public class HttpsTransportServer extends HttpTransportServer {
+
+ private String keyPassword = System.getProperty( "javax.net.ssl.keyPassword" );
+ private String keyStorePassword = System.getProperty( "javax.net.ssl.keyStorePassword" );
+ private String keyStore = System.getProperty( "javax.net.ssl.keyStore" );
+ private String keyStoreType = null;
+ private String certificateAlgorithm = null;
+ private String protocol = null;
+
+ public HttpsTransportServer( URI uri ) {
+ super( uri );
+ }
+
+ public void start() throws Exception {
+ SslSocketConnector sslConnector = new SslSocketConnector();
+ sslConnector.setKeystore( keyStore );
+ sslConnector.setPassword( keyStorePassword );
+ // if the keyPassword hasn't been set, default it to the
+ // key store password
+ if ( keyPassword == null ) {
+ sslConnector.setKeyPassword( keyStorePassword );
+ }
+ if ( keyStoreType != null ) {
+ sslConnector.setKeystoreType( keyStoreType );
+ }
+ if ( certificateAlgorithm != null ) {
+ sslConnector.setAlgorithm( certificateAlgorithm );
+ }
+ if ( protocol != null ) {
+ sslConnector.setProtocol( protocol );
+ }
+
+ setConnector(sslConnector);
+
+ super.start();
+ }
+
+ // Properties
+ //--------------------------------------------------------------------------------
+
+ public String getCertificateAlgorithm() {
+ return certificateAlgorithm;
+ }
+
+ public void setCertificateAlgorithm( String certificateAlgorithm ) {
+ this.certificateAlgorithm = certificateAlgorithm;
+ }
+
+ public String getKeyStore() {
+ return keyStore;
+ }
+
+ public void setKeyStore( String keyStore ) {
+ this.keyStore = keyStore;
+ }
+
+ public String getKeyPassword() {
+ return keyPassword;
+ }
+
+ public void setKeyPassword( String keyPassword ) {
+ this.keyPassword = keyPassword;
+ }
+
+ public String getKeyStoreType() {
+ return keyStoreType;
+ }
+
+ public void setKeyStoreType( String keyStoreType ) {
+ this.keyStoreType = keyStoreType;
+ }
+
+ public String getKeyStorePassword() {
+ return keyStorePassword;
+ }
+
+ public void setKeyStorePassword( String keyStorePassword ) {
+ this.keyStorePassword = keyStorePassword;
+ }
+
+ public String getProtocol() {
+ return protocol;
+ }
+
+ public void setProtocol( String protocol ) {
+ this.protocol = protocol;
+ }
+
+}
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransportServer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/ssl/SslTransportFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/util/TextWireFormat.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/xstream/XStreamWireFormat.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/xstream/XStreamWireFormatFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpJmsSendAndReceiveTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpTransportBrokerTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/ssl/SslTransportBrokerTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/xstream/XStreamWireFormatTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionRequestInfo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointActivationKey.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointWorker.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQResourceAdapter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundConnectionProxy.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundConnectionProxyFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundContext.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundContextSupport.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundMessageProducerProxy.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundSessionProxy.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InvalidMessageEndpointException.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/LocalAndXATransaction.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ManagedConnectionProxy.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ManagedSessionProxy.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ManagedTransactionContext.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/MessageEndpointProxy.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionPoolImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/SimpleConnectionManager.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ActiveMQActivationSpecTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ActiveMQAsfEndpointWorkerTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ActiveMQResourceAdapterJavaBeanEqualityTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ConnectionEventListenerAdapter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ConnectionManagerAdapter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/MDBTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ManagedConnectionFactoryTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ManagedConnectionTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/MessageEndpointProxyTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ServerSessionImplTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/Agent.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/AgentStopper.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/AgentSupport.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/BrokerAgent.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/ClientAgent.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/ConsumerAgent.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/DestinationFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/MessageList.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/ProducerAgent.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/QueueOnlyScenario.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/Scenario.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/ScenarioSupport.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/ScenarioTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/ScenarioTestSuite.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/TopicOnlyScenario.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/AgentMessageListener.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/BrokerAgentImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/ConsumerAgentImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/DestinationFactoryImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/DiscoveryBrokerAgentImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/JmsClientSupport.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/MessageListImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/ProducerAgentImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/RandomMessageListImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/SeparateBrokerProcessAgentImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/SeparateProcessAgent.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/task/ScenarioJClassStub.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/task/SystemTestGenerator.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/task/SystemTestTask.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/usecase/network/ProducerConsumerScenarioSupport.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/usecase/network/SingleBrokerScenario.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/usecase/network/TwoBrokerFailoverScenario.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/usecase/network/TwoBrokerNetworkConnectedBeforeStartScenario.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/usecase/network/TwoBrokerNetworkScenario.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-web/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/ConnectionManager.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageListenerServlet.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageServlet.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageServletSupport.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/NoDestinationSuppliedException.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/PortfolioPublishServlet.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/SessionFilter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/SpringBrokerContextListener.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-web/src/test/java/org/apache/activemq/web/JettyServer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/release/example/src/ConsumerTool.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/release/example/src/ProducerAndConsumerTool.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/release/example/src/ProducerTool.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/release/example/src/ToolSupport.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/benchmark/BenchmarkSupport.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/benchmark/Consumer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/benchmark/Producer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/benchmark/ProducerConsumer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigFromJNDITest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/config/ConfigTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/transport/QueueClusterTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/transport/TopicClusterTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/ChangeSentMessageTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/ChangeSessionDeliveryModeTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/CompositeConsumeTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/CompositePublishTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/ConsumeQueuePrefetchTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/ConsumeTopicPrefetchTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/CreateLotsOfTemporaryQueuesTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/CreateTemporaryQueueBeforeStartTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/DurableSubscriptionTestSupport.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/ExceptionListenerTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/JDBCDurableSubscriptionTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/JournalDurableSubscriptionTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsUsingTcpTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/ProducerConsumerTestSupport.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/PublishOnDurableTopicConsumedMessageTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java?rev=379619&r1=379618&r2=379619&view=diff
==============================================================================
--- incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java (original)
+++ incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java Tue Feb 21 15:12:56 2006
@@ -1,180 +1,180 @@
-/**
- *
- * Copyright 2005-2006 The Apache Software Foundation
- *
- * Licensed 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.usecases;
-
-import junit.framework.TestCase;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.command.ActiveMQQueue;
-
-import javax.jms.*;
-import java.util.List;
-import java.util.Collections;
-import java.util.ArrayList;
-import java.io.File;
-
-
-public final class PublishOnQueueConsumedMessageInTransactionTest extends TestCase implements MessageListener {
-
- private Session producerSession;
- private Session consumerSession;
- private Destination queue;
- private ActiveMQConnectionFactory factory;
- private MessageProducer producer;
- private MessageConsumer consumer;
- private Connection connection;
- private ObjectMessage objectMessage = null;
- private List messages = createConcurrentList();
- private final Object lock = new Object();
- private String[] data;
- private String DATAFILE_ROOT = "activemq-data";
- private int messageCount = 3;
- private String url = "vm://localhost";
-
- // Invalid acknowledgment warning can be viewed on the console of a remote broker
- // The warning message is not thrown back to the client
- //private String url = "tcp://localhost:61616";
-
-
- protected void setUp() throws Exception {
- File dataFile = new File(DATAFILE_ROOT);
- recursiveDelete(dataFile);
- try {
- factory = new ActiveMQConnectionFactory(url);
- connection = factory.createConnection();
- producerSession = connection.createSession(true, Session.SESSION_TRANSACTED);
- consumerSession = connection.createSession(true, Session.SESSION_TRANSACTED);
- queue = new ActiveMQQueue("FOO.BAR");
- data = new String[messageCount];
-
- for (int i = 0; i < messageCount; i++) {
- data[i] = "Message : " + i;
- }
- } catch (JMSException je) {
- fail("Error setting up connection : " + je.toString());
- }
- }
-
-
- public void testSendReceive() throws Exception {
- sendMessage();
-
- connection.start();
- consumer = consumerSession.createConsumer(queue);
- consumer.setMessageListener(this);
- waitForMessagesToBeDelivered();
- assertEquals("Messages received doesn't equal messages sent", messages.size(),data.length);
-
- }
-
-
- protected void sendMessage() throws JMSException {
- messages.clear();
- try {
- for (int i = 0; i < data.length; ++i) {
- producer = producerSession.createProducer(queue);
- objectMessage = producerSession.createObjectMessage(data[i]);
- producer.send(objectMessage);
- producerSession.commit();
- System.out.println("sending message :" + objectMessage);
- }
- } catch (Exception e) {
- if (producerSession != null) {
- producerSession.rollback();
- System.out.println("rollback");
- producerSession.close();
- }
-
- e.printStackTrace();
- }
- }
-
-
- public synchronized void onMessage(Message m) {
- try {
- objectMessage = (ObjectMessage) m;
- consumeMessage(objectMessage,messages);
-
- System.out.println("consumer received message :" + objectMessage);
- consumerSession.commit();
-
- } catch (Exception e) {
- try {
- consumerSession.rollback();
- System.out.println("rolled back transaction");
- } catch (JMSException e1) {
- System.out.println(e1);
- e1.printStackTrace();
- }
- System.out.println(e);
- e.printStackTrace();
- }
- }
-
-
- protected void consumeMessage(Message message, List messageList) {
- messageList.add(message);
- if (messageList.size() >= data.length) {
- synchronized (lock) {
- lock.notifyAll();
- }
- }
-
- }
-
-
- protected List createConcurrentList() {
- return Collections.synchronizedList(new ArrayList());
- }
-
-
- protected void waitForMessagesToBeDelivered() {
- long maxWaitTime = 5000;
- long waitTime = maxWaitTime;
- long start = (maxWaitTime <= 0) ? 0 : System.currentTimeMillis();
-
- synchronized (lock) {
- while (messages.size() <= data.length && waitTime >= 0) {
- try {
- lock.wait(200);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
-
- waitTime = maxWaitTime - (System.currentTimeMillis() - start);
- }
- }
- }
-
-
- protected static void recursiveDelete(File file) {
- if( file.isDirectory() ) {
- File[] files = file.listFiles();
- for (int i = 0; i < files.length; i++) {
- recursiveDelete(files[i]);
- }
- }
- file.delete();
- }
-
- protected void tearDown() throws Exception {
- if (connection != null) {
- connection.close();
- }
-
- super.tearDown();
- }
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed 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.usecases;
+
+import junit.framework.TestCase;
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.command.ActiveMQQueue;
+
+import javax.jms.*;
+import java.util.List;
+import java.util.Collections;
+import java.util.ArrayList;
+import java.io.File;
+
+
+public final class PublishOnQueueConsumedMessageInTransactionTest extends TestCase implements MessageListener {
+
+ private Session producerSession;
+ private Session consumerSession;
+ private Destination queue;
+ private ActiveMQConnectionFactory factory;
+ private MessageProducer producer;
+ private MessageConsumer consumer;
+ private Connection connection;
+ private ObjectMessage objectMessage = null;
+ private List messages = createConcurrentList();
+ private final Object lock = new Object();
+ private String[] data;
+ private String DATAFILE_ROOT = "activemq-data";
+ private int messageCount = 3;
+ private String url = "vm://localhost";
+
+ // Invalid acknowledgment warning can be viewed on the console of a remote broker
+ // The warning message is not thrown back to the client
+ //private String url = "tcp://localhost:61616";
+
+
+ protected void setUp() throws Exception {
+ File dataFile = new File(DATAFILE_ROOT);
+ recursiveDelete(dataFile);
+ try {
+ factory = new ActiveMQConnectionFactory(url);
+ connection = factory.createConnection();
+ producerSession = connection.createSession(true, Session.SESSION_TRANSACTED);
+ consumerSession = connection.createSession(true, Session.SESSION_TRANSACTED);
+ queue = new ActiveMQQueue("FOO.BAR");
+ data = new String[messageCount];
+
+ for (int i = 0; i < messageCount; i++) {
+ data[i] = "Message : " + i;
+ }
+ } catch (JMSException je) {
+ fail("Error setting up connection : " + je.toString());
+ }
+ }
+
+
+ public void testSendReceive() throws Exception {
+ sendMessage();
+
+ connection.start();
+ consumer = consumerSession.createConsumer(queue);
+ consumer.setMessageListener(this);
+ waitForMessagesToBeDelivered();
+ assertEquals("Messages received doesn't equal messages sent", messages.size(),data.length);
+
+ }
+
+
+ protected void sendMessage() throws JMSException {
+ messages.clear();
+ try {
+ for (int i = 0; i < data.length; ++i) {
+ producer = producerSession.createProducer(queue);
+ objectMessage = producerSession.createObjectMessage(data[i]);
+ producer.send(objectMessage);
+ producerSession.commit();
+ System.out.println("sending message :" + objectMessage);
+ }
+ } catch (Exception e) {
+ if (producerSession != null) {
+ producerSession.rollback();
+ System.out.println("rollback");
+ producerSession.close();
+ }
+
+ e.printStackTrace();
+ }
+ }
+
+
+ public synchronized void onMessage(Message m) {
+ try {
+ objectMessage = (ObjectMessage) m;
+ consumeMessage(objectMessage,messages);
+
+ System.out.println("consumer received message :" + objectMessage);
+ consumerSession.commit();
+
+ } catch (Exception e) {
+ try {
+ consumerSession.rollback();
+ System.out.println("rolled back transaction");
+ } catch (JMSException e1) {
+ System.out.println(e1);
+ e1.printStackTrace();
+ }
+ System.out.println(e);
+ e.printStackTrace();
+ }
+ }
+
+
+ protected void consumeMessage(Message message, List messageList) {
+ messageList.add(message);
+ if (messageList.size() >= data.length) {
+ synchronized (lock) {
+ lock.notifyAll();
+ }
+ }
+
+ }
+
+
+ protected List createConcurrentList() {
+ return Collections.synchronizedList(new ArrayList());
+ }
+
+
+ protected void waitForMessagesToBeDelivered() {
+ long maxWaitTime = 5000;
+ long waitTime = maxWaitTime;
+ long start = (maxWaitTime <= 0) ? 0 : System.currentTimeMillis();
+
+ synchronized (lock) {
+ while (messages.size() <= data.length && waitTime >= 0) {
+ try {
+ lock.wait(200);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+
+ waitTime = maxWaitTime - (System.currentTimeMillis() - start);
+ }
+ }
+ }
+
+
+ protected static void recursiveDelete(File file) {
+ if( file.isDirectory() ) {
+ File[] files = file.listFiles();
+ for (int i = 0; i < files.length; i++) {
+ recursiveDelete(files[i]);
+ }
+ }
+ file.delete();
+ }
+
+ protected void tearDown() throws Exception {
+ if (connection != null) {
+ connection.close();
+ }
+
+ super.tearDown();
+ }
}
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/assembly/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageTest.java
------------------------------------------------------------------------------
svn:eol-style = native