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
|
// true means that ID's are persisted to the journal
|
||||||
private static boolean DEFAULT_PERSIST_ID_CACHE = true;
|
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.
|
// 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;
|
private static boolean DEFAULT_PERSIST_DELIVERY_COUNT_BEFORE_DELIVERY = false;
|
||||||
|
|
||||||
|
@ -622,22 +616,6 @@ public final class ActiveMQDefaultConfiguration
|
||||||
return DEFAULT_PERSIST_ID_CACHE;
|
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.
|
* 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();
|
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
|
* Information returned by a queue query
|
||||||
*
|
*
|
||||||
|
|
|
@ -689,18 +689,6 @@ public interface ServerLocator extends AutoCloseable
|
||||||
*/
|
*/
|
||||||
ServerLocator setInitialMessagePacketSize(int size);
|
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>.
|
* 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);
|
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.
|
* Removes an incoming interceptor.
|
||||||
*
|
*
|
||||||
|
|
|
@ -38,18 +38,6 @@ public interface ActiveMQServerControl
|
||||||
*/
|
*/
|
||||||
boolean isStarted();
|
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.
|
* Returns the list of interceptors used by this server for incoming messages.
|
||||||
*
|
*
|
||||||
|
|
|
@ -99,21 +99,11 @@ public interface QueueControl
|
||||||
*/
|
*/
|
||||||
String getExpiryAddress();
|
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.
|
* Returns the dead-letter address associated to this queue.
|
||||||
*/
|
*/
|
||||||
String getDeadLetterAddress();
|
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 ----------------------------------------------------
|
// Operations ----------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -22,7 +22,7 @@ import java.util.List;
|
||||||
import org.apache.activemq.api.core.SimpleString;
|
import org.apache.activemq.api.core.SimpleString;
|
||||||
import org.apache.activemq.api.core.client.ClientSession;
|
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;
|
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
|
public AddressQuery addressQuery(final SimpleString address) throws ActiveMQException
|
||||||
{
|
{
|
||||||
checkClosed();
|
checkClosed();
|
||||||
|
|
|
@ -1315,13 +1315,6 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
|
||||||
return discoveryGroupConfiguration;
|
return discoveryGroupConfiguration;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@Deprecated
|
|
||||||
public void addInterceptor(final Interceptor interceptor)
|
|
||||||
{
|
|
||||||
addIncomingInterceptor(interceptor);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ServerLocatorImpl addIncomingInterceptor(final Interceptor interceptor)
|
public ServerLocatorImpl addIncomingInterceptor(final Interceptor interceptor)
|
||||||
{
|
{
|
||||||
incomingInterceptors.add(interceptor);
|
incomingInterceptors.add(interceptor);
|
||||||
|
@ -1334,13 +1327,6 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@Deprecated
|
|
||||||
public boolean removeInterceptor(final Interceptor interceptor)
|
|
||||||
{
|
|
||||||
return removeIncomingInterceptor(interceptor);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean removeIncomingInterceptor(final Interceptor interceptor)
|
public boolean removeIncomingInterceptor(final Interceptor interceptor)
|
||||||
{
|
{
|
||||||
return incomingInterceptors.remove(interceptor);
|
return incomingInterceptors.remove(interceptor);
|
||||||
|
|
|
@ -37,25 +37,11 @@ public interface JMSQueueControl extends DestinationControl
|
||||||
*/
|
*/
|
||||||
String getExpiryAddress();
|
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.
|
* Returns the dead-letter address associated to this queue.
|
||||||
*/
|
*/
|
||||||
String getDeadLetterAddress();
|
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.
|
* Returns the number of scheduled messages in this queue.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -143,32 +143,17 @@ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueContro
|
||||||
return coreQueueControl.getDeadLetterAddress();
|
return coreQueueControl.getDeadLetterAddress();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDeadLetterAddress(final String deadLetterAddress) throws Exception
|
|
||||||
{
|
|
||||||
coreQueueControl.setDeadLetterAddress(deadLetterAddress);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getExpiryAddress()
|
public String getExpiryAddress()
|
||||||
{
|
{
|
||||||
return coreQueueControl.getExpiryAddress();
|
return coreQueueControl.getExpiryAddress();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setExpiryAddress(final String expiryAddress) throws Exception
|
|
||||||
{
|
|
||||||
coreQueueControl.setExpiryAddress(expiryAddress);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addBinding(String binding) throws Exception
|
public void addBinding(String binding) throws Exception
|
||||||
{
|
{
|
||||||
jmsServerManager.addQueueToBindingRegistry(managedQueue.getName(), binding);
|
jmsServerManager.addQueueToBindingRegistry(managedQueue.getName(), binding);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeBinding(String binding) throws Exception
|
|
||||||
{
|
|
||||||
jmsServerManager.removeQueueFromBindingRegistry(managedQueue.getName(), binding);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String[] getRegistryBindings()
|
public String[] getRegistryBindings()
|
||||||
{
|
{
|
||||||
return jmsServerManager.getBindingsOnQueue(managedQueue.getName());
|
return jmsServerManager.getBindingsOnQueue(managedQueue.getName());
|
||||||
|
|
|
@ -313,17 +313,6 @@ public class ConnectionFactoryProperties
|
||||||
this.clientID = clientID;
|
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()
|
public Integer getDupsOKBatchSize()
|
||||||
{
|
{
|
||||||
if (ConnectionFactoryProperties.trace)
|
if (ConnectionFactoryProperties.trace)
|
||||||
|
|
|
@ -47,43 +47,12 @@ public interface Configuration extends Serializable
|
||||||
*/
|
*/
|
||||||
Configuration setName(String name);
|
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>
|
* Returns whether this server is clustered. <br>
|
||||||
* {@code true} if {@link #getClusterConfigurations()} is not empty.
|
* {@code true} if {@link #getClusterConfigurations()} is not empty.
|
||||||
*/
|
*/
|
||||||
boolean isClustered();
|
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>
|
* Returns whether delivery count is persisted before messages are delivered to the consumers. <br>
|
||||||
* Default value is
|
* Default value is
|
||||||
|
@ -96,41 +65,6 @@ public interface Configuration extends Serializable
|
||||||
*/
|
*/
|
||||||
Configuration setPersistDeliveryCountBeforeDelivery(boolean persistDeliveryCountBeforeDelivery);
|
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>
|
* Returns whether this server is using persistence and store data. <br>
|
||||||
* Default value is {@value org.apache.activemq.api.config.ActiveMQDefaultConfiguration#DEFAULT_PERSISTENCE_ENABLED}.
|
* 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);
|
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
|
* Returns the list of interceptors classes used by this server for incoming messages (i.e. those being delivered to
|
||||||
* the server from clients).
|
* the server from clients).
|
||||||
|
@ -246,21 +169,6 @@ public interface Configuration extends Serializable
|
||||||
*/
|
*/
|
||||||
List<String> getOutgoingInterceptorClassNames();
|
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
|
* Sets the list of interceptors classes used by this server for incoming messages (i.e. those being delivered to
|
||||||
* the server from clients).
|
* the server from clients).
|
||||||
|
@ -452,30 +360,6 @@ public interface Configuration extends Serializable
|
||||||
*/
|
*/
|
||||||
String getClusterPassword();
|
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.
|
* Sets the cluster password for this server.
|
||||||
*/
|
*/
|
||||||
|
@ -897,48 +781,6 @@ public interface Configuration extends Serializable
|
||||||
*/
|
*/
|
||||||
List<ConnectorServiceConfiguration> getConnectorServiceConfigurations();
|
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
|
* The default password decoder
|
||||||
*/
|
*/
|
||||||
|
@ -959,29 +801,6 @@ public interface Configuration extends Serializable
|
||||||
*/
|
*/
|
||||||
boolean isMaskPassword();
|
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
|
* 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
|
* 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();
|
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 copy() throws Exception;
|
||||||
|
|
||||||
Configuration setJournalLockAcquisitionTimeout(long journalLockAcquisitionTimeout);
|
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.HAPolicyConfiguration;
|
||||||
import org.apache.activemq.core.config.ha.ReplicaPolicyConfiguration;
|
import org.apache.activemq.core.config.ha.ReplicaPolicyConfiguration;
|
||||||
import org.apache.activemq.core.config.ha.ReplicatedPolicyConfiguration;
|
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.security.Role;
|
||||||
import org.apache.activemq.core.server.JournalType;
|
import org.apache.activemq.core.server.JournalType;
|
||||||
import org.apache.activemq.core.server.group.impl.GroupingHandlerConfiguration;
|
import org.apache.activemq.core.server.group.impl.GroupingHandlerConfiguration;
|
||||||
|
@ -313,21 +311,6 @@ public class ConfigurationImpl implements Configuration
|
||||||
return this;
|
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()
|
public List<String> getIncomingInterceptorClassNames()
|
||||||
{
|
{
|
||||||
return incomingInterceptorClassNames;
|
return incomingInterceptorClassNames;
|
||||||
|
@ -1117,199 +1100,6 @@ public class ConfigurationImpl implements Configuration
|
||||||
return this;
|
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
|
@Override
|
||||||
public ConfigurationImpl setResolveProtocols(boolean resolveProtocols)
|
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.ConnectorServiceConfiguration;
|
||||||
import org.apache.activemq.core.config.CoreQueueConfiguration;
|
import org.apache.activemq.core.config.CoreQueueConfiguration;
|
||||||
import org.apache.activemq.core.config.DivertConfiguration;
|
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.ScaleDownConfiguration;
|
||||||
import org.apache.activemq.core.config.ha.ColocatedPolicyConfiguration;
|
import org.apache.activemq.core.config.ha.ColocatedPolicyConfiguration;
|
||||||
import org.apache.activemq.core.config.ha.LiveOnlyPolicyConfiguration;
|
import org.apache.activemq.core.config.ha.LiveOnlyPolicyConfiguration;
|
||||||
|
@ -192,253 +191,9 @@ public final class FileConfigurationParser extends XMLConfigurationUtil
|
||||||
|
|
||||||
NodeList haPolicyNodes = e.getElementsByTagName("ha-policy");
|
NodeList haPolicyNodes = e.getElementsByTagName("ha-policy");
|
||||||
|
|
||||||
boolean containsHAPolicy = false;
|
|
||||||
|
|
||||||
if (haPolicyNodes.getLength() > 0)
|
if (haPolicyNodes.getLength() > 0)
|
||||||
{
|
{
|
||||||
parseHAPolicyConfiguration((Element) haPolicyNodes.item(0), config);
|
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
|
//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()));
|
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");
|
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()
|
public String getExpiryAddress()
|
||||||
{
|
{
|
||||||
checkStarted();
|
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
|
public Map<String, Object>[] listScheduledMessages() throws Exception
|
||||||
{
|
{
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
|
|
@ -45,27 +45,6 @@
|
||||||
</xsd:annotation>
|
</xsd:annotation>
|
||||||
</xsd:element>
|
</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:element name="persistence-enabled" type="xsd:boolean" default="true" maxOccurs="1" minOccurs="0">
|
||||||
<xsd:annotation>
|
<xsd:annotation>
|
||||||
<xsd:documentation>
|
<xsd:documentation>
|
||||||
|
@ -158,38 +137,6 @@
|
||||||
</xsd:annotation>
|
</xsd:annotation>
|
||||||
</xsd:element>
|
</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"
|
<xsd:element name="password-codec" type="xsd:string"
|
||||||
default="org.apache.activemq.utils.DefaultSensitiveStringCodec" maxOccurs="1" minOccurs="0">
|
default="org.apache.activemq.utils.DefaultSensitiveStringCodec" maxOccurs="1" minOccurs="0">
|
||||||
<xsd:annotation>
|
<xsd:annotation>
|
||||||
|
@ -324,16 +271,7 @@
|
||||||
</xsd:documentation>
|
</xsd:documentation>
|
||||||
</xsd:annotation>
|
</xsd:annotation>
|
||||||
</xsd:element>
|
</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:element name="remoting-incoming-interceptors" type="class-name-sequenceType" maxOccurs="1" minOccurs="0">
|
||||||
<xsd:annotation>
|
<xsd:annotation>
|
||||||
<xsd:documentation>
|
<xsd:documentation>
|
||||||
|
@ -352,84 +290,6 @@
|
||||||
</xsd:annotation>
|
</xsd:annotation>
|
||||||
</xsd:element>
|
</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"
|
<xsd:element name="persist-delivery-count-before-delivery" type="xsd:boolean" default="false" maxOccurs="1"
|
||||||
minOccurs="0">
|
minOccurs="0">
|
||||||
<xsd:annotation>
|
<xsd:annotation>
|
||||||
|
@ -1995,13 +1855,17 @@
|
||||||
</xsd:annotation>
|
</xsd:annotation>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
<xsd:choice>
|
<xsd:choice>
|
||||||
<xsd:element name="discovery-group" type="xsd:string" minOccurs="0" maxOccurs="1">
|
<xsd:element name="discovery-group-ref" maxOccurs="1" minOccurs="0">
|
||||||
<xsd:annotation>
|
<xsd:complexType>
|
||||||
<xsd:documentation>
|
<xsd:attribute name="discovery-group-name" type="xsd:IDREF" use="required">
|
||||||
The discovery group to use for scale down, if not supplied then the scale-down-connectors or first
|
<xsd:annotation>
|
||||||
invm connector will be used
|
<xsd:documentation>
|
||||||
</xsd:documentation>
|
The discovery group to use for scale down, if not supplied then the scale-down-connectors or first
|
||||||
</xsd:annotation>
|
invm connector will be used
|
||||||
|
</xsd:documentation>
|
||||||
|
</xsd:annotation>
|
||||||
|
</xsd:attribute>
|
||||||
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
<xsd:element name="connectors" minOccurs="0" maxOccurs="1">
|
<xsd:element name="connectors" minOccurs="0" maxOccurs="1">
|
||||||
<xsd:annotation>
|
<xsd:annotation>
|
||||||
|
|
|
@ -138,8 +138,6 @@ public class FileConfigurationParserTest extends UnitTestCase
|
||||||
private static String firstPart =
|
private static String firstPart =
|
||||||
"<core xmlns=\"urn:activemq:core\">" + "\n" +
|
"<core xmlns=\"urn:activemq:core\">" + "\n" +
|
||||||
"<name>ActiveMQ.main.config</name>" + "\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" +
|
"<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" +
|
"<bindings-directory>${jboss.server.data.dir}/activemq/bindings</bindings-directory>" + "\n" +
|
||||||
"<journal-directory>${jboss.server.data.dir}/activemq/journal</journal-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;
|
LiveOnlyPolicyConfiguration lopc = (LiveOnlyPolicyConfiguration) pc;
|
||||||
assertNotNull(lopc.getScaleDownConfiguration());
|
assertNotNull(lopc.getScaleDownConfiguration());
|
||||||
assertEquals(lopc.getScaleDownConfiguration().getGroupName(), "boo!");
|
assertEquals(lopc.getScaleDownConfiguration().getGroupName(), "boo!");
|
||||||
assertEquals(lopc.getScaleDownConfiguration().getDiscoveryGroup(), "wahey");
|
assertEquals(lopc.getScaleDownConfiguration().getDiscoveryGroup(), "dg1");
|
||||||
|
|
||||||
for (ClusterConnectionConfiguration ccc : conf.getClusterConfigurations())
|
for (ClusterConnectionConfiguration ccc : conf.getClusterConfigurations())
|
||||||
{
|
{
|
||||||
|
|
|
@ -68,7 +68,6 @@ public class WrongRoleFileConfigurationParserTest extends UnitTestCase
|
||||||
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" +
|
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" +
|
||||||
"xsi:schemaLocation=\"urn:activemq /schema/activemq-configuration.xsd\">\n" +
|
"xsi:schemaLocation=\"urn:activemq /schema/activemq-configuration.xsd\">\n" +
|
||||||
"<name>ActiveMQ.main.config</name>" + "\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" +
|
"<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" +
|
"<bindings-directory>${jboss.server.data.dir}/activemq/bindings</bindings-directory>" + "\n" +
|
||||||
"<journal-directory>${jboss.server.data.dir}/activemq/journal</journal-directory>" + "\n" +
|
"<journal-directory>${jboss.server.data.dir}/activemq/journal</journal-directory>" + "\n" +
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
<core xmlns="urn:activemq:core">
|
<core xmlns="urn:activemq:core">
|
||||||
<name>SomeNameForUseOnTheApplicationServer</name>
|
<name>SomeNameForUseOnTheApplicationServer</name>
|
||||||
<resolve-protocols>false</resolve-protocols>
|
<resolve-protocols>false</resolve-protocols>
|
||||||
<clustered>true</clustered>
|
|
||||||
<check-for-live-server>false</check-for-live-server>
|
|
||||||
<persistence-enabled>false</persistence-enabled>
|
<persistence-enabled>false</persistence-enabled>
|
||||||
<scheduled-thread-pool-max-size>12345</scheduled-thread-pool-max-size>
|
<scheduled-thread-pool-max-size>12345</scheduled-thread-pool-max-size>
|
||||||
<thread-pool-max-size>54321</thread-pool-max-size>
|
<thread-pool-max-size>54321</thread-pool-max-size>
|
||||||
|
@ -34,9 +32,6 @@
|
||||||
<management-notification-address>Whatever</management-notification-address>
|
<management-notification-address>Whatever</management-notification-address>
|
||||||
<cluster-user>Frog</cluster-user>
|
<cluster-user>Frog</cluster-user>
|
||||||
<cluster-password>32a10275cf4ab4e9</cluster-password>
|
<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>
|
<password-codec>org.apache.activemq.utils.DefaultSensitiveStringCodec</password-codec>
|
||||||
<mask-password>true</mask-password>
|
<mask-password>true</mask-password>
|
||||||
<log-delegate-factory-class-name>com.foo</log-delegate-factory-class-name>
|
<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>
|
<message-expiry-thread-priority>8</message-expiry-thread-priority>
|
||||||
<id-cache-size>127</id-cache-size>
|
<id-cache-size>127</id-cache-size>
|
||||||
<persist-id-cache>true</persist-id-cache>
|
<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.TestInterceptor1</class-name>
|
||||||
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor2</class-name>
|
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor2</class-name>
|
||||||
</remoting-interceptors>
|
</remoting-incoming-interceptors>
|
||||||
<backup>true</backup>
|
<remoting-outgoing-interceptors>
|
||||||
<allow-failback>true</allow-failback>
|
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor1</class-name>
|
||||||
<backup-group-name>backupGroupName</backup-group-name>
|
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor2</class-name>
|
||||||
<scale-down-group-name>scaleDownGroupName</scale-down-group-name>
|
</remoting-outgoing-interceptors>
|
||||||
<failback-delay>15000</failback-delay>
|
|
||||||
<failover-on-shutdown>false</failover-on-shutdown>
|
|
||||||
<scale-down>false</scale-down>
|
|
||||||
<shared-store>false</shared-store>
|
|
||||||
<persist-delivery-count-before-delivery>true</persist-delivery-count-before-delivery>
|
<persist-delivery-count-before-delivery>true</persist-delivery-count-before-delivery>
|
||||||
<connectors>
|
<connectors>
|
||||||
<connector name="connector1">
|
<connector name="connector1">
|
||||||
|
@ -185,7 +176,7 @@
|
||||||
<!--a grouping of servers that can be scaled down to-->
|
<!--a grouping of servers that can be scaled down to-->
|
||||||
<group-name>boo!</group-name>
|
<group-name>boo!</group-name>
|
||||||
<!--either a discovery group-->
|
<!--either a discovery group-->
|
||||||
<discovery-group>wahey</discovery-group>
|
<discovery-group-ref discovery-group-name="dg1"/>
|
||||||
</scale-down>
|
</scale-down>
|
||||||
</live-only>
|
</live-only>
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
<management-notification-address>Whatever</management-notification-address>
|
<management-notification-address>Whatever</management-notification-address>
|
||||||
<cluster-user>Frog</cluster-user>
|
<cluster-user>Frog</cluster-user>
|
||||||
<cluster-password>Wombat</cluster-password>
|
<cluster-password>Wombat</cluster-password>
|
||||||
<replication-clustername>cluster-connection1</replication-clustername>
|
|
||||||
<jmx-management-enabled>false</jmx-management-enabled>
|
<jmx-management-enabled>false</jmx-management-enabled>
|
||||||
<jmx-domain>gro.qtenroh</jmx-domain>
|
<jmx-domain>gro.qtenroh</jmx-domain>
|
||||||
<log-delegate-factory-class-name>ocelot</log-delegate-factory-class-name>
|
<log-delegate-factory-class-name>ocelot</log-delegate-factory-class-name>
|
||||||
|
@ -45,8 +44,6 @@
|
||||||
<message-expiry-thread-priority>8</message-expiry-thread-priority>
|
<message-expiry-thread-priority>8</message-expiry-thread-priority>
|
||||||
<id-cache-size>127</id-cache-size>
|
<id-cache-size>127</id-cache-size>
|
||||||
<persist-id-cache>true</persist-id-cache>
|
<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>
|
<persist-delivery-count-before-delivery>true</persist-delivery-count-before-delivery>
|
||||||
<paging-directory>pagingdir</paging-directory>
|
<paging-directory>pagingdir</paging-directory>
|
||||||
<bindings-directory>somedir</bindings-directory>
|
<bindings-directory>somedir</bindings-directory>
|
||||||
|
@ -68,10 +65,10 @@
|
||||||
<memory-warning-threshold>95</memory-warning-threshold>
|
<memory-warning-threshold>95</memory-warning-threshold>
|
||||||
<memory-measure-interval>54321</memory-measure-interval>
|
<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.TestInterceptor1</class-name>
|
||||||
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor2</class-name>
|
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor2</class-name>
|
||||||
</remoting-interceptors>
|
</remoting-incoming-interceptors>
|
||||||
|
|
||||||
<connectors>
|
<connectors>
|
||||||
<connector name="connector1">
|
<connector name="connector1">
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
<management-notification-address>Whatever</management-notification-address>
|
<management-notification-address>Whatever</management-notification-address>
|
||||||
<cluster-user>Frog</cluster-user>
|
<cluster-user>Frog</cluster-user>
|
||||||
<cluster-password>Wombat</cluster-password>
|
<cluster-password>Wombat</cluster-password>
|
||||||
<replication-clustername>cluster-connection1</replication-clustername>
|
|
||||||
<jmx-management-enabled>false</jmx-management-enabled>
|
<jmx-management-enabled>false</jmx-management-enabled>
|
||||||
<jmx-domain>gro.qtenroh</jmx-domain>
|
<jmx-domain>gro.qtenroh</jmx-domain>
|
||||||
<log-delegate-factory-class-name>ocelot</log-delegate-factory-class-name>
|
<log-delegate-factory-class-name>ocelot</log-delegate-factory-class-name>
|
||||||
|
@ -45,8 +44,6 @@
|
||||||
<message-expiry-thread-priority>8</message-expiry-thread-priority>
|
<message-expiry-thread-priority>8</message-expiry-thread-priority>
|
||||||
<id-cache-size>127</id-cache-size>
|
<id-cache-size>127</id-cache-size>
|
||||||
<persist-id-cache>true</persist-id-cache>
|
<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>
|
<persist-delivery-count-before-delivery>true</persist-delivery-count-before-delivery>
|
||||||
<paging-directory>pagingdir</paging-directory>
|
<paging-directory>pagingdir</paging-directory>
|
||||||
<bindings-directory>somedir</bindings-directory>
|
<bindings-directory>somedir</bindings-directory>
|
||||||
|
@ -68,10 +65,10 @@
|
||||||
<memory-warning-threshold>95</memory-warning-threshold>
|
<memory-warning-threshold>95</memory-warning-threshold>
|
||||||
<memory-measure-interval>54321</memory-measure-interval>
|
<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.TestInterceptor1</class-name>
|
||||||
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor2</class-name>
|
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor2</class-name>
|
||||||
</remoting-interceptors>
|
</remoting-incoming-interceptors>
|
||||||
|
|
||||||
<connectors>
|
<connectors>
|
||||||
<connector name="connector1">
|
<connector name="connector1">
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
<management-notification-address>Whatever</management-notification-address>
|
<management-notification-address>Whatever</management-notification-address>
|
||||||
<cluster-user>Frog</cluster-user>
|
<cluster-user>Frog</cluster-user>
|
||||||
<cluster-password>Wombat</cluster-password>
|
<cluster-password>Wombat</cluster-password>
|
||||||
<replication-clustername>cluster-connection1</replication-clustername>
|
|
||||||
<jmx-management-enabled>false</jmx-management-enabled>
|
<jmx-management-enabled>false</jmx-management-enabled>
|
||||||
<jmx-domain>gro.qtenroh</jmx-domain>
|
<jmx-domain>gro.qtenroh</jmx-domain>
|
||||||
<log-delegate-factory-class-name>ocelot</log-delegate-factory-class-name>
|
<log-delegate-factory-class-name>ocelot</log-delegate-factory-class-name>
|
||||||
|
@ -45,8 +44,6 @@
|
||||||
<message-expiry-thread-priority>8</message-expiry-thread-priority>
|
<message-expiry-thread-priority>8</message-expiry-thread-priority>
|
||||||
<id-cache-size>127</id-cache-size>
|
<id-cache-size>127</id-cache-size>
|
||||||
<persist-id-cache>true</persist-id-cache>
|
<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>
|
<persist-delivery-count-before-delivery>true</persist-delivery-count-before-delivery>
|
||||||
<paging-directory>pagingdir</paging-directory>
|
<paging-directory>pagingdir</paging-directory>
|
||||||
<bindings-directory>somedir</bindings-directory>
|
<bindings-directory>somedir</bindings-directory>
|
||||||
|
@ -68,10 +65,10 @@
|
||||||
<memory-warning-threshold>95</memory-warning-threshold>
|
<memory-warning-threshold>95</memory-warning-threshold>
|
||||||
<memory-measure-interval>54321</memory-measure-interval>
|
<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.TestInterceptor1</class-name>
|
||||||
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor2</class-name>
|
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor2</class-name>
|
||||||
</remoting-interceptors>
|
</remoting-incoming-interceptors>
|
||||||
|
|
||||||
<connectors>
|
<connectors>
|
||||||
<connector name="connector1">
|
<connector name="connector1">
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
<management-notification-address>Whatever</management-notification-address>
|
<management-notification-address>Whatever</management-notification-address>
|
||||||
<cluster-user>Frog</cluster-user>
|
<cluster-user>Frog</cluster-user>
|
||||||
<cluster-password>Wombat</cluster-password>
|
<cluster-password>Wombat</cluster-password>
|
||||||
<replication-clustername>cluster-connection1</replication-clustername>
|
|
||||||
<jmx-management-enabled>false</jmx-management-enabled>
|
<jmx-management-enabled>false</jmx-management-enabled>
|
||||||
<jmx-domain>gro.qtenroh</jmx-domain>
|
<jmx-domain>gro.qtenroh</jmx-domain>
|
||||||
<log-delegate-factory-class-name>ocelot</log-delegate-factory-class-name>
|
<log-delegate-factory-class-name>ocelot</log-delegate-factory-class-name>
|
||||||
|
@ -45,8 +44,6 @@
|
||||||
<message-expiry-thread-priority>8</message-expiry-thread-priority>
|
<message-expiry-thread-priority>8</message-expiry-thread-priority>
|
||||||
<id-cache-size>127</id-cache-size>
|
<id-cache-size>127</id-cache-size>
|
||||||
<persist-id-cache>true</persist-id-cache>
|
<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>
|
<persist-delivery-count-before-delivery>true</persist-delivery-count-before-delivery>
|
||||||
<paging-directory>pagingdir</paging-directory>
|
<paging-directory>pagingdir</paging-directory>
|
||||||
<bindings-directory>somedir</bindings-directory>
|
<bindings-directory>somedir</bindings-directory>
|
||||||
|
@ -68,10 +65,10 @@
|
||||||
<memory-warning-threshold>95</memory-warning-threshold>
|
<memory-warning-threshold>95</memory-warning-threshold>
|
||||||
<memory-measure-interval>54321</memory-measure-interval>
|
<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.TestInterceptor1</class-name>
|
||||||
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor2</class-name>
|
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor2</class-name>
|
||||||
</remoting-interceptors>
|
</remoting-incoming-interceptors>
|
||||||
|
|
||||||
<connectors>
|
<connectors>
|
||||||
<connector name="connector1">
|
<connector name="connector1">
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
<management-notification-address>Whatever</management-notification-address>
|
<management-notification-address>Whatever</management-notification-address>
|
||||||
<cluster-user>Frog</cluster-user>
|
<cluster-user>Frog</cluster-user>
|
||||||
<cluster-password>Wombat</cluster-password>
|
<cluster-password>Wombat</cluster-password>
|
||||||
<replication-clustername>cluster-connection1</replication-clustername>
|
|
||||||
<jmx-management-enabled>false</jmx-management-enabled>
|
<jmx-management-enabled>false</jmx-management-enabled>
|
||||||
<jmx-domain>gro.qtenroh</jmx-domain>
|
<jmx-domain>gro.qtenroh</jmx-domain>
|
||||||
<log-delegate-factory-class-name>ocelot</log-delegate-factory-class-name>
|
<log-delegate-factory-class-name>ocelot</log-delegate-factory-class-name>
|
||||||
|
@ -45,8 +44,6 @@
|
||||||
<message-expiry-thread-priority>8</message-expiry-thread-priority>
|
<message-expiry-thread-priority>8</message-expiry-thread-priority>
|
||||||
<id-cache-size>127</id-cache-size>
|
<id-cache-size>127</id-cache-size>
|
||||||
<persist-id-cache>true</persist-id-cache>
|
<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>
|
<persist-delivery-count-before-delivery>true</persist-delivery-count-before-delivery>
|
||||||
<paging-directory>pagingdir</paging-directory>
|
<paging-directory>pagingdir</paging-directory>
|
||||||
<bindings-directory>somedir</bindings-directory>
|
<bindings-directory>somedir</bindings-directory>
|
||||||
|
@ -68,10 +65,10 @@
|
||||||
<memory-warning-threshold>95</memory-warning-threshold>
|
<memory-warning-threshold>95</memory-warning-threshold>
|
||||||
<memory-measure-interval>54321</memory-measure-interval>
|
<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.TestInterceptor1</class-name>
|
||||||
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor2</class-name>
|
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor2</class-name>
|
||||||
</remoting-interceptors>
|
</remoting-incoming-interceptors>
|
||||||
|
|
||||||
<connectors>
|
<connectors>
|
||||||
<connector name="connector1">
|
<connector name="connector1">
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
<management-notification-address>Whatever</management-notification-address>
|
<management-notification-address>Whatever</management-notification-address>
|
||||||
<cluster-user>Frog</cluster-user>
|
<cluster-user>Frog</cluster-user>
|
||||||
<cluster-password>Wombat</cluster-password>
|
<cluster-password>Wombat</cluster-password>
|
||||||
<replication-clustername>cluster-connection1</replication-clustername>
|
|
||||||
<jmx-management-enabled>false</jmx-management-enabled>
|
<jmx-management-enabled>false</jmx-management-enabled>
|
||||||
<jmx-domain>gro.qtenroh</jmx-domain>
|
<jmx-domain>gro.qtenroh</jmx-domain>
|
||||||
<log-delegate-factory-class-name>ocelot</log-delegate-factory-class-name>
|
<log-delegate-factory-class-name>ocelot</log-delegate-factory-class-name>
|
||||||
|
@ -45,8 +44,6 @@
|
||||||
<message-expiry-thread-priority>8</message-expiry-thread-priority>
|
<message-expiry-thread-priority>8</message-expiry-thread-priority>
|
||||||
<id-cache-size>127</id-cache-size>
|
<id-cache-size>127</id-cache-size>
|
||||||
<persist-id-cache>true</persist-id-cache>
|
<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>
|
<persist-delivery-count-before-delivery>true</persist-delivery-count-before-delivery>
|
||||||
<paging-directory>pagingdir</paging-directory>
|
<paging-directory>pagingdir</paging-directory>
|
||||||
<bindings-directory>somedir</bindings-directory>
|
<bindings-directory>somedir</bindings-directory>
|
||||||
|
@ -68,10 +65,10 @@
|
||||||
<memory-warning-threshold>95</memory-warning-threshold>
|
<memory-warning-threshold>95</memory-warning-threshold>
|
||||||
<memory-measure-interval>54321</memory-measure-interval>
|
<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.TestInterceptor1</class-name>
|
||||||
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor2</class-name>
|
<class-name>org.apache.activemq.tests.unit.core.config.impl.TestInterceptor2</class-name>
|
||||||
</remoting-interceptors>
|
</remoting-incoming-interceptors>
|
||||||
|
|
||||||
<connectors>
|
<connectors>
|
||||||
<connector name="connector1">
|
<connector name="connector1">
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="urn:activemq ../../../../activemq-server/src/main/resources/schema/activemq-server.xsd">
|
xsi:schemaLocation="urn:activemq ../../../../activemq-server/src/main/resources/schema/activemq-server.xsd">
|
||||||
<core xmlns="urn:activemq:core">
|
<core xmlns="urn:activemq:core">
|
||||||
|
<discovery-groups>
|
||||||
|
<discovery-group name="wahey"/>
|
||||||
|
</discovery-groups>
|
||||||
<ha-policy>
|
<ha-policy>
|
||||||
<replication>
|
<replication>
|
||||||
<colocated>
|
<colocated>
|
||||||
|
@ -41,7 +44,7 @@
|
||||||
<!--a grouping of servers that can be scaled down to-->
|
<!--a grouping of servers that can be scaled down to-->
|
||||||
<group-name>boo!</group-name>
|
<group-name>boo!</group-name>
|
||||||
<!--either a discovery group-->
|
<!--either a discovery group-->
|
||||||
<discovery-group>wahey</discovery-group>
|
<discovery-group-ref discovery-group-name="wahey"/>
|
||||||
</scale-down>
|
</scale-down>
|
||||||
</slave>
|
</slave>
|
||||||
</colocated>
|
</colocated>
|
||||||
|
|
|
@ -19,16 +19,18 @@
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="urn:activemq /schema/activemq-server.xsd">
|
xsi:schemaLocation="urn:activemq /schema/activemq-server.xsd">
|
||||||
<core xmlns="urn:activemq:core">
|
<core xmlns="urn:activemq:core">
|
||||||
|
<discovery-groups>
|
||||||
|
<discovery-group name="wahey"/>
|
||||||
|
</discovery-groups>
|
||||||
<ha-policy>
|
<ha-policy>
|
||||||
<live-only>
|
<live-only>
|
||||||
<scale-down>
|
<scale-down>
|
||||||
<!--a grouping of servers that can be scaled down to-->
|
<!--a grouping of servers that can be scaled down to-->
|
||||||
<group-name>boo!</group-name>
|
<group-name>boo!</group-name>
|
||||||
<!--either a discovery group-->
|
<!--either a discovery group-->
|
||||||
<discovery-group>wahey</discovery-group>
|
<discovery-group-ref discovery-group-name="wahey"/>
|
||||||
</scale-down>
|
</scale-down>
|
||||||
</live-only>
|
</live-only>
|
||||||
</ha-policy>
|
</ha-policy>
|
||||||
</core>
|
</core>
|
||||||
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
@ -18,8 +18,10 @@
|
||||||
xmlns="urn:activemq"
|
xmlns="urn:activemq"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="urn:activemq /schema/activemq-server.xsd">
|
xsi:schemaLocation="urn:activemq /schema/activemq-server.xsd">
|
||||||
|
|
||||||
<core xmlns="urn:activemq:core">
|
<core xmlns="urn:activemq:core">
|
||||||
|
<discovery-groups>
|
||||||
|
<discovery-group name="wahey"/>
|
||||||
|
</discovery-groups>
|
||||||
<ha-policy>
|
<ha-policy>
|
||||||
<replication>
|
<replication>
|
||||||
<slave>
|
<slave>
|
||||||
|
@ -33,11 +35,10 @@
|
||||||
<!--a grouping of servers that can be scaled down to-->
|
<!--a grouping of servers that can be scaled down to-->
|
||||||
<group-name>boo!</group-name>
|
<group-name>boo!</group-name>
|
||||||
<!--either a discovery group-->
|
<!--either a discovery group-->
|
||||||
<discovery-group>wahey</discovery-group>
|
<discovery-group-ref discovery-group-name="wahey"/>
|
||||||
</scale-down>
|
</scale-down>
|
||||||
</slave>
|
</slave>
|
||||||
</replication>
|
</replication>
|
||||||
</ha-policy>
|
</ha-policy>
|
||||||
</core>
|
</core>
|
||||||
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="urn:activemq ../../../../activemq-server/src/main/resources/schema/activemq-server.xsd">
|
xsi:schemaLocation="urn:activemq ../../../../activemq-server/src/main/resources/schema/activemq-server.xsd">
|
||||||
<core xmlns="urn:activemq:core">
|
<core xmlns="urn:activemq:core">
|
||||||
|
<discovery-groups>
|
||||||
|
<discovery-group name="wahey"/>
|
||||||
|
</discovery-groups>
|
||||||
<ha-policy>
|
<ha-policy>
|
||||||
<shared-store>
|
<shared-store>
|
||||||
<slave>
|
<slave>
|
||||||
|
@ -30,11 +33,10 @@
|
||||||
<!--a grouping of servers that can be scaled down to-->
|
<!--a grouping of servers that can be scaled down to-->
|
||||||
<group-name>boo!</group-name>
|
<group-name>boo!</group-name>
|
||||||
<!--either a discovery group-->
|
<!--either a discovery group-->
|
||||||
<discovery-group>wahey</discovery-group>
|
<discovery-group-ref discovery-group-name="wahey"/>
|
||||||
</scale-down>
|
</scale-down>
|
||||||
</slave>
|
</slave>
|
||||||
</shared-store>
|
</shared-store>
|
||||||
</ha-policy>
|
</ha-policy>
|
||||||
</core>
|
</core>
|
||||||
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
@ -554,7 +554,7 @@ this would look like:
|
||||||
<ha-policy>
|
<ha-policy>
|
||||||
<live-only>
|
<live-only>
|
||||||
<scale-down>
|
<scale-down>
|
||||||
<discovery-group>my-discovery-group</discovery-group>
|
<discovery-group-ref discovery-group-name="my-discovery-group"/>
|
||||||
</scale-down>
|
</scale-down>
|
||||||
</live-only>
|
</live-only>
|
||||||
</ha-policy>
|
</ha-policy>
|
||||||
|
@ -612,7 +612,7 @@ typical configuration would look like:
|
||||||
<!--a grouping of servers that can be scaled down to-->
|
<!--a grouping of servers that can be scaled down to-->
|
||||||
<group-name>boo!</group-name>
|
<group-name>boo!</group-name>
|
||||||
<!--either a discovery group-->
|
<!--either a discovery group-->
|
||||||
<discovery-group>wahey</discovery-group>
|
<discovery-group-ref discovery-group-name="wahey"/>
|
||||||
</scale-down>
|
</scale-down>
|
||||||
</slave>
|
</slave>
|
||||||
</colocated>
|
</colocated>
|
||||||
|
|
|
@ -667,7 +667,7 @@ public class InterceptorTest extends ServiceTestBase
|
||||||
Assert.assertEquals("orange", message.getStringProperty(InterceptorTest.key));
|
Assert.assertEquals("orange", message.getStringProperty(InterceptorTest.key));
|
||||||
}
|
}
|
||||||
|
|
||||||
sf.getServerLocator().removeInterceptor(interceptor);
|
sf.getServerLocator().removeIncomingInterceptor(interceptor);
|
||||||
|
|
||||||
for (int i = 0; i < numMessages; i++)
|
for (int i = 0; i < numMessages; i++)
|
||||||
{
|
{
|
||||||
|
@ -982,7 +982,7 @@ public class InterceptorTest extends ServiceTestBase
|
||||||
Assert.assertEquals(4, message.getIntProperty("d").intValue());
|
Assert.assertEquals(4, message.getIntProperty("d").intValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
sf.getServerLocator().removeInterceptor(interceptor2);
|
sf.getServerLocator().removeIncomingInterceptor(interceptor2);
|
||||||
|
|
||||||
for (int i = 0; i < numMessages; i++)
|
for (int i = 0; i < numMessages; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -428,7 +428,7 @@ public class HangConsumerTest extends ServiceTestBase
|
||||||
HangInterceptor hangInt = new HangInterceptor();
|
HangInterceptor hangInt = new HangInterceptor();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
locator.addInterceptor(hangInt);
|
locator.addIncomingInterceptor(hangInt);
|
||||||
|
|
||||||
ClientSessionFactory factory = locator.createSessionFactory();
|
ClientSessionFactory factory = locator.createSessionFactory();
|
||||||
ClientSession session = factory.createSession(false, false, false);
|
ClientSession session = factory.createSession(false, false, false);
|
||||||
|
|
|
@ -81,7 +81,9 @@ public class ReplicatedFailoverTest extends FailoverTest
|
||||||
|
|
||||||
crash(session);
|
crash(session);
|
||||||
|
|
||||||
liveServer.getServer().getConfiguration().setCheckForLiveServer(true);
|
ReplicatedPolicyConfiguration replicatedPolicyConfiguration = (ReplicatedPolicyConfiguration) liveServer.getServer().getConfiguration().getHAPolicyConfiguration();
|
||||||
|
|
||||||
|
replicatedPolicyConfiguration.setCheckForLiveServer(true);
|
||||||
|
|
||||||
liveServer.start();
|
liveServer.start();
|
||||||
|
|
||||||
|
@ -95,7 +97,9 @@ public class ReplicatedFailoverTest extends FailoverTest
|
||||||
|
|
||||||
crash(session);
|
crash(session);
|
||||||
|
|
||||||
liveServer.getServer().getConfiguration().setCheckForLiveServer(true);
|
replicatedPolicyConfiguration = (ReplicatedPolicyConfiguration) liveServer.getServer().getConfiguration().getHAPolicyConfiguration();
|
||||||
|
|
||||||
|
replicatedPolicyConfiguration.setCheckForLiveServer(true);
|
||||||
|
|
||||||
liveServer.start();
|
liveServer.start();
|
||||||
|
|
||||||
|
|
|
@ -439,7 +439,10 @@ public class JMSQueueControlTest extends ManagementTestBase
|
||||||
|
|
||||||
Assert.assertNull(queueControl.getExpiryAddress());
|
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());
|
Assert.assertEquals(expiryAddress, queueControl.getExpiryAddress());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -469,7 +472,11 @@ public class JMSQueueControlTest extends ManagementTestBase
|
||||||
String expiryQueueName = RandomUtil.randomString();
|
String expiryQueueName = RandomUtil.randomString();
|
||||||
ActiveMQQueue expiryQueue = (ActiveMQQueue) ActiveMQJMSClient.createQueue(expiryQueueName);
|
ActiveMQQueue expiryQueue = (ActiveMQQueue) ActiveMQJMSClient.createQueue(expiryQueueName);
|
||||||
serverManager.createQueue(false, expiryQueueName, null, true, 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);
|
JMSQueueControl expiryQueueControl = ManagementControlHelper.createJMSQueueControl(expiryQueue, mbeanServer);
|
||||||
|
|
||||||
|
@ -595,7 +602,10 @@ public class JMSQueueControlTest extends ManagementTestBase
|
||||||
|
|
||||||
Assert.assertNull(queueControl.getDeadLetterAddress());
|
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());
|
Assert.assertEquals(deadLetterAddress, queueControl.getDeadLetterAddress());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -606,6 +616,10 @@ public class JMSQueueControlTest extends ManagementTestBase
|
||||||
serverManager.createQueue(false, deadLetterQueue, null, true, deadLetterQueue);
|
serverManager.createQueue(false, deadLetterQueue, null, true, deadLetterQueue);
|
||||||
ActiveMQQueue dlq = (ActiveMQQueue) ActiveMQJMSClient.createQueue(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();
|
Connection conn = createConnection();
|
||||||
Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
||||||
MessageProducer producer = sess.createProducer(queue);
|
MessageProducer producer = sess.createProducer(queue);
|
||||||
|
@ -623,7 +637,7 @@ public class JMSQueueControlTest extends ManagementTestBase
|
||||||
Assert.assertEquals(2, getMessageCount(queueControl));
|
Assert.assertEquals(2, getMessageCount(queueControl));
|
||||||
Assert.assertEquals(0, getMessageCount(dlqControl));
|
Assert.assertEquals(0, getMessageCount(dlqControl));
|
||||||
|
|
||||||
queueControl.setDeadLetterAddress(dlq.getAddress());
|
// queueControl.setDeadLetterAddress(dlq.getAddress());
|
||||||
|
|
||||||
boolean movedToDeadLetterAddress = queueControl.sendMessageToDeadLetterAddress(message.getJMSMessageID());
|
boolean movedToDeadLetterAddress = queueControl.sendMessageToDeadLetterAddress(message.getJMSMessageID());
|
||||||
Assert.assertTrue(movedToDeadLetterAddress);
|
Assert.assertTrue(movedToDeadLetterAddress);
|
||||||
|
@ -669,6 +683,10 @@ public class JMSQueueControlTest extends ManagementTestBase
|
||||||
serverManager.createQueue(false, deadLetterQueue, null, true, deadLetterQueue);
|
serverManager.createQueue(false, deadLetterQueue, null, true, deadLetterQueue);
|
||||||
ActiveMQQueue dlq = (ActiveMQQueue) ActiveMQJMSClient.createQueue(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();
|
Connection conn = createConnection();
|
||||||
Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
||||||
|
|
||||||
|
@ -682,7 +700,7 @@ public class JMSQueueControlTest extends ManagementTestBase
|
||||||
Assert.assertEquals(2, getMessageCount(queueControl));
|
Assert.assertEquals(2, getMessageCount(queueControl));
|
||||||
Assert.assertEquals(0, getMessageCount(dlqControl));
|
Assert.assertEquals(0, getMessageCount(dlqControl));
|
||||||
|
|
||||||
queueControl.setDeadLetterAddress(dlq.getAddress());
|
// queueControl.setDeadLetterAddress(dlq.getAddress());
|
||||||
|
|
||||||
int deadMessageCount = queueControl.sendMessagesToDeadLetterAddress(filter);
|
int deadMessageCount = queueControl.sendMessagesToDeadLetterAddress(filter);
|
||||||
Assert.assertEquals(1, deadMessageCount);
|
Assert.assertEquals(1, deadMessageCount);
|
||||||
|
|
|
@ -141,7 +141,10 @@ public class QueueControlTest extends ManagementTestBase
|
||||||
session.createQueue(address, queue, null, false);
|
session.createQueue(address, queue, null, false);
|
||||||
|
|
||||||
QueueControl queueControl = createManagementControl(address, queue);
|
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());
|
Assert.assertEquals(deadLetterAddress, queueControl.getDeadLetterAddress());
|
||||||
|
|
||||||
|
@ -186,7 +189,10 @@ public class QueueControlTest extends ManagementTestBase
|
||||||
session.createQueue(address, queue, null, false);
|
session.createQueue(address, queue, null, false);
|
||||||
|
|
||||||
QueueControl queueControl = createManagementControl(address, queue);
|
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());
|
Assert.assertEquals(expiryAddress, queueControl.getExpiryAddress());
|
||||||
|
|
||||||
|
@ -1425,7 +1431,10 @@ public class QueueControlTest extends ManagementTestBase
|
||||||
Assert.assertEquals(1, messages.length);
|
Assert.assertEquals(1, messages.length);
|
||||||
long messageID = (Long) messages[0].get("messageID");
|
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);
|
boolean expired = queueControl.expireMessage(messageID);
|
||||||
Assert.assertTrue(expired);
|
Assert.assertTrue(expired);
|
||||||
Assert.assertEquals(0, getMessageCount(queueControl));
|
Assert.assertEquals(0, getMessageCount(queueControl));
|
||||||
|
@ -1464,7 +1473,9 @@ public class QueueControlTest extends ManagementTestBase
|
||||||
Assert.assertEquals(2, messages.length);
|
Assert.assertEquals(2, messages.length);
|
||||||
long messageID = (Long) messages[0].get("messageID");
|
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));
|
Assert.assertEquals(0, getMessageCount(deadLetterQueueControl));
|
||||||
boolean movedToDeadLetterAddress = queueControl.sendMessageToDeadLetterAddress(messageID);
|
boolean movedToDeadLetterAddress = queueControl.sendMessageToDeadLetterAddress(messageID);
|
||||||
|
|
Loading…
Reference in New Issue