This closes #64 - removing deprecated items
This commit is contained in:
commit
9e673280bc
|
@ -216,12 +216,6 @@ public final class ActiveMQDefaultConfiguration
|
|||
// true means that ID's are persisted to the journal
|
||||
private static boolean DEFAULT_PERSIST_ID_CACHE = true;
|
||||
|
||||
// DEPRECATED. This option is deprecated, but it will still be honored if <ha-policy> is not also used. It indicates whether this server is a backup server
|
||||
private static boolean DEFAULT_BACKUP = false;
|
||||
|
||||
// DEPRECATED. This option is deprecated, but it will still be honored if <ha-policy> is not also used. 'shared-store' applies to live and backup pairs, and it indicates if the live/backup pair share storage or if the data is replicated among them.
|
||||
private static boolean DEFAULT_SHARED_STORE = false;
|
||||
|
||||
// True means that the delivery count is persisted before delivery. False means that this only happens after a message has been cancelled.
|
||||
private static boolean DEFAULT_PERSIST_DELIVERY_COUNT_BEFORE_DELIVERY = false;
|
||||
|
||||
|
@ -622,22 +616,6 @@ public final class ActiveMQDefaultConfiguration
|
|||
return DEFAULT_PERSIST_ID_CACHE;
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED. This option is deprecated, but it will still be honored if <ha-policy> is not also used. It indicates whether this server is a backup server
|
||||
*/
|
||||
public static boolean isDefaultBackup()
|
||||
{
|
||||
return DEFAULT_BACKUP;
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED. This option is deprecated, but it will still be honored if <ha-policy> is not also used. 'shared-store' applies to live and backup pairs, and it indicates if the live/backup pair share storage or if the data is replicated among them.
|
||||
*/
|
||||
public static boolean isDefaultSharedStore()
|
||||
{
|
||||
return DEFAULT_SHARED_STORE;
|
||||
}
|
||||
|
||||
/**
|
||||
* True means that the delivery count is persisted before delivery. False means that this only happens after a message has been cancelled.
|
||||
*/
|
||||
|
|
|
@ -56,15 +56,6 @@ public interface ClientSession extends XAResource, AutoCloseable
|
|||
boolean isAutoCreateJmsQueues();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link org.apache.activemq.api.core.client.ClientSession.AddressQuery} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public interface BindingQuery extends AddressQuery
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Information returned by a queue query
|
||||
*
|
||||
|
|
|
@ -689,18 +689,6 @@ public interface ServerLocator extends AutoCloseable
|
|||
*/
|
||||
ServerLocator setInitialMessagePacketSize(int size);
|
||||
|
||||
/**
|
||||
* Adds an interceptor which will be executed <em>after packets are received from the server</em>. Invoking this
|
||||
* method is the same as invoking <code>addIncomingInterceptor(Interceptor).</code>
|
||||
*
|
||||
* @param interceptor an Interceptor
|
||||
* @deprecated As of ActiveMQ 2.3.0.Final, replaced by
|
||||
* {@link #addIncomingInterceptor(Interceptor)} and
|
||||
* {@link #addOutgoingInterceptor(Interceptor)}
|
||||
*/
|
||||
@Deprecated
|
||||
void addInterceptor(Interceptor interceptor);
|
||||
|
||||
/**
|
||||
* Adds an interceptor which will be executed <em>after packets are received from the server</em>.
|
||||
*
|
||||
|
@ -717,19 +705,6 @@ public interface ServerLocator extends AutoCloseable
|
|||
*/
|
||||
ServerLocator addOutgoingInterceptor(Interceptor interceptor);
|
||||
|
||||
/**
|
||||
* Removes an interceptor. Invoking this method is the same as invoking
|
||||
* <code>removeIncomingInterceptor(Interceptor).</code>
|
||||
*
|
||||
* @param interceptor interceptor to remove
|
||||
* @return <code>true</code> if the interceptor is removed from this factory, <code>false</code> else
|
||||
* @deprecated As of ActiveMQ 2.3.0.Final, replaced by
|
||||
* {@link #removeIncomingInterceptor(Interceptor)} and
|
||||
* {@link #removeOutgoingInterceptor(Interceptor)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean removeInterceptor(Interceptor interceptor);
|
||||
|
||||
/**
|
||||
* Removes an incoming interceptor.
|
||||
*
|
||||
|
|
|
@ -38,18 +38,6 @@ public interface ActiveMQServerControl
|
|||
*/
|
||||
boolean isStarted();
|
||||
|
||||
/**
|
||||
* Returns the list of interceptors used by this server. Invoking this method is the same as invoking
|
||||
* <code>getIncomingInterceptorClassNames().</code>
|
||||
*
|
||||
* @see org.apache.activemq.api.core.Interceptor
|
||||
* @deprecated As of ActiveMQ 2.3.0.Final, replaced by
|
||||
* {@link #getIncomingInterceptorClassNames()} and
|
||||
* {@link #getOutgoingInterceptorClassNames()}
|
||||
*/
|
||||
@Deprecated
|
||||
String[] getInterceptorClassNames();
|
||||
|
||||
/**
|
||||
* Returns the list of interceptors used by this server for incoming messages.
|
||||
*
|
||||
|
|
|
@ -99,21 +99,11 @@ public interface QueueControl
|
|||
*/
|
||||
String getExpiryAddress();
|
||||
|
||||
/**
|
||||
* Sets the expiry address associated to this queue to the specified expiryAddress.
|
||||
*/
|
||||
void setExpiryAddress(@Parameter(name = "expiryAddress", desc = "Expiry address of the queue") String expiryAddress) throws Exception;
|
||||
|
||||
/**
|
||||
* Returns the dead-letter address associated to this queue.
|
||||
*/
|
||||
String getDeadLetterAddress();
|
||||
|
||||
/**
|
||||
* Sets the dead-letter address associated to this queue to the specified deadLetterAddress.
|
||||
*/
|
||||
void setDeadLetterAddress(@Parameter(name = "deadLetterAddress", desc = "Dead-letter address of the queue") String deadLetterAddress) throws Exception;
|
||||
|
||||
// Operations ----------------------------------------------------
|
||||
|
||||
/**
|
||||
|
|
|
@ -22,7 +22,7 @@ import java.util.List;
|
|||
import org.apache.activemq.api.core.SimpleString;
|
||||
import org.apache.activemq.api.core.client.ClientSession;
|
||||
|
||||
public class AddressQueryImpl implements ClientSession.AddressQuery, ClientSession.BindingQuery
|
||||
public class AddressQueryImpl implements ClientSession.AddressQuery
|
||||
{
|
||||
private final boolean exists;
|
||||
|
||||
|
|
|
@ -362,19 +362,6 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Use {@link #addressQuery(org.apache.activemq.api.core.SimpleString)} instead
|
||||
*
|
||||
* @param address
|
||||
* @return
|
||||
* @throws org.apache.activemq.api.core.ActiveMQException
|
||||
*/
|
||||
@Deprecated
|
||||
public BindingQuery bindingQuery(final SimpleString address) throws ActiveMQException
|
||||
{
|
||||
return (BindingQuery) addressQuery(address);
|
||||
}
|
||||
|
||||
public AddressQuery addressQuery(final SimpleString address) throws ActiveMQException
|
||||
{
|
||||
checkClosed();
|
||||
|
|
|
@ -1315,13 +1315,6 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
|
|||
return discoveryGroupConfiguration;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public void addInterceptor(final Interceptor interceptor)
|
||||
{
|
||||
addIncomingInterceptor(interceptor);
|
||||
}
|
||||
|
||||
public ServerLocatorImpl addIncomingInterceptor(final Interceptor interceptor)
|
||||
{
|
||||
incomingInterceptors.add(interceptor);
|
||||
|
@ -1334,13 +1327,6 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
|
|||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public boolean removeInterceptor(final Interceptor interceptor)
|
||||
{
|
||||
return removeIncomingInterceptor(interceptor);
|
||||
}
|
||||
|
||||
public boolean removeIncomingInterceptor(final Interceptor interceptor)
|
||||
{
|
||||
return incomingInterceptors.remove(interceptor);
|
||||
|
|
|
@ -37,25 +37,11 @@ public interface JMSQueueControl extends DestinationControl
|
|||
*/
|
||||
String getExpiryAddress();
|
||||
|
||||
/**
|
||||
* Sets the expiry address associated to this queue to the specified expiryAddress.
|
||||
* @deprecated: it's non persisted. Use the proper address settings
|
||||
*/
|
||||
@Deprecated
|
||||
void setExpiryAddress(@Parameter(name = "expiryAddress", desc = "Expiry address of the queue") String expiryAddress) throws Exception;
|
||||
|
||||
/**
|
||||
* Returns the dead-letter address associated to this queue.
|
||||
*/
|
||||
String getDeadLetterAddress();
|
||||
|
||||
/**
|
||||
* Sets the dead-letter address associated to this queue to the specified deadLetterAddress.
|
||||
* @deprecated: it's non persisted. Use the proper address settings
|
||||
*/
|
||||
@Deprecated
|
||||
void setDeadLetterAddress(@Parameter(name = "deadLetterAddress", desc = "Dead-letter address of the queue") String deadLetterAddress) throws Exception;
|
||||
|
||||
/**
|
||||
* Returns the number of scheduled messages in this queue.
|
||||
*/
|
||||
|
|
|
@ -143,32 +143,17 @@ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueContro
|
|||
return coreQueueControl.getDeadLetterAddress();
|
||||
}
|
||||
|
||||
public void setDeadLetterAddress(final String deadLetterAddress) throws Exception
|
||||
{
|
||||
coreQueueControl.setDeadLetterAddress(deadLetterAddress);
|
||||
}
|
||||
|
||||
public String getExpiryAddress()
|
||||
{
|
||||
return coreQueueControl.getExpiryAddress();
|
||||
}
|
||||
|
||||
public void setExpiryAddress(final String expiryAddress) throws Exception
|
||||
{
|
||||
coreQueueControl.setExpiryAddress(expiryAddress);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBinding(String binding) throws Exception
|
||||
{
|
||||
jmsServerManager.addQueueToBindingRegistry(managedQueue.getName(), binding);
|
||||
}
|
||||
|
||||
public void removeBinding(String binding) throws Exception
|
||||
{
|
||||
jmsServerManager.removeQueueFromBindingRegistry(managedQueue.getName(), binding);
|
||||
}
|
||||
|
||||
public String[] getRegistryBindings()
|
||||
{
|
||||
return jmsServerManager.getBindingsOnQueue(managedQueue.getName());
|
||||
|
|
|
@ -313,17 +313,6 @@ public class ConnectionFactoryProperties
|
|||
this.clientID = clientID;
|
||||
}
|
||||
|
||||
/**
|
||||
* This is for backward compatibility with the JBoss Application Server.
|
||||
* @see <a
|
||||
* href="https://github.com/jbossas/jboss-as/blob/master/messaging/src/main/java/org/jboss/as/messaging/jms/ConnectionFactoryAttributes.java">ConnectionFactoryAttributes.java</a>
|
||||
*/
|
||||
@Deprecated
|
||||
public void setClientId(final String clientID)
|
||||
{
|
||||
setClientID(clientID);
|
||||
}
|
||||
|
||||
public Integer getDupsOKBatchSize()
|
||||
{
|
||||
if (ConnectionFactoryProperties.trace)
|
||||
|
|
|
@ -47,43 +47,12 @@ public interface Configuration extends Serializable
|
|||
*/
|
||||
Configuration setName(String name);
|
||||
|
||||
/**
|
||||
* returns the name used to group of live/backup servers
|
||||
*
|
||||
* @return the name of the group
|
||||
*
|
||||
* @deprecated replaced by {@link org.apache.activemq.core.server.cluster.ha.HAPolicy#getBackupGroupName()}
|
||||
*/
|
||||
@Deprecated
|
||||
String getBackupGroupName();
|
||||
|
||||
/**
|
||||
* Used to configure groups of live/backup servers.
|
||||
*
|
||||
* @param nodeGroupName the node group name
|
||||
*
|
||||
* @deprecated replaced by {@link org.apache.activemq.core.server.cluster.ha.HAPolicy}
|
||||
*/
|
||||
@Deprecated
|
||||
Configuration setBackupGroupName(String nodeGroupName);
|
||||
|
||||
/**
|
||||
* Returns whether this server is clustered. <br>
|
||||
* {@code true} if {@link #getClusterConfigurations()} is not empty.
|
||||
*/
|
||||
boolean isClustered();
|
||||
|
||||
/**
|
||||
* Returns whether a backup will automatically stop when a live server is restarting (i.e.
|
||||
* failing back).
|
||||
*
|
||||
* @return {@code true} if the backup will stop when the live server restarts
|
||||
*
|
||||
* @deprecated you should replace by using the correct{@link org.apache.activemq.core.server.cluster.ha.HAPolicy}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isAllowFailBack();
|
||||
|
||||
/**
|
||||
* Returns whether delivery count is persisted before messages are delivered to the consumers. <br>
|
||||
* Default value is
|
||||
|
@ -96,41 +65,6 @@ public interface Configuration extends Serializable
|
|||
*/
|
||||
Configuration setPersistDeliveryCountBeforeDelivery(boolean persistDeliveryCountBeforeDelivery);
|
||||
|
||||
/**
|
||||
* Returns {@code true} if this server is a backup, {@code false} if it is a live server. <br>
|
||||
* If a backup server has been activated, returns {@code false}. <br>
|
||||
* Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_BACKUP}.
|
||||
*
|
||||
* @deprecated replaced by {@link org.apache.activemq.core.server.cluster.ha.HAPolicy#isBackup()}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isBackup();
|
||||
|
||||
/**
|
||||
* Formerly set whether this server is a backup or not.
|
||||
*
|
||||
* @deprecated you should replace by using the correct{@link org.apache.activemq.core.server.cluster.ha.HAPolicy}
|
||||
*/
|
||||
@Deprecated
|
||||
Configuration setBackup(boolean backup);
|
||||
|
||||
/**
|
||||
* Returns whether this server shares its data store with a corresponding live or backup server. <br>
|
||||
* Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_SHARED_STORE}.
|
||||
*
|
||||
* @deprecated replaced by {@link org.apache.activemq.core.server.cluster.ha.HAPolicy#isSharedStore()}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isSharedStore();
|
||||
|
||||
/**
|
||||
* Formerly set whether this server shares its data store with a backup or live server.
|
||||
*
|
||||
* @deprecated you should replace by using the correct{@link org.apache.activemq.core.server.cluster.ha.HAPolicy}
|
||||
*/
|
||||
@Deprecated
|
||||
Configuration setSharedStore(boolean sharedStore);
|
||||
|
||||
/**
|
||||
* Returns whether this server is using persistence and store data. <br>
|
||||
* Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_PERSISTENCE_ENABLED}.
|
||||
|
@ -223,17 +157,6 @@ public interface Configuration extends Serializable
|
|||
*/
|
||||
Configuration setJMXDomain(String domain);
|
||||
|
||||
/**
|
||||
* Returns the list of interceptors classes used by this server for incoming messages (i.e. those being delivered to
|
||||
* the server from clients). Invoking this method is the same as invoking <code>getIncomingInterceptorClassNames().</code>
|
||||
*
|
||||
* @deprecated As of ActiveMQ 2.3.0.Final, replaced by
|
||||
* {@link #getIncomingInterceptorClassNames()} and
|
||||
* {@link #getOutgoingInterceptorClassNames()}
|
||||
*/
|
||||
@Deprecated
|
||||
List<String> getInterceptorClassNames();
|
||||
|
||||
/**
|
||||
* Returns the list of interceptors classes used by this server for incoming messages (i.e. those being delivered to
|
||||
* the server from clients).
|
||||
|
@ -246,21 +169,6 @@ public interface Configuration extends Serializable
|
|||
*/
|
||||
List<String> getOutgoingInterceptorClassNames();
|
||||
|
||||
/**
|
||||
* Sets the list of interceptors classes used by this server for incoming messages (i.e. those
|
||||
* being delivered to the server from clients). Invoking this method is the same as invoking
|
||||
* <code>setIncomingInterceptorClassNames(List)</code> <br />
|
||||
* Classes must implement {@link org.apache.activemq.api.core.Interceptor}.
|
||||
* <p/>
|
||||
* Deprecated but not immediately deleted, as embedded users may be using this file.
|
||||
*
|
||||
* @deprecated As of ActiveMQ 2.3.0.Final, replaced by
|
||||
* {@link #setIncomingInterceptorClassNames(List)} and
|
||||
* {@link #setOutgoingInterceptorClassNames(List)}
|
||||
*/
|
||||
@Deprecated
|
||||
Configuration setInterceptorClassNames(List<String> interceptors);
|
||||
|
||||
/**
|
||||
* Sets the list of interceptors classes used by this server for incoming messages (i.e. those being delivered to
|
||||
* the server from clients).
|
||||
|
@ -452,30 +360,6 @@ public interface Configuration extends Serializable
|
|||
*/
|
||||
String getClusterPassword();
|
||||
|
||||
/**
|
||||
* Should we notify any clients on close that they should failover.
|
||||
*
|
||||
* @return true if clients should failover
|
||||
* @see #setFailoverOnServerShutdown(boolean)
|
||||
*
|
||||
* @deprecated you should replace by using the correct{@link org.apache.activemq.core.server.cluster.ha.HAPolicy}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isFailoverOnServerShutdown();
|
||||
|
||||
/**
|
||||
* Sets whether to allow clients to failover on server shutdown.
|
||||
* <p/>
|
||||
* When a live server is restarted after failover the backup will shutdown if
|
||||
* {@link org.apache.activemq.core.server.cluster.ha.HAPolicy#isAllowAutoFailBack()} is true. This is not regarded as a normal shutdown. In this
|
||||
* case {@code failoverOnServerShutdown} is ignored, and the server will behave as if it was set
|
||||
* to {@code true}.
|
||||
*
|
||||
* @deprecated you should replace by using the correct {@link org.apache.activemq.core.server.cluster.ha.HAPolicy}
|
||||
*/
|
||||
@Deprecated
|
||||
Configuration setFailoverOnServerShutdown(boolean failoverOnServerShutdown);
|
||||
|
||||
/**
|
||||
* Sets the cluster password for this server.
|
||||
*/
|
||||
|
@ -897,48 +781,6 @@ public interface Configuration extends Serializable
|
|||
*/
|
||||
List<ConnectorServiceConfiguration> getConnectorServiceConfigurations();
|
||||
|
||||
/**
|
||||
* Returns the delay to wait before fail-back occurs on restart.
|
||||
*
|
||||
* @deprecated replaced by {@link org.apache.activemq.core.server.cluster.ha.BackupPolicy#getFailbackDelay()}
|
||||
*/
|
||||
@Deprecated
|
||||
long getFailbackDelay();
|
||||
|
||||
/**
|
||||
* Sets the fail-back delay.
|
||||
*
|
||||
* @deprecated replaced by {@link org.apache.activemq.core.server.cluster.ha.BackupPolicy#setFailbackDelay(long)}
|
||||
*/
|
||||
@Deprecated
|
||||
Configuration setFailbackDelay(long delay);
|
||||
|
||||
/**
|
||||
* Whether to check if the cluster already has a (live) node with our node-ID.
|
||||
* <p/>
|
||||
* If the cluster does contain a server using this server's node-ID, then this server will assume
|
||||
* that fail-over has occurred and will try to trigger a fail-back.
|
||||
* <p/>
|
||||
* Enabling this check will slow down a server start-up slightly.
|
||||
*
|
||||
* @return true if we want to make the check
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isCheckForLiveServer();
|
||||
|
||||
/**
|
||||
* Sets whether to check if the cluster already has a (live) node with our node-ID.
|
||||
* <p/>
|
||||
* If the cluster does contain a server using this server's node-ID, then this server will assume
|
||||
* that fail-over has occurred and will try to trigger a fail-back.
|
||||
* <p/>
|
||||
* Enabling this check will slow down a server start-up slightly.
|
||||
*
|
||||
* @param checkForLiveServer true if we want to make the check
|
||||
*/
|
||||
@Deprecated
|
||||
Configuration setCheckForLiveServer(boolean checkForLiveServer);
|
||||
|
||||
/**
|
||||
* The default password decoder
|
||||
*/
|
||||
|
@ -959,29 +801,6 @@ public interface Configuration extends Serializable
|
|||
*/
|
||||
boolean isMaskPassword();
|
||||
|
||||
/**
|
||||
* Name of the cluster configuration to use for replication.
|
||||
* <p/>
|
||||
* Only applicable for servers with more than one cluster configuration. This value is only used
|
||||
* by replicating backups and live servers that attempt fail-back.
|
||||
*
|
||||
* @param clusterName
|
||||
*
|
||||
* @deprecated you should replace by using the correct{@link org.apache.activemq.core.server.cluster.ha.HAPolicy}
|
||||
*/
|
||||
|
||||
@Deprecated
|
||||
Configuration setReplicationClustername(String clusterName);
|
||||
|
||||
/**
|
||||
* @return name of the cluster configuration to use
|
||||
* @see #setReplicationClustername(String)
|
||||
*
|
||||
* @deprecated you should replace by using the correct{@link org.apache.activemq.core.server.cluster.ha.HAPolicy}
|
||||
*/
|
||||
@Deprecated
|
||||
String getReplicationClustername();
|
||||
|
||||
/*
|
||||
* Whether or not that ActiveMQ should use all protocols available on the classpath. If false only the core protocol will
|
||||
* be set, any other protocols will need to be set directly on the ActiveMQServer
|
||||
|
@ -995,28 +814,6 @@ public interface Configuration extends Serializable
|
|||
* */
|
||||
boolean isResolveProtocols();
|
||||
|
||||
/**
|
||||
* How many backup journals to keep after failback occurs.
|
||||
* <p/>
|
||||
* This value is only used by replicating backups after a live server has failed back. Beofre the backup restarts
|
||||
* it will copy its journals into another directory to keep.
|
||||
*
|
||||
* @param maxSavedReplicatedJournalsSize
|
||||
*
|
||||
* @deprecated you should replace by using the correct{@link org.apache.activemq.core.server.cluster.ha.HAPolicy}
|
||||
*/
|
||||
@Deprecated
|
||||
Configuration setMaxSavedReplicatedJournalSize(int maxSavedReplicatedJournalsSize);
|
||||
|
||||
/**
|
||||
* @return the number of backup journals to keep after failback has occurred
|
||||
* @see #setMaxSavedReplicatedJournalSize(int)
|
||||
*
|
||||
* @deprecated you should replace by using the correct{@link org.apache.activemq.core.server.cluster.ha.HAPolicy}
|
||||
*/
|
||||
@Deprecated
|
||||
int getMaxSavedReplicatedJournalsSize();
|
||||
|
||||
Configuration copy() throws Exception;
|
||||
|
||||
Configuration setJournalLockAcquisitionTimeout(long journalLockAcquisitionTimeout);
|
||||
|
|
|
@ -42,8 +42,6 @@ import org.apache.activemq.core.config.DivertConfiguration;
|
|||
import org.apache.activemq.core.config.HAPolicyConfiguration;
|
||||
import org.apache.activemq.core.config.ha.ReplicaPolicyConfiguration;
|
||||
import org.apache.activemq.core.config.ha.ReplicatedPolicyConfiguration;
|
||||
import org.apache.activemq.core.config.ha.SharedStoreMasterPolicyConfiguration;
|
||||
import org.apache.activemq.core.config.ha.SharedStoreSlavePolicyConfiguration;
|
||||
import org.apache.activemq.core.security.Role;
|
||||
import org.apache.activemq.core.server.JournalType;
|
||||
import org.apache.activemq.core.server.group.impl.GroupingHandlerConfiguration;
|
||||
|
@ -313,21 +311,6 @@ public class ConfigurationImpl implements Configuration
|
|||
return this;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public List<String> getInterceptorClassNames()
|
||||
{
|
||||
return getIncomingInterceptorClassNames();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public ConfigurationImpl setInterceptorClassNames(final List<String> interceptors)
|
||||
{
|
||||
setIncomingInterceptorClassNames(interceptors);
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<String> getIncomingInterceptorClassNames()
|
||||
{
|
||||
return incomingInterceptorClassNames;
|
||||
|
@ -1117,199 +1100,6 @@ public class ConfigurationImpl implements Configuration
|
|||
return this;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* All these operations are now deprecated and may or my not work, best efforts is all we can do, an HA Policy needs to be used
|
||||
* */
|
||||
@Deprecated
|
||||
public ConfigurationImpl setBackup(final boolean backup)
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public boolean isSharedStore()
|
||||
{
|
||||
return haPolicyConfiguration instanceof SharedStoreMasterPolicyConfiguration || haPolicyConfiguration instanceof SharedStoreSlavePolicyConfiguration;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public ConfigurationImpl setSharedStore(final boolean sharedStore)
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public long getFailbackDelay()
|
||||
{
|
||||
if (haPolicyConfiguration instanceof ReplicaPolicyConfiguration)
|
||||
{
|
||||
ReplicaPolicyConfiguration hapc = (ReplicaPolicyConfiguration) haPolicyConfiguration;
|
||||
return hapc.getFailbackDelay();
|
||||
}
|
||||
else if (haPolicyConfiguration instanceof SharedStoreMasterPolicyConfiguration)
|
||||
{
|
||||
SharedStoreMasterPolicyConfiguration hapc = (SharedStoreMasterPolicyConfiguration) haPolicyConfiguration;
|
||||
return hapc.getFailbackDelay();
|
||||
}
|
||||
else if (haPolicyConfiguration instanceof SharedStoreSlavePolicyConfiguration)
|
||||
{
|
||||
SharedStoreSlavePolicyConfiguration hapc = (SharedStoreSlavePolicyConfiguration) haPolicyConfiguration;
|
||||
return hapc.getFailbackDelay();
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public ConfigurationImpl setFailbackDelay(long failbackDelay)
|
||||
{
|
||||
if (haPolicyConfiguration instanceof ReplicaPolicyConfiguration)
|
||||
{
|
||||
ReplicaPolicyConfiguration hapc = (ReplicaPolicyConfiguration) haPolicyConfiguration;
|
||||
hapc.setFailbackDelay(failbackDelay);
|
||||
}
|
||||
else if (haPolicyConfiguration instanceof SharedStoreMasterPolicyConfiguration)
|
||||
{
|
||||
SharedStoreMasterPolicyConfiguration hapc = (SharedStoreMasterPolicyConfiguration) haPolicyConfiguration;
|
||||
hapc.setFailbackDelay(failbackDelay);
|
||||
}
|
||||
else if (haPolicyConfiguration instanceof SharedStoreSlavePolicyConfiguration)
|
||||
{
|
||||
SharedStoreSlavePolicyConfiguration hapc = (SharedStoreSlavePolicyConfiguration) haPolicyConfiguration;
|
||||
hapc.setFailbackDelay(failbackDelay);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public String getBackupGroupName()
|
||||
{
|
||||
if (haPolicyConfiguration instanceof ReplicaPolicyConfiguration)
|
||||
{
|
||||
ReplicaPolicyConfiguration hapc = (ReplicaPolicyConfiguration) haPolicyConfiguration;
|
||||
return hapc.getGroupName();
|
||||
}
|
||||
else if (haPolicyConfiguration instanceof ReplicatedPolicyConfiguration)
|
||||
{
|
||||
ReplicatedPolicyConfiguration hapc = (ReplicatedPolicyConfiguration) haPolicyConfiguration;
|
||||
return hapc.getGroupName();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public ConfigurationImpl setBackupGroupName(String nodeGroupName)
|
||||
{
|
||||
if (haPolicyConfiguration instanceof ReplicaPolicyConfiguration)
|
||||
{
|
||||
ReplicaPolicyConfiguration hapc = (ReplicaPolicyConfiguration) haPolicyConfiguration;
|
||||
hapc.setGroupName(nodeGroupName);
|
||||
}
|
||||
else if (haPolicyConfiguration instanceof ReplicatedPolicyConfiguration)
|
||||
{
|
||||
ReplicatedPolicyConfiguration hapc = (ReplicatedPolicyConfiguration) haPolicyConfiguration;
|
||||
hapc.setGroupName(nodeGroupName);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public ConfigurationImpl setReplicationClustername(String clusterName)
|
||||
{
|
||||
if (haPolicyConfiguration instanceof ReplicaPolicyConfiguration)
|
||||
{
|
||||
ReplicaPolicyConfiguration hapc = (ReplicaPolicyConfiguration) haPolicyConfiguration;
|
||||
hapc.setClusterName(clusterName);
|
||||
}
|
||||
else if (haPolicyConfiguration instanceof ReplicatedPolicyConfiguration)
|
||||
{
|
||||
ReplicatedPolicyConfiguration hapc = (ReplicatedPolicyConfiguration) haPolicyConfiguration;
|
||||
hapc.setClusterName(clusterName);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public String getReplicationClustername()
|
||||
{
|
||||
if (haPolicyConfiguration instanceof ReplicaPolicyConfiguration)
|
||||
{
|
||||
ReplicaPolicyConfiguration hapc = (ReplicaPolicyConfiguration) haPolicyConfiguration;
|
||||
return hapc.getClusterName();
|
||||
}
|
||||
else if (haPolicyConfiguration instanceof ReplicatedPolicyConfiguration)
|
||||
{
|
||||
ReplicatedPolicyConfiguration hapc = (ReplicatedPolicyConfiguration) haPolicyConfiguration;
|
||||
return hapc.getClusterName();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public ConfigurationImpl setMaxSavedReplicatedJournalSize(int maxSavedReplicatedJournalsSize)
|
||||
{
|
||||
if (haPolicyConfiguration instanceof ReplicaPolicyConfiguration)
|
||||
{
|
||||
ReplicaPolicyConfiguration hapc = (ReplicaPolicyConfiguration) haPolicyConfiguration;
|
||||
hapc.setMaxSavedReplicatedJournalsSize(maxSavedReplicatedJournalsSize);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public int getMaxSavedReplicatedJournalsSize()
|
||||
{
|
||||
if (haPolicyConfiguration instanceof ReplicaPolicyConfiguration)
|
||||
{
|
||||
ReplicaPolicyConfiguration hapc = (ReplicaPolicyConfiguration) haPolicyConfiguration;
|
||||
return hapc.getMaxSavedReplicatedJournalsSize();
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public boolean isAllowFailBack()
|
||||
{
|
||||
if (haPolicyConfiguration instanceof ReplicaPolicyConfiguration)
|
||||
{
|
||||
ReplicaPolicyConfiguration hapc = (ReplicaPolicyConfiguration) haPolicyConfiguration;
|
||||
return hapc.isAllowFailBack();
|
||||
}
|
||||
else if (haPolicyConfiguration instanceof SharedStoreSlavePolicyConfiguration)
|
||||
{
|
||||
SharedStoreSlavePolicyConfiguration hapc = (SharedStoreSlavePolicyConfiguration) haPolicyConfiguration;
|
||||
return hapc.isAllowFailBack();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setAllowFailBack(boolean allowAutoFailBack)
|
||||
{
|
||||
if (haPolicyConfiguration instanceof ReplicaPolicyConfiguration)
|
||||
{
|
||||
ReplicaPolicyConfiguration hapc = (ReplicaPolicyConfiguration) haPolicyConfiguration;
|
||||
hapc.setAllowFailBack(allowAutoFailBack);
|
||||
}
|
||||
else if (haPolicyConfiguration instanceof SharedStoreSlavePolicyConfiguration)
|
||||
{
|
||||
SharedStoreSlavePolicyConfiguration hapc = (SharedStoreSlavePolicyConfiguration) haPolicyConfiguration;
|
||||
hapc.setAllowFailBack(allowAutoFailBack);
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public boolean isBackup()
|
||||
{
|
||||
return haPolicyConfiguration instanceof ReplicaPolicyConfiguration || haPolicyConfiguration instanceof SharedStoreSlavePolicyConfiguration;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConfigurationImpl setResolveProtocols(boolean resolveProtocols)
|
||||
{
|
||||
|
|
|
@ -42,7 +42,6 @@ import org.apache.activemq.core.config.Configuration;
|
|||
import org.apache.activemq.core.config.ConnectorServiceConfiguration;
|
||||
import org.apache.activemq.core.config.CoreQueueConfiguration;
|
||||
import org.apache.activemq.core.config.DivertConfiguration;
|
||||
import org.apache.activemq.core.config.HAPolicyConfiguration;
|
||||
import org.apache.activemq.core.config.ScaleDownConfiguration;
|
||||
import org.apache.activemq.core.config.ha.ColocatedPolicyConfiguration;
|
||||
import org.apache.activemq.core.config.ha.LiveOnlyPolicyConfiguration;
|
||||
|
@ -192,253 +191,9 @@ public final class FileConfigurationParser extends XMLConfigurationUtil
|
|||
|
||||
NodeList haPolicyNodes = e.getElementsByTagName("ha-policy");
|
||||
|
||||
boolean containsHAPolicy = false;
|
||||
|
||||
if (haPolicyNodes.getLength() > 0)
|
||||
{
|
||||
parseHAPolicyConfiguration((Element) haPolicyNodes.item(0), config);
|
||||
containsHAPolicy = true;
|
||||
// remove <ha-policy> from the DOM so later when we look for deprecated elements using parameterExists() we don't get false positives
|
||||
e.removeChild(haPolicyNodes.item(0));
|
||||
}
|
||||
|
||||
NodeList elems = e.getElementsByTagName("clustered");
|
||||
if (elems != null && elems.getLength() > 0)
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.deprecatedConfigurationOption("clustered");
|
||||
}
|
||||
|
||||
// these are combined because they are both required for setting the correct HAPolicyConfiguration
|
||||
if (parameterExists(e, "backup") || parameterExists(e, "shared-store"))
|
||||
{
|
||||
boolean backup = getBoolean(e, "backup", false);
|
||||
boolean sharedStore = getBoolean(e, "shared-store", true);
|
||||
|
||||
if (containsHAPolicy)
|
||||
{
|
||||
if (parameterExists(e, "backup"))
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicy("backup");
|
||||
}
|
||||
|
||||
if (parameterExists(e, "shared-store"))
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicy("shared-store");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (parameterExists(e, "backup"))
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.deprecatedConfigurationOption("backup");
|
||||
}
|
||||
|
||||
if (parameterExists(e, "shared-store"))
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.deprecatedConfigurationOption("shared-store");
|
||||
}
|
||||
|
||||
if (backup && sharedStore)
|
||||
{
|
||||
config.setHAPolicyConfiguration(new SharedStoreSlavePolicyConfiguration());
|
||||
}
|
||||
else if (backup && !sharedStore)
|
||||
{
|
||||
config.setHAPolicyConfiguration(new ReplicaPolicyConfiguration());
|
||||
}
|
||||
else if (!backup && sharedStore)
|
||||
{
|
||||
config.setHAPolicyConfiguration(new SharedStoreMasterPolicyConfiguration());
|
||||
}
|
||||
else if (!backup && !sharedStore)
|
||||
{
|
||||
config.setHAPolicyConfiguration(new ReplicatedPolicyConfiguration());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HAPolicyConfiguration haPolicyConfig = config.getHAPolicyConfiguration();
|
||||
|
||||
if (parameterExists(e, "check-for-live-server"))
|
||||
{
|
||||
if (containsHAPolicy)
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicy("check-for-live-server");
|
||||
}
|
||||
else
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.deprecatedConfigurationOption("check-for-live-server");
|
||||
|
||||
if (haPolicyConfig instanceof ReplicatedPolicyConfiguration)
|
||||
{
|
||||
ReplicatedPolicyConfiguration hapc = (ReplicatedPolicyConfiguration) haPolicyConfig;
|
||||
hapc.setCheckForLiveServer(getBoolean(e, "check-for-live-server", hapc.isCheckForLiveServer()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (parameterExists(e, "allow-failback"))
|
||||
{
|
||||
if (containsHAPolicy)
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicy("allow-failback");
|
||||
}
|
||||
else
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.deprecatedConfigurationOption("allow-failback");
|
||||
|
||||
if (haPolicyConfig instanceof ReplicaPolicyConfiguration)
|
||||
{
|
||||
ReplicaPolicyConfiguration hapc = (ReplicaPolicyConfiguration) haPolicyConfig;
|
||||
hapc.setAllowFailBack(getBoolean(e, "allow-failback", hapc.isAllowFailBack()));
|
||||
}
|
||||
else if (haPolicyConfig instanceof SharedStoreSlavePolicyConfiguration)
|
||||
{
|
||||
SharedStoreSlavePolicyConfiguration hapc = (SharedStoreSlavePolicyConfiguration) haPolicyConfig;
|
||||
hapc.setAllowFailBack(getBoolean(e, "allow-failback", hapc.isAllowFailBack()));
|
||||
}
|
||||
else
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicyChosen("check-for-live-server");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (parameterExists(e, "backup-group-name"))
|
||||
{
|
||||
if (containsHAPolicy)
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicy("backup-group-name");
|
||||
}
|
||||
else
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.deprecatedConfigurationOption("backup-group-name");
|
||||
|
||||
if (haPolicyConfig instanceof ReplicaPolicyConfiguration)
|
||||
{
|
||||
ReplicaPolicyConfiguration hapc = (ReplicaPolicyConfiguration) haPolicyConfig;
|
||||
hapc.setGroupName(getString(e, "backup-group-name", hapc.getGroupName(), Validators.NO_CHECK));
|
||||
}
|
||||
else if (haPolicyConfig instanceof ReplicatedPolicyConfiguration)
|
||||
{
|
||||
ReplicatedPolicyConfiguration hapc = (ReplicatedPolicyConfiguration) haPolicyConfig;
|
||||
hapc.setGroupName(getString(e, "backup-group-name", hapc.getGroupName(), Validators.NO_CHECK));
|
||||
}
|
||||
else
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicyChosen("backup-group-name");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (parameterExists(e, "failback-delay"))
|
||||
{
|
||||
if (containsHAPolicy)
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicy("failback-delay");
|
||||
}
|
||||
else
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.deprecatedConfigurationOption("failback-delay");
|
||||
|
||||
if (haPolicyConfig instanceof ReplicaPolicyConfiguration)
|
||||
{
|
||||
ReplicaPolicyConfiguration hapc = (ReplicaPolicyConfiguration) haPolicyConfig;
|
||||
hapc.setFailbackDelay(getLong(e, "failback-delay", hapc.getFailbackDelay(), Validators.GT_ZERO));
|
||||
}
|
||||
else if (haPolicyConfig instanceof SharedStoreMasterPolicyConfiguration)
|
||||
{
|
||||
SharedStoreMasterPolicyConfiguration hapc = (SharedStoreMasterPolicyConfiguration) haPolicyConfig;
|
||||
hapc.setFailbackDelay(getLong(e, "failback-delay", hapc.getFailbackDelay(), Validators.GT_ZERO));
|
||||
}
|
||||
else if (haPolicyConfig instanceof SharedStoreSlavePolicyConfiguration)
|
||||
{
|
||||
SharedStoreSlavePolicyConfiguration hapc = (SharedStoreSlavePolicyConfiguration) haPolicyConfig;
|
||||
hapc.setFailbackDelay(getLong(e, "failback-delay", hapc.getFailbackDelay(), Validators.GT_ZERO));
|
||||
}
|
||||
else
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicyChosen("failback-delay");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (parameterExists(e, "failover-on-shutdown"))
|
||||
{
|
||||
if (containsHAPolicy)
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicy("failover-on-shutdown");
|
||||
}
|
||||
else
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.deprecatedConfigurationOption("failover-on-shutdown");
|
||||
|
||||
if (haPolicyConfig instanceof SharedStoreMasterPolicyConfiguration)
|
||||
{
|
||||
SharedStoreMasterPolicyConfiguration hapc = (SharedStoreMasterPolicyConfiguration) haPolicyConfig;
|
||||
hapc.setFailoverOnServerShutdown(getBoolean(e, "failover-on-shutdown", hapc.isFailoverOnServerShutdown()));
|
||||
}
|
||||
else if (haPolicyConfig instanceof SharedStoreSlavePolicyConfiguration)
|
||||
{
|
||||
SharedStoreSlavePolicyConfiguration hapc = (SharedStoreSlavePolicyConfiguration) haPolicyConfig;
|
||||
hapc.setFailoverOnServerShutdown(getBoolean(e, "failover-on-shutdown", hapc.isFailoverOnServerShutdown()));
|
||||
}
|
||||
else
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicyChosen("failover-on-shutdown");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (parameterExists(e, "replication-clustername"))
|
||||
{
|
||||
if (containsHAPolicy)
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicy("replication-clustername");
|
||||
}
|
||||
else
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.deprecatedConfigurationOption("replication-clustername");
|
||||
|
||||
if (haPolicyConfig instanceof ReplicaPolicyConfiguration)
|
||||
{
|
||||
ReplicaPolicyConfiguration hapc = (ReplicaPolicyConfiguration) haPolicyConfig;
|
||||
hapc.setClusterName(getString(e, "replication-clustername", null, Validators.NO_CHECK));
|
||||
}
|
||||
else if (haPolicyConfig instanceof ReplicatedPolicyConfiguration)
|
||||
{
|
||||
ReplicatedPolicyConfiguration hapc = (ReplicatedPolicyConfiguration) haPolicyConfig;
|
||||
hapc.setClusterName(getString(e, "replication-clustername", null, Validators.NO_CHECK));
|
||||
}
|
||||
else
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicyChosen("replication-clustername");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (parameterExists(e, "max-saved-replicated-journals-size"))
|
||||
{
|
||||
if (containsHAPolicy)
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicy("max-saved-replicated-journals-size");
|
||||
}
|
||||
else
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.deprecatedConfigurationOption("max-saved-replicated-journals-size");
|
||||
|
||||
if (haPolicyConfig instanceof ReplicaPolicyConfiguration)
|
||||
{
|
||||
ReplicaPolicyConfiguration hapc = (ReplicaPolicyConfiguration) haPolicyConfig;
|
||||
hapc.setMaxSavedReplicatedJournalsSize(getInteger(e, "max-saved-replicated-journals-size",
|
||||
hapc.getMaxSavedReplicatedJournalsSize(), Validators.MINUS_ONE_OR_GE_ZERO));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ActiveMQServerLogger.LOGGER.incompatibleWithHAPolicyChosen("max-saved-replicated-journals-size");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//if we aren already set then set to default
|
||||
|
@ -1435,13 +1190,16 @@ public final class FileConfigurationParser extends XMLConfigurationUtil
|
|||
|
||||
scaleDownConfiguration.setEnabled(getBoolean(scaleDownElement, "enabled", scaleDownConfiguration.isEnabled()));
|
||||
|
||||
String scaleDownDiscoveryGroup = getString(scaleDownElement, "discovery-group", scaleDownConfiguration.getDiscoveryGroup(), Validators.NO_CHECK);
|
||||
NodeList discoveryGroupRef = scaleDownElement.getElementsByTagName("discovery-group-ref");
|
||||
|
||||
scaleDownConfiguration.setDiscoveryGroup(scaleDownDiscoveryGroup);
|
||||
if (discoveryGroupRef.item(0) != null)
|
||||
{
|
||||
scaleDownConfiguration.setDiscoveryGroup(discoveryGroupRef.item(0).getAttributes().getNamedItem("discovery-group-name").getNodeValue());
|
||||
}
|
||||
|
||||
String scaleDownDiscoveryGroupName = getString(scaleDownElement, "group-name", scaleDownConfiguration.getGroupName(), Validators.NO_CHECK);
|
||||
String scaleDownGroupName = getString(scaleDownElement, "group-name", scaleDownConfiguration.getGroupName(), Validators.NO_CHECK);
|
||||
|
||||
scaleDownConfiguration.setGroupName(scaleDownDiscoveryGroupName);
|
||||
scaleDownConfiguration.setGroupName(scaleDownGroupName);
|
||||
|
||||
NodeList scaleDownConnectorNode = scaleDownElement.getElementsByTagName("connectors");
|
||||
|
||||
|
|
|
@ -324,29 +324,6 @@ public class QueueControlImpl extends AbstractControl implements QueueControl
|
|||
}
|
||||
}
|
||||
|
||||
public void setDeadLetterAddress(final String deadLetterAddress) throws Exception
|
||||
{
|
||||
checkStarted();
|
||||
|
||||
clearIO();
|
||||
try
|
||||
{
|
||||
AddressSettings addressSettings = addressSettingsRepository.getMatch(address);
|
||||
|
||||
if (addressSettings != null && deadLetterAddress != null)
|
||||
{
|
||||
addressSettings = new AddressSettings(addressSettings);
|
||||
addressSettings.setDeadLetterAddress(SimpleString.toSimpleString(deadLetterAddress));
|
||||
addressSettingsRepository.addMatch(address, addressSettings);
|
||||
}
|
||||
|
||||
}
|
||||
finally
|
||||
{
|
||||
blockOnIO();
|
||||
}
|
||||
}
|
||||
|
||||
public String getExpiryAddress()
|
||||
{
|
||||
checkStarted();
|
||||
|
@ -371,29 +348,6 @@ public class QueueControlImpl extends AbstractControl implements QueueControl
|
|||
}
|
||||
}
|
||||
|
||||
public void setExpiryAddress(final String expiryAddress) throws Exception
|
||||
{
|
||||
checkStarted();
|
||||
|
||||
clearIO();
|
||||
try
|
||||
{
|
||||
AddressSettings addressSettings = addressSettingsRepository.getMatch(address);
|
||||
|
||||
if (addressSettings != null && expiryAddress != null)
|
||||
{
|
||||
addressSettings = new AddressSettings(addressSettings);
|
||||
addressSettings.setExpiryAddress(SimpleString.toSimpleString(expiryAddress));
|
||||
addressSettingsRepository.addMatch(address, addressSettings);
|
||||
}
|
||||
|
||||
}
|
||||
finally
|
||||
{
|
||||
blockOnIO();
|
||||
}
|
||||
}
|
||||
|
||||
public Map<String, Object>[] listScheduledMessages() throws Exception
|
||||
{
|
||||
checkStarted();
|
||||
|
|
|
@ -45,27 +45,6 @@
|
|||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="clustered" type="xsd:boolean" default="false" maxOccurs="1"
|
||||
minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
DEPRECATED. This option is deprecated and its value will be ignored (HQ221038). A ActiveMQ server will
|
||||
be "clustered" when its configuration contain a cluster-configuration.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="check-for-live-server" type="xsd:boolean" default="false" maxOccurs="1" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
DEPRECATED. This option is deprecated, but it will still be honored if <ha-policy> is not also
|
||||
used. Whether to check the cluster for a (live) server using our own server ID when starting up. This
|
||||
option is only necessary for performing 'fail-back' on replicating servers. Strictly speaking this
|
||||
setting only applies to live servers and not to backups.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="persistence-enabled" type="xsd:boolean" default="true" maxOccurs="1" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
|
@ -158,38 +137,6 @@
|
|||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="replication-clustername" type="xsd:string" maxOccurs="1" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
DEPRECATED. This option is deprecated, but it will still be honored if <ha-policy> is not also
|
||||
used. Name of the cluster configuration to use for replication. This setting is only necessary in case
|
||||
you configure multiple cluster connections. It is used by a replicating backups and by live servers
|
||||
that may attempt fail-back.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="scale-down-clustername" type="xsd:string" maxOccurs="1" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
DEPRECATED. This option is deprecated, but it will still be honored if <ha-policy> is not also
|
||||
used. Name of the cluster configuration to use for scaling down. This setting is only necessary in
|
||||
case you configure multiple cluster connections.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="max-saved-replicated-journals-size" type="xsd:int" default="2" maxOccurs="1" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
DEPRECATED. This option is deprecated, but it will still be honored if <ha-policy> is not also
|
||||
used. This specifies how many times a replicated backup server can restart after moving its files on
|
||||
start. Once there are this number of backup journal files the server will stop permanently after if
|
||||
fails back.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="password-codec" type="xsd:string"
|
||||
default="org.apache.activemq.utils.DefaultSensitiveStringCodec" maxOccurs="1" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
|
@ -324,16 +271,7 @@
|
|||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="remoting-interceptors" type="class-name-sequenceType" maxOccurs="1" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
DEPRECATED. This option is deprecated, but it will still be honored. Any interceptor specified here
|
||||
will be considered an "incoming" interceptor. See <remoting-incoming-interceptors> and <remoting-outgoing-interceptors>.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
|
||||
<xsd:element name="remoting-incoming-interceptors" type="class-name-sequenceType" maxOccurs="1" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
|
@ -352,84 +290,6 @@
|
|||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="backup" type="xsd:boolean" default="false" maxOccurs="1" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
DEPRECATED. This option is deprecated, but it will still be honored if <ha-policy> is not also
|
||||
used. It indicates whether this server is a backup server
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="allow-failback" type="xsd:boolean" default="true" maxOccurs="1" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
DEPRECATED. This option is deprecated, but it will still be honored if <ha-policy> is not also
|
||||
used. Whether a server will automatically stop when a another places a request to take over its place.
|
||||
The use case is when a regular server stops and its backup takes over its duties, later the main
|
||||
server restarts and requests the server (the former backup) to stop operating.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="backup-group-name" type="xsd:string" maxOccurs="1" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
DEPRECATED. This option is deprecated, but it will still be honored if <ha-policy> is not also
|
||||
used. used for replication, if set, (remote) backup servers will only pair with live servers with
|
||||
matching backup-group-name
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="scale-down-group-name" type="xsd:string" maxOccurs="1" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
DEPRECATED. This option is deprecated, but it will still be honored if <ha-policy> is not also
|
||||
used. used for scaling down, if set, a live server will only send messages to another live server with
|
||||
matching scale-down-group-name
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="failback-delay" type="xsd:long" default="5000" maxOccurs="1" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
DEPRECATED. This option is deprecated, but it will still be honored if <ha-policy> is not also
|
||||
used. The delay to wait before fail-back occurs on (live's) restart.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="failover-on-shutdown" type="xsd:boolean" default="false" maxOccurs="1" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
DEPRECATED. This option is deprecated, but it will still be honored if <ha-policy> is not also
|
||||
used. Will this backup server come live on a normal server shutdown.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="scale-down" type="xsd:boolean" default="false" maxOccurs="1" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
DEPRECATED. This option is deprecated, but it will still be honored if <ha-policy> is not also
|
||||
used. Will this server send its messages to another live server in the
|
||||
cluster when shut-down cleanly.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="shared-store" type="xsd:boolean" default="false" maxOccurs="1" minOccurs="0">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
DEPRECATED. This option is deprecated, but it will still be honored if <ha-policy> is not also
|
||||
used. 'shared-store' applies to live and backup pairs, and it indicates if the live/backup pair share
|
||||
storage or if the data is replicated among them.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="persist-delivery-count-before-delivery" type="xsd:boolean" default="false" maxOccurs="1"
|
||||
minOccurs="0">
|
||||
<xsd:annotation>
|
||||
|
@ -1995,13 +1855,17 @@
|
|||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:choice>
|
||||
<xsd:element name="discovery-group" type="xsd:string" minOccurs="0" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The discovery group to use for scale down, if not supplied then the scale-down-connectors or first
|
||||
invm connector will be used
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:element name="discovery-group-ref" maxOccurs="1" minOccurs="0">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="discovery-group-name" type="xsd:IDREF" use="required">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The discovery group to use for scale down, if not supplied then the scale-down-connectors or first
|
||||
invm connector will be used
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="connectors" minOccurs="0" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
|
|
|
@ -138,8 +138,6 @@ public class FileConfigurationParserTest extends UnitTestCase
|
|||
private static String firstPart =
|
||||
"<core xmlns=\"urn:activemq:core\">" + "\n" +
|
||||
"<name>ActiveMQ.main.config</name>" + "\n" +
|
||||
"<backup-group-name>abackupgroupname</backup-group-name>" + "\n" +
|
||||
"<scale-down-group-name>ascaledowngroupname</scale-down-group-name>" + "\n" +
|
||||
"<log-delegate-factory-class-name>org.apache.activemq.integration.logging.Log4jLogDelegateFactory</log-delegate-factory-class-name>" + "\n" +
|
||||
"<bindings-directory>${jboss.server.data.dir}/activemq/bindings</bindings-directory>" + "\n" +
|
||||
"<journal-directory>${jboss.server.data.dir}/activemq/journal</journal-directory>" + "\n" +
|
||||
|
|
|
@ -241,7 +241,7 @@ public class FileConfigurationTest extends ConfigurationImplTest
|
|||
LiveOnlyPolicyConfiguration lopc = (LiveOnlyPolicyConfiguration) pc;
|
||||
assertNotNull(lopc.getScaleDownConfiguration());
|
||||
assertEquals(lopc.getScaleDownConfiguration().getGroupName(), "boo!");
|
||||
assertEquals(lopc.getScaleDownConfiguration().getDiscoveryGroup(), "wahey");
|
||||
assertEquals(lopc.getScaleDownConfiguration().getDiscoveryGroup(), "dg1");
|
||||
|
||||
for (ClusterConnectionConfiguration ccc : conf.getClusterConfigurations())
|
||||
{
|
||||
|
|
|
@ -68,7 +68,6 @@ public class WrongRoleFileConfigurationParserTest extends UnitTestCase
|
|||
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" +
|
||||
"xsi:schemaLocation=\"urn:activemq /schema/activemq-configuration.xsd\">\n" +
|
||||
"<name>ActiveMQ.main.config</name>" + "\n" +
|
||||
"<backup-group-name>anodegroupname</backup-group-name>" + "\n" +
|
||||
"<log-delegate-factory-class-name>org.apache.activemq.integration.logging.Log4jLogDelegateFactory</log-delegate-factory-class-name>" + "\n" +
|
||||
"<bindings-directory>${jboss.server.data.dir}/activemq/bindings</bindings-directory>" + "\n" +
|
||||
"<journal-directory>${jboss.server.data.dir}/activemq/journal</journal-directory>" + "\n" +
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
<core xmlns="urn:activemq:core">
|
||||
<name>SomeNameForUseOnTheApplicationServer</name>
|
||||
<resolve-protocols>false</resolve-protocols>
|
||||
<clustered>true</clustered>
|
||||
<check-for-live-server>false</check-for-live-server>
|
||||
<persistence-enabled>false</persistence-enabled>
|
||||
<scheduled-thread-pool-max-size>12345</scheduled-thread-pool-max-size>
|
||||
<thread-pool-max-size>54321</thread-pool-max-size>
|
||||
|
@ -34,9 +32,6 @@
|
|||
<management-notification-address>Whatever</management-notification-address>
|
||||
<cluster-user>Frog</cluster-user>
|
||||
<cluster-password>32a10275cf4ab4e9</cluster-password>
|
||||
<replication-clustername>cluster-connection1</replication-clustername>
|
||||
<scale-down-clustername>cluster-connection2</scale-down-clustername>
|
||||
<max-saved-replicated-journals-size>5</max-saved-replicated-journals-size>
|
||||
<password-codec>org.apache.activemq.utils.DefaultSensitiveStringCodec</password-codec>
|
||||
<mask-password>true</mask-password>
|
||||
<log-delegate-factory-class-name>com.foo</log-delegate-factory-class-name>
|
||||
|
@ -53,18 +48,14 @@
|
|||
<message-expiry-thread-priority>8</message-expiry-thread-priority>
|
||||
<id-cache-size>127</id-cache-size>
|
||||
<persist-id-cache>true</persist-id-cache>
|
||||
<remoting-interceptors>
|
||||
<remoting-incoming-interceptors>
|
||||
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor1</class-name>
|
||||
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor2</class-name>
|
||||
</remoting-interceptors>
|
||||
<backup>true</backup>
|
||||
<allow-failback>true</allow-failback>
|
||||
<backup-group-name>backupGroupName</backup-group-name>
|
||||
<scale-down-group-name>scaleDownGroupName</scale-down-group-name>
|
||||
<failback-delay>15000</failback-delay>
|
||||
<failover-on-shutdown>false</failover-on-shutdown>
|
||||
<scale-down>false</scale-down>
|
||||
<shared-store>false</shared-store>
|
||||
</remoting-incoming-interceptors>
|
||||
<remoting-outgoing-interceptors>
|
||||
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor1</class-name>
|
||||
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor2</class-name>
|
||||
</remoting-outgoing-interceptors>
|
||||
<persist-delivery-count-before-delivery>true</persist-delivery-count-before-delivery>
|
||||
<connectors>
|
||||
<connector name="connector1">
|
||||
|
@ -185,7 +176,7 @@
|
|||
<!--a grouping of servers that can be scaled down to-->
|
||||
<group-name>boo!</group-name>
|
||||
<!--either a discovery group-->
|
||||
<discovery-group>wahey</discovery-group>
|
||||
<discovery-group-ref discovery-group-name="dg1"/>
|
||||
</scale-down>
|
||||
</live-only>
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
<management-notification-address>Whatever</management-notification-address>
|
||||
<cluster-user>Frog</cluster-user>
|
||||
<cluster-password>Wombat</cluster-password>
|
||||
<replication-clustername>cluster-connection1</replication-clustername>
|
||||
<jmx-management-enabled>false</jmx-management-enabled>
|
||||
<jmx-domain>gro.qtenroh</jmx-domain>
|
||||
<log-delegate-factory-class-name>ocelot</log-delegate-factory-class-name>
|
||||
|
@ -45,8 +44,6 @@
|
|||
<message-expiry-thread-priority>8</message-expiry-thread-priority>
|
||||
<id-cache-size>127</id-cache-size>
|
||||
<persist-id-cache>true</persist-id-cache>
|
||||
<backup>true</backup>
|
||||
<shared-store>true</shared-store>
|
||||
<persist-delivery-count-before-delivery>true</persist-delivery-count-before-delivery>
|
||||
<paging-directory>pagingdir</paging-directory>
|
||||
<bindings-directory>somedir</bindings-directory>
|
||||
|
@ -68,10 +65,10 @@
|
|||
<memory-warning-threshold>95</memory-warning-threshold>
|
||||
<memory-measure-interval>54321</memory-measure-interval>
|
||||
|
||||
<remoting-interceptors>
|
||||
<remoting-incoming-interceptors>
|
||||
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor1</class-name>
|
||||
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor2</class-name>
|
||||
</remoting-interceptors>
|
||||
</remoting-incoming-interceptors>
|
||||
|
||||
<connectors>
|
||||
<connector name="connector1">
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
<management-notification-address>Whatever</management-notification-address>
|
||||
<cluster-user>Frog</cluster-user>
|
||||
<cluster-password>Wombat</cluster-password>
|
||||
<replication-clustername>cluster-connection1</replication-clustername>
|
||||
<jmx-management-enabled>false</jmx-management-enabled>
|
||||
<jmx-domain>gro.qtenroh</jmx-domain>
|
||||
<log-delegate-factory-class-name>ocelot</log-delegate-factory-class-name>
|
||||
|
@ -45,8 +44,6 @@
|
|||
<message-expiry-thread-priority>8</message-expiry-thread-priority>
|
||||
<id-cache-size>127</id-cache-size>
|
||||
<persist-id-cache>true</persist-id-cache>
|
||||
<backup>true</backup>
|
||||
<shared-store>true</shared-store>
|
||||
<persist-delivery-count-before-delivery>true</persist-delivery-count-before-delivery>
|
||||
<paging-directory>pagingdir</paging-directory>
|
||||
<bindings-directory>somedir</bindings-directory>
|
||||
|
@ -68,10 +65,10 @@
|
|||
<memory-warning-threshold>95</memory-warning-threshold>
|
||||
<memory-measure-interval>54321</memory-measure-interval>
|
||||
|
||||
<remoting-interceptors>
|
||||
<remoting-incoming-interceptors>
|
||||
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor1</class-name>
|
||||
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor2</class-name>
|
||||
</remoting-interceptors>
|
||||
</remoting-incoming-interceptors>
|
||||
|
||||
<connectors>
|
||||
<connector name="connector1">
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
<management-notification-address>Whatever</management-notification-address>
|
||||
<cluster-user>Frog</cluster-user>
|
||||
<cluster-password>Wombat</cluster-password>
|
||||
<replication-clustername>cluster-connection1</replication-clustername>
|
||||
<jmx-management-enabled>false</jmx-management-enabled>
|
||||
<jmx-domain>gro.qtenroh</jmx-domain>
|
||||
<log-delegate-factory-class-name>ocelot</log-delegate-factory-class-name>
|
||||
|
@ -45,8 +44,6 @@
|
|||
<message-expiry-thread-priority>8</message-expiry-thread-priority>
|
||||
<id-cache-size>127</id-cache-size>
|
||||
<persist-id-cache>true</persist-id-cache>
|
||||
<backup>true</backup>
|
||||
<shared-store>true</shared-store>
|
||||
<persist-delivery-count-before-delivery>true</persist-delivery-count-before-delivery>
|
||||
<paging-directory>pagingdir</paging-directory>
|
||||
<bindings-directory>somedir</bindings-directory>
|
||||
|
@ -68,10 +65,10 @@
|
|||
<memory-warning-threshold>95</memory-warning-threshold>
|
||||
<memory-measure-interval>54321</memory-measure-interval>
|
||||
|
||||
<remoting-interceptors>
|
||||
<remoting-incoming-interceptors>
|
||||
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor1</class-name>
|
||||
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor2</class-name>
|
||||
</remoting-interceptors>
|
||||
</remoting-incoming-interceptors>
|
||||
|
||||
<connectors>
|
||||
<connector name="connector1">
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
<management-notification-address>Whatever</management-notification-address>
|
||||
<cluster-user>Frog</cluster-user>
|
||||
<cluster-password>Wombat</cluster-password>
|
||||
<replication-clustername>cluster-connection1</replication-clustername>
|
||||
<jmx-management-enabled>false</jmx-management-enabled>
|
||||
<jmx-domain>gro.qtenroh</jmx-domain>
|
||||
<log-delegate-factory-class-name>ocelot</log-delegate-factory-class-name>
|
||||
|
@ -45,8 +44,6 @@
|
|||
<message-expiry-thread-priority>8</message-expiry-thread-priority>
|
||||
<id-cache-size>127</id-cache-size>
|
||||
<persist-id-cache>true</persist-id-cache>
|
||||
<backup>true</backup>
|
||||
<shared-store>true</shared-store>
|
||||
<persist-delivery-count-before-delivery>true</persist-delivery-count-before-delivery>
|
||||
<paging-directory>pagingdir</paging-directory>
|
||||
<bindings-directory>somedir</bindings-directory>
|
||||
|
@ -68,10 +65,10 @@
|
|||
<memory-warning-threshold>95</memory-warning-threshold>
|
||||
<memory-measure-interval>54321</memory-measure-interval>
|
||||
|
||||
<remoting-interceptors>
|
||||
<remoting-incoming-interceptors>
|
||||
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor1</class-name>
|
||||
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor2</class-name>
|
||||
</remoting-interceptors>
|
||||
</remoting-incoming-interceptors>
|
||||
|
||||
<connectors>
|
||||
<connector name="connector1">
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
<management-notification-address>Whatever</management-notification-address>
|
||||
<cluster-user>Frog</cluster-user>
|
||||
<cluster-password>Wombat</cluster-password>
|
||||
<replication-clustername>cluster-connection1</replication-clustername>
|
||||
<jmx-management-enabled>false</jmx-management-enabled>
|
||||
<jmx-domain>gro.qtenroh</jmx-domain>
|
||||
<log-delegate-factory-class-name>ocelot</log-delegate-factory-class-name>
|
||||
|
@ -45,8 +44,6 @@
|
|||
<message-expiry-thread-priority>8</message-expiry-thread-priority>
|
||||
<id-cache-size>127</id-cache-size>
|
||||
<persist-id-cache>true</persist-id-cache>
|
||||
<backup>true</backup>
|
||||
<shared-store>true</shared-store>
|
||||
<persist-delivery-count-before-delivery>true</persist-delivery-count-before-delivery>
|
||||
<paging-directory>pagingdir</paging-directory>
|
||||
<bindings-directory>somedir</bindings-directory>
|
||||
|
@ -68,10 +65,10 @@
|
|||
<memory-warning-threshold>95</memory-warning-threshold>
|
||||
<memory-measure-interval>54321</memory-measure-interval>
|
||||
|
||||
<remoting-interceptors>
|
||||
<remoting-incoming-interceptors>
|
||||
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor1</class-name>
|
||||
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor2</class-name>
|
||||
</remoting-interceptors>
|
||||
</remoting-incoming-interceptors>
|
||||
|
||||
<connectors>
|
||||
<connector name="connector1">
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
<management-notification-address>Whatever</management-notification-address>
|
||||
<cluster-user>Frog</cluster-user>
|
||||
<cluster-password>Wombat</cluster-password>
|
||||
<replication-clustername>cluster-connection1</replication-clustername>
|
||||
<jmx-management-enabled>false</jmx-management-enabled>
|
||||
<jmx-domain>gro.qtenroh</jmx-domain>
|
||||
<log-delegate-factory-class-name>ocelot</log-delegate-factory-class-name>
|
||||
|
@ -45,8 +44,6 @@
|
|||
<message-expiry-thread-priority>8</message-expiry-thread-priority>
|
||||
<id-cache-size>127</id-cache-size>
|
||||
<persist-id-cache>true</persist-id-cache>
|
||||
<backup>true</backup>
|
||||
<shared-store>true</shared-store>
|
||||
<persist-delivery-count-before-delivery>true</persist-delivery-count-before-delivery>
|
||||
<paging-directory>pagingdir</paging-directory>
|
||||
<bindings-directory>somedir</bindings-directory>
|
||||
|
@ -68,10 +65,10 @@
|
|||
<memory-warning-threshold>95</memory-warning-threshold>
|
||||
<memory-measure-interval>54321</memory-measure-interval>
|
||||
|
||||
<remoting-interceptors>
|
||||
<remoting-incoming-interceptors>
|
||||
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor1</class-name>
|
||||
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor2</class-name>
|
||||
</remoting-interceptors>
|
||||
</remoting-incoming-interceptors>
|
||||
|
||||
<connectors>
|
||||
<connector name="connector1">
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="urn:activemq ../../../../activemq-server/src/main/resources/schema/activemq-server.xsd">
|
||||
<core xmlns="urn:activemq:core">
|
||||
<discovery-groups>
|
||||
<discovery-group name="wahey"/>
|
||||
</discovery-groups>
|
||||
<ha-policy>
|
||||
<replication>
|
||||
<colocated>
|
||||
|
@ -41,7 +44,7 @@
|
|||
<!--a grouping of servers that can be scaled down to-->
|
||||
<group-name>boo!</group-name>
|
||||
<!--either a discovery group-->
|
||||
<discovery-group>wahey</discovery-group>
|
||||
<discovery-group-ref discovery-group-name="wahey"/>
|
||||
</scale-down>
|
||||
</slave>
|
||||
</colocated>
|
||||
|
|
|
@ -19,16 +19,18 @@
|
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="urn:activemq /schema/activemq-server.xsd">
|
||||
<core xmlns="urn:activemq:core">
|
||||
<discovery-groups>
|
||||
<discovery-group name="wahey"/>
|
||||
</discovery-groups>
|
||||
<ha-policy>
|
||||
<live-only>
|
||||
<scale-down>
|
||||
<!--a grouping of servers that can be scaled down to-->
|
||||
<group-name>boo!</group-name>
|
||||
<!--either a discovery group-->
|
||||
<discovery-group>wahey</discovery-group>
|
||||
<discovery-group-ref discovery-group-name="wahey"/>
|
||||
</scale-down>
|
||||
</live-only>
|
||||
</ha-policy>
|
||||
</core>
|
||||
|
||||
</configuration>
|
||||
|
|
|
@ -18,8 +18,10 @@
|
|||
xmlns="urn:activemq"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="urn:activemq /schema/activemq-server.xsd">
|
||||
|
||||
<core xmlns="urn:activemq:core">
|
||||
<discovery-groups>
|
||||
<discovery-group name="wahey"/>
|
||||
</discovery-groups>
|
||||
<ha-policy>
|
||||
<replication>
|
||||
<slave>
|
||||
|
@ -33,11 +35,10 @@
|
|||
<!--a grouping of servers that can be scaled down to-->
|
||||
<group-name>boo!</group-name>
|
||||
<!--either a discovery group-->
|
||||
<discovery-group>wahey</discovery-group>
|
||||
<discovery-group-ref discovery-group-name="wahey"/>
|
||||
</scale-down>
|
||||
</slave>
|
||||
</replication>
|
||||
</ha-policy>
|
||||
</core>
|
||||
|
||||
</configuration>
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="urn:activemq ../../../../activemq-server/src/main/resources/schema/activemq-server.xsd">
|
||||
<core xmlns="urn:activemq:core">
|
||||
<discovery-groups>
|
||||
<discovery-group name="wahey"/>
|
||||
</discovery-groups>
|
||||
<ha-policy>
|
||||
<shared-store>
|
||||
<slave>
|
||||
|
@ -30,11 +33,10 @@
|
|||
<!--a grouping of servers that can be scaled down to-->
|
||||
<group-name>boo!</group-name>
|
||||
<!--either a discovery group-->
|
||||
<discovery-group>wahey</discovery-group>
|
||||
<discovery-group-ref discovery-group-name="wahey"/>
|
||||
</scale-down>
|
||||
</slave>
|
||||
</shared-store>
|
||||
</ha-policy>
|
||||
</core>
|
||||
|
||||
</configuration>
|
||||
|
|
|
@ -554,7 +554,7 @@ this would look like:
|
|||
<ha-policy>
|
||||
<live-only>
|
||||
<scale-down>
|
||||
<discovery-group>my-discovery-group</discovery-group>
|
||||
<discovery-group-ref discovery-group-name="my-discovery-group"/>
|
||||
</scale-down>
|
||||
</live-only>
|
||||
</ha-policy>
|
||||
|
@ -612,7 +612,7 @@ typical configuration would look like:
|
|||
<!--a grouping of servers that can be scaled down to-->
|
||||
<group-name>boo!</group-name>
|
||||
<!--either a discovery group-->
|
||||
<discovery-group>wahey</discovery-group>
|
||||
<discovery-group-ref discovery-group-name="wahey"/>
|
||||
</scale-down>
|
||||
</slave>
|
||||
</colocated>
|
||||
|
|
|
@ -667,7 +667,7 @@ public class InterceptorTest extends ServiceTestBase
|
|||
Assert.assertEquals("orange", message.getStringProperty(InterceptorTest.key));
|
||||
}
|
||||
|
||||
sf.getServerLocator().removeInterceptor(interceptor);
|
||||
sf.getServerLocator().removeIncomingInterceptor(interceptor);
|
||||
|
||||
for (int i = 0; i < numMessages; i++)
|
||||
{
|
||||
|
@ -982,7 +982,7 @@ public class InterceptorTest extends ServiceTestBase
|
|||
Assert.assertEquals(4, message.getIntProperty("d").intValue());
|
||||
}
|
||||
|
||||
sf.getServerLocator().removeInterceptor(interceptor2);
|
||||
sf.getServerLocator().removeIncomingInterceptor(interceptor2);
|
||||
|
||||
for (int i = 0; i < numMessages; i++)
|
||||
{
|
||||
|
|
|
@ -428,7 +428,7 @@ public class HangConsumerTest extends ServiceTestBase
|
|||
HangInterceptor hangInt = new HangInterceptor();
|
||||
try
|
||||
{
|
||||
locator.addInterceptor(hangInt);
|
||||
locator.addIncomingInterceptor(hangInt);
|
||||
|
||||
ClientSessionFactory factory = locator.createSessionFactory();
|
||||
ClientSession session = factory.createSession(false, false, false);
|
||||
|
|
|
@ -81,7 +81,9 @@ public class ReplicatedFailoverTest extends FailoverTest
|
|||
|
||||
crash(session);
|
||||
|
||||
liveServer.getServer().getConfiguration().setCheckForLiveServer(true);
|
||||
ReplicatedPolicyConfiguration replicatedPolicyConfiguration = (ReplicatedPolicyConfiguration) liveServer.getServer().getConfiguration().getHAPolicyConfiguration();
|
||||
|
||||
replicatedPolicyConfiguration.setCheckForLiveServer(true);
|
||||
|
||||
liveServer.start();
|
||||
|
||||
|
@ -95,7 +97,9 @@ public class ReplicatedFailoverTest extends FailoverTest
|
|||
|
||||
crash(session);
|
||||
|
||||
liveServer.getServer().getConfiguration().setCheckForLiveServer(true);
|
||||
replicatedPolicyConfiguration = (ReplicatedPolicyConfiguration) liveServer.getServer().getConfiguration().getHAPolicyConfiguration();
|
||||
|
||||
replicatedPolicyConfiguration.setCheckForLiveServer(true);
|
||||
|
||||
liveServer.start();
|
||||
|
||||
|
|
|
@ -439,7 +439,10 @@ public class JMSQueueControlTest extends ManagementTestBase
|
|||
|
||||
Assert.assertNull(queueControl.getExpiryAddress());
|
||||
|
||||
queueControl.setExpiryAddress(expiryAddress);
|
||||
AddressSettings addressSettings = new AddressSettings();
|
||||
addressSettings.setExpiryAddress(new SimpleString(expiryAddress));
|
||||
server.getAddressSettingsRepository().addMatch(queue.getAddress(), addressSettings);
|
||||
|
||||
Assert.assertEquals(expiryAddress, queueControl.getExpiryAddress());
|
||||
}
|
||||
|
||||
|
@ -469,7 +472,11 @@ public class JMSQueueControlTest extends ManagementTestBase
|
|||
String expiryQueueName = RandomUtil.randomString();
|
||||
ActiveMQQueue expiryQueue = (ActiveMQQueue) ActiveMQJMSClient.createQueue(expiryQueueName);
|
||||
serverManager.createQueue(false, expiryQueueName, null, true, expiryQueueName);
|
||||
queueControl.setExpiryAddress(expiryQueue.getAddress());
|
||||
|
||||
AddressSettings addressSettings = new AddressSettings();
|
||||
addressSettings.setExpiryAddress(new SimpleString(expiryQueue.getAddress()));
|
||||
server.getAddressSettingsRepository().addMatch(queue.getAddress(), addressSettings);
|
||||
// queueControl.setExpiryAddress(expiryQueue.getAddress());
|
||||
|
||||
JMSQueueControl expiryQueueControl = ManagementControlHelper.createJMSQueueControl(expiryQueue, mbeanServer);
|
||||
|
||||
|
@ -595,7 +602,10 @@ public class JMSQueueControlTest extends ManagementTestBase
|
|||
|
||||
Assert.assertNull(queueControl.getDeadLetterAddress());
|
||||
|
||||
queueControl.setDeadLetterAddress(deadLetterAddress);
|
||||
AddressSettings addressSettings = new AddressSettings();
|
||||
addressSettings.setDeadLetterAddress(new SimpleString(deadLetterAddress));
|
||||
server.getAddressSettingsRepository().addMatch(queue.getAddress(), addressSettings);
|
||||
|
||||
Assert.assertEquals(deadLetterAddress, queueControl.getDeadLetterAddress());
|
||||
}
|
||||
|
||||
|
@ -606,6 +616,10 @@ public class JMSQueueControlTest extends ManagementTestBase
|
|||
serverManager.createQueue(false, deadLetterQueue, null, true, deadLetterQueue);
|
||||
ActiveMQQueue dlq = (ActiveMQQueue) ActiveMQJMSClient.createQueue(deadLetterQueue);
|
||||
|
||||
AddressSettings addressSettings = new AddressSettings();
|
||||
addressSettings.setDeadLetterAddress(new SimpleString(dlq.getAddress()));
|
||||
server.getAddressSettingsRepository().addMatch(queue.getAddress(), addressSettings);
|
||||
|
||||
Connection conn = createConnection();
|
||||
Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
||||
MessageProducer producer = sess.createProducer(queue);
|
||||
|
@ -623,7 +637,7 @@ public class JMSQueueControlTest extends ManagementTestBase
|
|||
Assert.assertEquals(2, getMessageCount(queueControl));
|
||||
Assert.assertEquals(0, getMessageCount(dlqControl));
|
||||
|
||||
queueControl.setDeadLetterAddress(dlq.getAddress());
|
||||
// queueControl.setDeadLetterAddress(dlq.getAddress());
|
||||
|
||||
boolean movedToDeadLetterAddress = queueControl.sendMessageToDeadLetterAddress(message.getJMSMessageID());
|
||||
Assert.assertTrue(movedToDeadLetterAddress);
|
||||
|
@ -669,6 +683,10 @@ public class JMSQueueControlTest extends ManagementTestBase
|
|||
serverManager.createQueue(false, deadLetterQueue, null, true, deadLetterQueue);
|
||||
ActiveMQQueue dlq = (ActiveMQQueue) ActiveMQJMSClient.createQueue(deadLetterQueue);
|
||||
|
||||
AddressSettings addressSettings = new AddressSettings();
|
||||
addressSettings.setDeadLetterAddress(new SimpleString(dlq.getAddress()));
|
||||
server.getAddressSettingsRepository().addMatch(queue.getAddress(), addressSettings);
|
||||
|
||||
Connection conn = createConnection();
|
||||
Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
||||
|
||||
|
@ -682,7 +700,7 @@ public class JMSQueueControlTest extends ManagementTestBase
|
|||
Assert.assertEquals(2, getMessageCount(queueControl));
|
||||
Assert.assertEquals(0, getMessageCount(dlqControl));
|
||||
|
||||
queueControl.setDeadLetterAddress(dlq.getAddress());
|
||||
// queueControl.setDeadLetterAddress(dlq.getAddress());
|
||||
|
||||
int deadMessageCount = queueControl.sendMessagesToDeadLetterAddress(filter);
|
||||
Assert.assertEquals(1, deadMessageCount);
|
||||
|
|
|
@ -141,7 +141,10 @@ public class QueueControlTest extends ManagementTestBase
|
|||
session.createQueue(address, queue, null, false);
|
||||
|
||||
QueueControl queueControl = createManagementControl(address, queue);
|
||||
queueControl.setDeadLetterAddress(deadLetterAddress);
|
||||
|
||||
AddressSettings addressSettings = new AddressSettings();
|
||||
addressSettings.setDeadLetterAddress(new SimpleString(deadLetterAddress));
|
||||
server.getAddressSettingsRepository().addMatch(address.toString(), addressSettings);
|
||||
|
||||
Assert.assertEquals(deadLetterAddress, queueControl.getDeadLetterAddress());
|
||||
|
||||
|
@ -186,7 +189,10 @@ public class QueueControlTest extends ManagementTestBase
|
|||
session.createQueue(address, queue, null, false);
|
||||
|
||||
QueueControl queueControl = createManagementControl(address, queue);
|
||||
queueControl.setExpiryAddress(expiryAddress);
|
||||
|
||||
AddressSettings addressSettings = new AddressSettings();
|
||||
addressSettings.setExpiryAddress(new SimpleString(expiryAddress));
|
||||
server.getAddressSettingsRepository().addMatch(address.toString(), addressSettings);
|
||||
|
||||
Assert.assertEquals(expiryAddress, queueControl.getExpiryAddress());
|
||||
|
||||
|
@ -1425,7 +1431,10 @@ public class QueueControlTest extends ManagementTestBase
|
|||
Assert.assertEquals(1, messages.length);
|
||||
long messageID = (Long) messages[0].get("messageID");
|
||||
|
||||
queueControl.setExpiryAddress(expiryAddress.toString());
|
||||
AddressSettings addressSettings = new AddressSettings();
|
||||
addressSettings.setExpiryAddress(expiryAddress);
|
||||
server.getAddressSettingsRepository().addMatch(address.toString(), addressSettings);
|
||||
|
||||
boolean expired = queueControl.expireMessage(messageID);
|
||||
Assert.assertTrue(expired);
|
||||
Assert.assertEquals(0, getMessageCount(queueControl));
|
||||
|
@ -1464,7 +1473,9 @@ public class QueueControlTest extends ManagementTestBase
|
|||
Assert.assertEquals(2, messages.length);
|
||||
long messageID = (Long) messages[0].get("messageID");
|
||||
|
||||
queueControl.setDeadLetterAddress(deadLetterAddress.toString());
|
||||
AddressSettings addressSettings = new AddressSettings();
|
||||
addressSettings.setDeadLetterAddress(deadLetterAddress);
|
||||
server.getAddressSettingsRepository().addMatch(address.toString(), addressSettings);
|
||||
|
||||
Assert.assertEquals(0, getMessageCount(deadLetterQueueControl));
|
||||
boolean movedToDeadLetterAddress = queueControl.sendMessageToDeadLetterAddress(messageID);
|
||||
|
|
Loading…
Reference in New Issue