This closes #3669
This commit is contained in:
commit
1f0af07871
File diff suppressed because it is too large
Load Diff
|
@ -107,7 +107,7 @@ public abstract class AbstractControl extends StandardMBean {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MBeanInfo getMBeanInfo() {
|
public MBeanInfo getMBeanInfo() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getMBeanInfo(this);
|
AuditLogger.getMBeanInfo(this);
|
||||||
}
|
}
|
||||||
MBeanInfo info = super.getMBeanInfo();
|
MBeanInfo info = super.getMBeanInfo();
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class AcceptorControlImpl extends AbstractControl implements AcceptorCont
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getFactoryClassName() {
|
public String getFactoryClassName() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getFactoryClassName(this.acceptor);
|
AuditLogger.getFactoryClassName(this.acceptor);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -66,7 +66,7 @@ public class AcceptorControlImpl extends AbstractControl implements AcceptorCont
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getName(this.acceptor);
|
AuditLogger.getName(this.acceptor);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -79,7 +79,7 @@ public class AcceptorControlImpl extends AbstractControl implements AcceptorCont
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> getParameters() {
|
public Map<String, Object> getParameters() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getParameters(this.acceptor);
|
AuditLogger.getParameters(this.acceptor);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -98,7 +98,7 @@ public class AcceptorControlImpl extends AbstractControl implements AcceptorCont
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reload() {
|
public void reload() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.reload(this.acceptor);
|
AuditLogger.reload(this.acceptor);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -111,7 +111,7 @@ public class AcceptorControlImpl extends AbstractControl implements AcceptorCont
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isStarted() {
|
public boolean isStarted() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isStarted(this.acceptor);
|
AuditLogger.isStarted(this.acceptor);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -124,7 +124,7 @@ public class AcceptorControlImpl extends AbstractControl implements AcceptorCont
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void start() throws Exception {
|
public void start() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.startAcceptor(this.acceptor);
|
AuditLogger.startAcceptor(this.acceptor);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -137,7 +137,7 @@ public class AcceptorControlImpl extends AbstractControl implements AcceptorCont
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void stop() throws Exception {
|
public void stop() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.stopAcceptor(this.acceptor);
|
AuditLogger.stopAcceptor(this.acceptor);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -99,7 +99,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getRoutingTypes() {
|
public String[] getRoutingTypes() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getRoutingTypes(this.addressInfo);
|
AuditLogger.getRoutingTypes(this.addressInfo);
|
||||||
}
|
}
|
||||||
EnumSet<RoutingType> routingTypes = addressInfo.getRoutingTypes();
|
EnumSet<RoutingType> routingTypes = addressInfo.getRoutingTypes();
|
||||||
|
@ -113,7 +113,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRoutingTypesAsJSON() throws Exception {
|
public String getRoutingTypesAsJSON() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getRoutingTypesAsJSON(this.addressInfo);
|
AuditLogger.getRoutingTypesAsJSON(this.addressInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
}
|
}
|
||||||
|
|
||||||
private String[] getQueueNames(SearchType searchType) throws Exception {
|
private String[] getQueueNames(SearchType searchType) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getQueueNames(this.addressInfo, searchType);
|
AuditLogger.getQueueNames(this.addressInfo, searchType);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -177,7 +177,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getBindingNames() throws Exception {
|
public String[] getBindingNames() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getBindingNames(this.addressInfo);
|
AuditLogger.getBindingNames(this.addressInfo);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
@ -203,7 +203,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object[] getRoles() throws Exception {
|
public Object[] getRoles() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getRoles(this.addressInfo);
|
AuditLogger.getRoles(this.addressInfo);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -224,7 +224,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRolesAsJSON() throws Exception {
|
public String getRolesAsJSON() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getRolesAsJSON(this.addressInfo);
|
AuditLogger.getRolesAsJSON(this.addressInfo);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -243,7 +243,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getNumberOfBytesPerPage() throws Exception {
|
public long getNumberOfBytesPerPage() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getNumberOfBytesPerPage(this.addressInfo);
|
AuditLogger.getNumberOfBytesPerPage(this.addressInfo);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -264,7 +264,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getAddressSize() {
|
public long getAddressSize() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getAddressSize(this.addressInfo);
|
AuditLogger.getAddressSize(this.addressInfo);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -284,7 +284,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getNumberOfMessages() throws Exception {
|
public long getNumberOfMessages() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getNumberOfMessages(this.addressInfo);
|
AuditLogger.getNumberOfMessages(this.addressInfo);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -308,7 +308,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isPaging() throws Exception {
|
public boolean isPaging() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isPaging(this.addressInfo);
|
AuditLogger.isPaging(this.addressInfo);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -325,7 +325,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getNumberOfPages() {
|
public int getNumberOfPages() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getNumberOfPages(this.addressInfo);
|
AuditLogger.getNumberOfPages(this.addressInfo);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -347,7 +347,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getMessageCount() {
|
public long getMessageCount() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getMessageCount(this.addressInfo);
|
AuditLogger.getMessageCount(this.addressInfo);
|
||||||
}
|
}
|
||||||
return getMessageCount(DurabilityType.ALL);
|
return getMessageCount(DurabilityType.ALL);
|
||||||
|
@ -355,7 +355,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getRoutedMessageCount() {
|
public long getRoutedMessageCount() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getRoutedMessageCount(this.addressInfo);
|
AuditLogger.getRoutedMessageCount(this.addressInfo);
|
||||||
}
|
}
|
||||||
return addressInfo.getRoutedMessageCount();
|
return addressInfo.getRoutedMessageCount();
|
||||||
|
@ -363,7 +363,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getUnRoutedMessageCount() {
|
public long getUnRoutedMessageCount() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getUnRoutedMessageCount(this.addressInfo);
|
AuditLogger.getUnRoutedMessageCount(this.addressInfo);
|
||||||
}
|
}
|
||||||
return addressInfo.getUnRoutedMessageCount();
|
return addressInfo.getUnRoutedMessageCount();
|
||||||
|
@ -377,8 +377,8 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
boolean durable,
|
boolean durable,
|
||||||
final String user,
|
final String user,
|
||||||
final String password) throws Exception {
|
final String password) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.sendMessage(this, null, headers, type, body, durable, user, "****");
|
AuditLogger.sendMessageThroughManagement(this, headers, type, body, durable, user, "****");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
return sendMessage(addressInfo.getName(), server, headers, type, body, durable, user, password);
|
return sendMessage(addressInfo.getName(), server, headers, type, body, durable, user, password);
|
||||||
|
@ -406,7 +406,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void pause(boolean persist) {
|
public void pause(boolean persist) {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.pause(addressInfo);
|
AuditLogger.pause(addressInfo);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -432,7 +432,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void resume() {
|
public void resume() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.resume(addressInfo);
|
AuditLogger.resume(addressInfo);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -457,7 +457,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isPaused() {
|
public boolean isPaused() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isPaused(this.addressInfo);
|
AuditLogger.isPaused(this.addressInfo);
|
||||||
}
|
}
|
||||||
return addressInfo.isPaused();
|
return addressInfo.isPaused();
|
||||||
|
@ -465,7 +465,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isRetroactiveResource() {
|
public boolean isRetroactiveResource() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isRetroactiveResource(this.addressInfo);
|
AuditLogger.isRetroactiveResource(this.addressInfo);
|
||||||
}
|
}
|
||||||
return ResourceNames.isRetroactiveResource(server.getInternalNamingPrefix(), addressInfo.getName());
|
return ResourceNames.isRetroactiveResource(server.getInternalNamingPrefix(), addressInfo.getName());
|
||||||
|
@ -473,7 +473,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getCurrentDuplicateIdCacheSize() {
|
public long getCurrentDuplicateIdCacheSize() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getCurrentDuplicateIdCacheSize(this.addressInfo);
|
AuditLogger.getCurrentDuplicateIdCacheSize(this.addressInfo);
|
||||||
}
|
}
|
||||||
DuplicateIDCache cache = ((PostOfficeImpl)server.getPostOffice()).getDuplicateIDCaches().get(addressInfo.getName());
|
DuplicateIDCache cache = ((PostOfficeImpl)server.getPostOffice()).getDuplicateIDCaches().get(addressInfo.getName());
|
||||||
|
@ -490,7 +490,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean clearDuplicateIdCache() {
|
public boolean clearDuplicateIdCache() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.clearDuplicateIdCache(this.addressInfo);
|
AuditLogger.clearDuplicateIdCache(this.addressInfo);
|
||||||
}
|
}
|
||||||
DuplicateIDCache cache = ((PostOfficeImpl)server.getPostOffice()).getDuplicateIDCaches().get(addressInfo.getName());
|
DuplicateIDCache cache = ((PostOfficeImpl)server.getPostOffice()).getDuplicateIDCaches().get(addressInfo.getName());
|
||||||
|
@ -508,7 +508,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isAutoCreated() {
|
public boolean isAutoCreated() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isAutoCreated(this.addressInfo);
|
AuditLogger.isAutoCreated(this.addressInfo);
|
||||||
}
|
}
|
||||||
return addressInfo.isAutoCreated();
|
return addressInfo.isAutoCreated();
|
||||||
|
@ -516,7 +516,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isInternal() {
|
public boolean isInternal() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isInternal(this.addressInfo);
|
AuditLogger.isInternal(this.addressInfo);
|
||||||
}
|
}
|
||||||
return addressInfo.isInternal();
|
return addressInfo.isInternal();
|
||||||
|
@ -524,7 +524,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isTemporary() {
|
public boolean isTemporary() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isTemporary(this.addressInfo);
|
AuditLogger.isTemporary(this.addressInfo);
|
||||||
}
|
}
|
||||||
return addressInfo.isTemporary();
|
return addressInfo.isTemporary();
|
||||||
|
|
|
@ -62,7 +62,7 @@ public class BaseBroadcastGroupControlImpl extends AbstractControl implements Ba
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getName(this.broadcastGroup);
|
AuditLogger.getName(this.broadcastGroup);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -75,7 +75,7 @@ public class BaseBroadcastGroupControlImpl extends AbstractControl implements Ba
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getBroadcastPeriod() {
|
public long getBroadcastPeriod() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getBroadcastPeriod(this.broadcastGroup);
|
AuditLogger.getBroadcastPeriod(this.broadcastGroup);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -88,7 +88,7 @@ public class BaseBroadcastGroupControlImpl extends AbstractControl implements Ba
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object[] getConnectorPairs() {
|
public Object[] getConnectorPairs() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getConnectorPairs(this.broadcastGroup);
|
AuditLogger.getConnectorPairs(this.broadcastGroup);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -107,7 +107,7 @@ public class BaseBroadcastGroupControlImpl extends AbstractControl implements Ba
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getConnectorPairsAsJSON() throws Exception {
|
public String getConnectorPairsAsJSON() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getConnectorPairsAsJSON(this.broadcastGroup);
|
AuditLogger.getConnectorPairsAsJSON(this.broadcastGroup);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -122,7 +122,7 @@ public class BaseBroadcastGroupControlImpl extends AbstractControl implements Ba
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isStarted() {
|
public boolean isStarted() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isStarted(this.broadcastGroup);
|
AuditLogger.isStarted(this.broadcastGroup);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -135,7 +135,7 @@ public class BaseBroadcastGroupControlImpl extends AbstractControl implements Ba
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void start() throws Exception {
|
public void start() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.startBroadcastGroup(this.broadcastGroup);
|
AuditLogger.startBroadcastGroup(this.broadcastGroup);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -148,7 +148,7 @@ public class BaseBroadcastGroupControlImpl extends AbstractControl implements Ba
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void stop() throws Exception {
|
public void stop() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.stopBroadcastGroup(this.broadcastGroup);
|
AuditLogger.stopBroadcastGroup(this.broadcastGroup);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getStaticConnectors() throws Exception {
|
public String[] getStaticConnectors() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getStaticConnectors(this.bridge);
|
AuditLogger.getStaticConnectors(this.bridge);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -69,7 +69,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getForwardingAddress() {
|
public String getForwardingAddress() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getForwardingAddress(this.bridge);
|
AuditLogger.getForwardingAddress(this.bridge);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -82,7 +82,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getQueueName() {
|
public String getQueueName() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getQueueName(this.bridge);
|
AuditLogger.getQueueName(this.bridge);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -95,7 +95,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDiscoveryGroupName() {
|
public String getDiscoveryGroupName() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getDiscoveryGroupName(this.bridge);
|
AuditLogger.getDiscoveryGroupName(this.bridge);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -108,7 +108,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getFilterString() {
|
public String getFilterString() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getFilterString(this.bridge);
|
AuditLogger.getFilterString(this.bridge);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -121,7 +121,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getReconnectAttempts() {
|
public int getReconnectAttempts() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getReconnectAttempts(this.bridge);
|
AuditLogger.getReconnectAttempts(this.bridge);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -134,7 +134,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getName(this.bridge);
|
AuditLogger.getName(this.bridge);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -147,7 +147,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getRetryInterval() {
|
public long getRetryInterval() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getRetryInterval(this.bridge);
|
AuditLogger.getRetryInterval(this.bridge);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -160,7 +160,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double getRetryIntervalMultiplier() {
|
public double getRetryIntervalMultiplier() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getRetryIntervalMultiplier(this.bridge);
|
AuditLogger.getRetryIntervalMultiplier(this.bridge);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -173,7 +173,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTransformerClassName() {
|
public String getTransformerClassName() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getTransformerClassName(this.bridge);
|
AuditLogger.getTransformerClassName(this.bridge);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -186,7 +186,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTransformerPropertiesAsJSON() {
|
public String getTransformerPropertiesAsJSON() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getTransformerPropertiesAsJSON(this.bridge);
|
AuditLogger.getTransformerPropertiesAsJSON(this.bridge);
|
||||||
}
|
}
|
||||||
return JsonUtil.toJsonObject(getTransformerProperties()).toString();
|
return JsonUtil.toJsonObject(getTransformerProperties()).toString();
|
||||||
|
@ -194,7 +194,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> getTransformerProperties() {
|
public Map<String, String> getTransformerProperties() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getTransformerProperties(this.bridge);
|
AuditLogger.getTransformerProperties(this.bridge);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -207,7 +207,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isStarted() {
|
public boolean isStarted() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isStartedBridge(this.bridge);
|
AuditLogger.isStartedBridge(this.bridge);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -220,7 +220,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isUseDuplicateDetection() {
|
public boolean isUseDuplicateDetection() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isUseDuplicateDetection(this.bridge);
|
AuditLogger.isUseDuplicateDetection(this.bridge);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -233,7 +233,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isHA() {
|
public boolean isHA() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isHA(this.bridge);
|
AuditLogger.isHA(this.bridge);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -246,7 +246,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void start() throws Exception {
|
public void start() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.startBridge(this.bridge);
|
AuditLogger.startBridge(this.bridge);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -259,7 +259,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void stop() throws Exception {
|
public void stop() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.stopBridge(this.bridge);
|
AuditLogger.stopBridge(this.bridge);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -283,7 +283,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getMessagesPendingAcknowledgement() {
|
public long getMessagesPendingAcknowledgement() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getMessagesPendingAcknowledgement(this.bridge);
|
AuditLogger.getMessagesPendingAcknowledgement(this.bridge);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -296,7 +296,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getMessagesAcknowledged() {
|
public long getMessagesAcknowledged() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getMessagesAcknowledged(this.bridge);
|
AuditLogger.getMessagesAcknowledged(this.bridge);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -309,7 +309,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> getMetrics() {
|
public Map<String, Object> getMetrics() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getMetrics(this.bridge);
|
AuditLogger.getMetrics(this.bridge);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class BroadcastGroupControlImpl extends BaseBroadcastGroupControlImpl imp
|
||||||
//todo ghoward we should deal with this properly
|
//todo ghoward we should deal with this properly
|
||||||
@Override
|
@Override
|
||||||
public String getGroupAddress() throws Exception {
|
public String getGroupAddress() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getGroupAddress(this.getBroadcastGroup());
|
AuditLogger.getGroupAddress(this.getBroadcastGroup());
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -61,7 +61,7 @@ public class BroadcastGroupControlImpl extends BaseBroadcastGroupControlImpl imp
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getGroupPort() throws Exception {
|
public int getGroupPort() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getGroupPort(this.getBroadcastGroup());
|
AuditLogger.getGroupPort(this.getBroadcastGroup());
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -74,7 +74,7 @@ public class BroadcastGroupControlImpl extends BaseBroadcastGroupControlImpl imp
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getLocalBindPort() throws Exception {
|
public int getLocalBindPort() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getLocalBindPort(this.getBroadcastGroup());
|
AuditLogger.getLocalBindPort(this.getBroadcastGroup());
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getAddress() {
|
public String getAddress() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getAddress(this.clusterConnection);
|
AuditLogger.getAddress(this.clusterConnection);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -70,7 +70,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDiscoveryGroupName() {
|
public String getDiscoveryGroupName() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getDiscoveryGroupName(this.clusterConnection);
|
AuditLogger.getDiscoveryGroupName(this.clusterConnection);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -84,7 +84,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxHops() {
|
public int getMaxHops() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getMaxHops(this.clusterConnection);
|
AuditLogger.getMaxHops(this.clusterConnection);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -98,7 +98,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getName(this.clusterConnection);
|
AuditLogger.getName(this.clusterConnection);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -112,7 +112,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getRetryInterval() {
|
public long getRetryInterval() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getRetryInterval(this.clusterConnection);
|
AuditLogger.getRetryInterval(this.clusterConnection);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -126,7 +126,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getNodeID() {
|
public String getNodeID() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getNodeID(this.clusterConnection);
|
AuditLogger.getNodeID(this.clusterConnection);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -139,7 +139,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getStaticConnectors() {
|
public String[] getStaticConnectors() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getStaticConnectors(this.clusterConnection);
|
AuditLogger.getStaticConnectors(this.clusterConnection);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -157,7 +157,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getStaticConnectorsAsJSON() throws Exception {
|
public String getStaticConnectorsAsJSON() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getStaticConnectorsAsJSON(this.clusterConnection);
|
AuditLogger.getStaticConnectorsAsJSON(this.clusterConnection);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -170,7 +170,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isDuplicateDetection() {
|
public boolean isDuplicateDetection() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isDuplicateDetection(this.clusterConnection);
|
AuditLogger.isDuplicateDetection(this.clusterConnection);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -183,7 +183,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getMessageLoadBalancingType() {
|
public String getMessageLoadBalancingType() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getMessageLoadBalancingType(this.clusterConnection);
|
AuditLogger.getMessageLoadBalancingType(this.clusterConnection);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -196,7 +196,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTopology() {
|
public String getTopology() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getTopology(this.clusterConnection);
|
AuditLogger.getTopology(this.clusterConnection);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -209,7 +209,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> getNodes() throws Exception {
|
public Map<String, String> getNodes() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getNodes(this.clusterConnection);
|
AuditLogger.getNodes(this.clusterConnection);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -222,7 +222,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isStarted() {
|
public boolean isStarted() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isStarted(this.clusterConnection);
|
AuditLogger.isStarted(this.clusterConnection);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -235,7 +235,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void start() throws Exception {
|
public void start() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.startClusterConnection(this.clusterConnection);
|
AuditLogger.startClusterConnection(this.clusterConnection);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -249,7 +249,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void stop() throws Exception {
|
public void stop() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.stopClusterConnection(this.clusterConnection);
|
AuditLogger.stopClusterConnection(this.clusterConnection);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -273,7 +273,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getMessagesPendingAcknowledgement() {
|
public long getMessagesPendingAcknowledgement() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getMessagesPendingAcknowledgement(this.clusterConnection);
|
AuditLogger.getMessagesPendingAcknowledgement(this.clusterConnection);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -286,7 +286,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getMessagesAcknowledged() {
|
public long getMessagesAcknowledged() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getMessagesAcknowledged(this.clusterConnection);
|
AuditLogger.getMessagesAcknowledged(this.clusterConnection);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -299,7 +299,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> getMetrics() {
|
public Map<String, Object> getMetrics() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getMetrics(this.clusterConnection);
|
AuditLogger.getMetrics(this.clusterConnection);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -312,7 +312,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> getBridgeMetrics(String nodeId) {
|
public Map<String, Object> getBridgeMetrics(String nodeId) {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getBridgeMetrics(this.clusterConnection, nodeId);
|
AuditLogger.getBridgeMetrics(this.clusterConnection, nodeId);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
|
|
@ -58,7 +58,7 @@ public class DivertControlImpl extends AbstractControl implements DivertControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getAddress() {
|
public String getAddress() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getAddress(this.divert);
|
AuditLogger.getAddress(this.divert);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -71,7 +71,7 @@ public class DivertControlImpl extends AbstractControl implements DivertControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getFilter() {
|
public String getFilter() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getFilter(this.divert);
|
AuditLogger.getFilter(this.divert);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -85,7 +85,7 @@ public class DivertControlImpl extends AbstractControl implements DivertControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getForwardingAddress() {
|
public String getForwardingAddress() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getForwardingAddress(this.divert);
|
AuditLogger.getForwardingAddress(this.divert);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -98,7 +98,7 @@ public class DivertControlImpl extends AbstractControl implements DivertControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRoutingName() {
|
public String getRoutingName() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getRoutingName(this.divert);
|
AuditLogger.getRoutingName(this.divert);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -111,7 +111,7 @@ public class DivertControlImpl extends AbstractControl implements DivertControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTransformerClassName() {
|
public String getTransformerClassName() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getTransformerClassName(this.divert);
|
AuditLogger.getTransformerClassName(this.divert);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -126,7 +126,7 @@ public class DivertControlImpl extends AbstractControl implements DivertControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTransformerPropertiesAsJSON() {
|
public String getTransformerPropertiesAsJSON() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getTransformerPropertiesAsJSON(this.divert);
|
AuditLogger.getTransformerPropertiesAsJSON(this.divert);
|
||||||
}
|
}
|
||||||
return JsonUtil.toJsonObject(getTransformerProperties()).toString();
|
return JsonUtil.toJsonObject(getTransformerProperties()).toString();
|
||||||
|
@ -134,7 +134,7 @@ public class DivertControlImpl extends AbstractControl implements DivertControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> getTransformerProperties() {
|
public Map<String, String> getTransformerProperties() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getTransformerProperties(this.divert);
|
AuditLogger.getTransformerProperties(this.divert);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -149,7 +149,7 @@ public class DivertControlImpl extends AbstractControl implements DivertControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRoutingType() {
|
public String getRoutingType() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getRoutingType(this.divert);
|
AuditLogger.getRoutingType(this.divert);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -162,7 +162,7 @@ public class DivertControlImpl extends AbstractControl implements DivertControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUniqueName() {
|
public String getUniqueName() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getUniqueName(this.divert);
|
AuditLogger.getUniqueName(this.divert);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -175,7 +175,7 @@ public class DivertControlImpl extends AbstractControl implements DivertControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isExclusive() {
|
public boolean isExclusive() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isExclusive(this.divert);
|
AuditLogger.isExclusive(this.divert);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -188,7 +188,7 @@ public class DivertControlImpl extends AbstractControl implements DivertControl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isRetroactiveResource() {
|
public boolean isRetroactiveResource() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isRetroactiveResource(this.divert);
|
AuditLogger.isRetroactiveResource(this.divert);
|
||||||
}
|
}
|
||||||
return ResourceNames.isRetroactiveResource(internalNamingPrefix, divert.getUniqueName());
|
return ResourceNames.isRetroactiveResource(internalNamingPrefix, divert.getUniqueName());
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class JGroupsChannelBroadcastGroupControlImpl extends BaseBroadcastGroupC
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getChannelName() throws Exception {
|
public String getChannelName() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getChannelName(this.endpointFactory.getChannelName());
|
AuditLogger.getChannelName(this.endpointFactory.getChannelName());
|
||||||
}
|
}
|
||||||
return endpointFactory.getChannelName();
|
return endpointFactory.getChannelName();
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class JGroupsFileBroadcastGroupControlImpl extends BaseBroadcastGroupCont
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getFileContents() throws Exception {
|
public String getFileContents() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getFileContents(this.getBroadcastGroup());
|
AuditLogger.getFileContents(this.getBroadcastGroup());
|
||||||
}
|
}
|
||||||
URL resource = this.getClass().getClassLoader().getResource(this.getFile());
|
URL resource = this.getClass().getClassLoader().getResource(this.getFile());
|
||||||
|
@ -62,7 +62,7 @@ public class JGroupsFileBroadcastGroupControlImpl extends BaseBroadcastGroupCont
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getChannelName() {
|
public String getChannelName() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getChannelName(this.getBroadcastGroup());
|
AuditLogger.getChannelName(this.getBroadcastGroup());
|
||||||
}
|
}
|
||||||
return endpointFactory.getChannelName();
|
return endpointFactory.getChannelName();
|
||||||
|
@ -70,7 +70,7 @@ public class JGroupsFileBroadcastGroupControlImpl extends BaseBroadcastGroupCont
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getFile() {
|
public String getFile() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getFile(this.getBroadcastGroup());
|
AuditLogger.getFile(this.getBroadcastGroup());
|
||||||
}
|
}
|
||||||
return endpointFactory.getFile();
|
return endpointFactory.getFile();
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class JGroupsPropertiesBroadcastGroupControlImpl extends BaseBroadcastGro
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getChannelName() throws Exception {
|
public String getChannelName() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getChannelName(this.endpointFactory.getChannelName());
|
AuditLogger.getChannelName(this.endpointFactory.getChannelName());
|
||||||
}
|
}
|
||||||
return endpointFactory.getChannelName();
|
return endpointFactory.getChannelName();
|
||||||
|
|
|
@ -136,7 +136,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getName(queue);
|
AuditLogger.getName(queue);
|
||||||
}
|
}
|
||||||
clearIO();
|
clearIO();
|
||||||
|
@ -149,7 +149,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getAddress() {
|
public String getAddress() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getAddress(queue);
|
AuditLogger.getAddress(queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getFilter() {
|
public String getFilter() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getFilter(queue);
|
AuditLogger.getFilter(queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
@Override
|
@Override
|
||||||
public boolean isDurable() {
|
public boolean isDurable() {
|
||||||
|
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isDurable(queue);
|
AuditLogger.isDurable(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -194,7 +194,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUser() {
|
public String getUser() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getUser(queue);
|
AuditLogger.getUser(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -211,7 +211,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRoutingType() {
|
public String getRoutingType() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getRoutingType(queue);
|
AuditLogger.getRoutingType(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -227,7 +227,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isTemporary() {
|
public boolean isTemporary() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isTemporary(queue);
|
AuditLogger.isTemporary(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -242,7 +242,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isRetroactiveResource() {
|
public boolean isRetroactiveResource() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isRetroactiveResource(queue);
|
AuditLogger.isRetroactiveResource(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -257,7 +257,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getMessageCount() {
|
public long getMessageCount() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getMessageCount(queue);
|
AuditLogger.getMessageCount(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -272,7 +272,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getPersistentSize() {
|
public long getPersistentSize() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getPersistentSize(queue);
|
AuditLogger.getPersistentSize(queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -288,7 +288,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getDurableMessageCount() {
|
public long getDurableMessageCount() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getDurableMessageCount(queue);
|
AuditLogger.getDurableMessageCount(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -303,7 +303,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getDurablePersistentSize() {
|
public long getDurablePersistentSize() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getDurablePersistSize(queue);
|
AuditLogger.getDurablePersistSize(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -318,7 +318,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getConsumerCount() {
|
public int getConsumerCount() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getConsumerCount(queue);
|
AuditLogger.getConsumerCount(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -333,7 +333,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getDeliveringCount() {
|
public int getDeliveringCount() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getDeliveringCount(queue);
|
AuditLogger.getDeliveringCount(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -348,7 +348,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getDeliveringSize() {
|
public long getDeliveringSize() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getDeliveringSize(queue);
|
AuditLogger.getDeliveringSize(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -363,7 +363,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getDurableDeliveringCount() {
|
public int getDurableDeliveringCount() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getDurableDeliveringCount(queue);
|
AuditLogger.getDurableDeliveringCount(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -378,7 +378,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getDurableDeliveringSize() {
|
public long getDurableDeliveringSize() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getDurableDeliveringSize(queue);
|
AuditLogger.getDurableDeliveringSize(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -393,7 +393,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getMessagesAdded() {
|
public long getMessagesAdded() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getMessagesAdded(queue);
|
AuditLogger.getMessagesAdded(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -408,7 +408,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getMessagesAcknowledged() {
|
public long getMessagesAcknowledged() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getMessagesAcknowledged(queue);
|
AuditLogger.getMessagesAcknowledged(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -423,7 +423,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getAcknowledgeAttempts() {
|
public long getAcknowledgeAttempts() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getMessagesAcknowledged(queue);
|
AuditLogger.getMessagesAcknowledged(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -438,7 +438,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getMessagesExpired() {
|
public long getMessagesExpired() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getMessagesExpired(queue);
|
AuditLogger.getMessagesExpired(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -453,7 +453,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getMessagesKilled() {
|
public long getMessagesKilled() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getMessagesKilled(queue);
|
AuditLogger.getMessagesKilled(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -468,7 +468,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getID() {
|
public long getID() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getID(queue);
|
AuditLogger.getID(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -483,7 +483,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getScheduledCount() {
|
public long getScheduledCount() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getScheduledCount(queue);
|
AuditLogger.getScheduledCount(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -498,7 +498,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getScheduledSize() {
|
public long getScheduledSize() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getScheduledSize(queue);
|
AuditLogger.getScheduledSize(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -513,7 +513,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getDurableScheduledCount() {
|
public long getDurableScheduledCount() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getDurableScheduledCount(queue);
|
AuditLogger.getDurableScheduledCount(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -528,7 +528,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getDurableScheduledSize() {
|
public long getDurableScheduledSize() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getDurableScheduledSize(queue);
|
AuditLogger.getDurableScheduledSize(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -543,7 +543,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDeadLetterAddress() {
|
public String getDeadLetterAddress() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getDeadLetterAddress(queue);
|
AuditLogger.getDeadLetterAddress(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -563,7 +563,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getExpiryAddress() {
|
public String getExpiryAddress() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getExpiryAddress(queue);
|
AuditLogger.getExpiryAddress(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -584,7 +584,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxConsumers() {
|
public int getMaxConsumers() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getMaxConsumers(queue);
|
AuditLogger.getMaxConsumers(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -599,7 +599,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isPurgeOnNoConsumers() {
|
public boolean isPurgeOnNoConsumers() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isPurgeOnNoConsumers(queue);
|
AuditLogger.isPurgeOnNoConsumers(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -614,7 +614,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void disable() throws Exception {
|
public void disable() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.disable(queue);
|
AuditLogger.disable(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -629,7 +629,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void enable() throws Exception {
|
public void enable() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.enable(queue);
|
AuditLogger.enable(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -644,7 +644,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled() {
|
public boolean isEnabled() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isEnabled(queue);
|
AuditLogger.isEnabled(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -660,7 +660,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isConfigurationManaged() {
|
public boolean isConfigurationManaged() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isConfigurationManaged(queue);
|
AuditLogger.isConfigurationManaged(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -675,7 +675,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isExclusive() {
|
public boolean isExclusive() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isExclusive(queue);
|
AuditLogger.isExclusive(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -690,7 +690,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isLastValue() {
|
public boolean isLastValue() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isLastValue(queue);
|
AuditLogger.isLastValue(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -705,7 +705,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getLastValueKey() {
|
public String getLastValueKey() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.lastValueKey(queue);
|
AuditLogger.lastValueKey(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -724,7 +724,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getConsumersBeforeDispatch() {
|
public int getConsumersBeforeDispatch() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.consumersBeforeDispatch(queue);
|
AuditLogger.consumersBeforeDispatch(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -739,7 +739,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getDelayBeforeDispatch() {
|
public long getDelayBeforeDispatch() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.delayBeforeDispatch(queue);
|
AuditLogger.delayBeforeDispatch(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -754,7 +754,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object>[] listScheduledMessages() throws Exception {
|
public Map<String, Object>[] listScheduledMessages() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.listScheduledMessages(queue);
|
AuditLogger.listScheduledMessages(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -770,7 +770,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String listScheduledMessagesAsJSON() throws Exception {
|
public String listScheduledMessagesAsJSON() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.listScheduledMessagesAsJSON(queue);
|
AuditLogger.listScheduledMessagesAsJSON(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -800,7 +800,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Map<String, Object>[]> listDeliveringMessages() throws ActiveMQException {
|
public Map<String, Map<String, Object>[]> listDeliveringMessages() throws ActiveMQException {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.listDeliveringMessages(queue);
|
AuditLogger.listDeliveringMessages(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -823,7 +823,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String listDeliveringMessagesAsJSON() throws Exception {
|
public String listDeliveringMessagesAsJSON() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.listDeliveringMessagesAsJSON(queue);
|
AuditLogger.listDeliveringMessagesAsJSON(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -838,7 +838,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object>[] listMessages(final String filterStr) throws Exception {
|
public Map<String, Object>[] listMessages(final String filterStr) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.listMessages(queue, filterStr);
|
AuditLogger.listMessages(queue, filterStr);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -875,7 +875,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String listMessagesAsJSON(final String filter) throws Exception {
|
public String listMessagesAsJSON(final String filter) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.listMessagesAsJSON(queue);
|
AuditLogger.listMessagesAsJSON(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -889,7 +889,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Map<String, Object>[] getFirstMessage() throws Exception {
|
protected Map<String, Object>[] getFirstMessage() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getFirstMessage(queue);
|
AuditLogger.getFirstMessage(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -916,7 +916,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getFirstMessageAsJSON() throws Exception {
|
public String getFirstMessageAsJSON() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getFirstMessageAsJSON(queue);
|
AuditLogger.getFirstMessageAsJSON(queue);
|
||||||
}
|
}
|
||||||
return toJSON(getFirstMessage());
|
return toJSON(getFirstMessage());
|
||||||
|
@ -924,7 +924,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long getFirstMessageTimestamp() throws Exception {
|
public Long getFirstMessageTimestamp() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getFirstMessageTimestamp(queue);
|
AuditLogger.getFirstMessageTimestamp(queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -941,7 +941,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long getFirstMessageAge() throws Exception {
|
public Long getFirstMessageAge() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getFirstMessageAge(queue);
|
AuditLogger.getFirstMessageAge(queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -960,7 +960,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long countMessages(final String filterStr) throws Exception {
|
public long countMessages(final String filterStr) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.countMessages(queue, filterStr);
|
AuditLogger.countMessages(queue, filterStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -970,7 +970,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String countMessages(final String filterStr, final String groupByProperty) throws Exception {
|
public String countMessages(final String filterStr, final String groupByProperty) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.countMessages(queue, filterStr, groupByProperty);
|
AuditLogger.countMessages(queue, filterStr, groupByProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1010,7 +1010,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long countDeliveringMessages(final String filterStr) throws Exception {
|
public long countDeliveringMessages(final String filterStr) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.countDeliveringMessages(queue, filterStr);
|
AuditLogger.countDeliveringMessages(queue, filterStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1020,7 +1020,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String countDeliveringMessages(final String filterStr, final String groupByProperty) throws Exception {
|
public String countDeliveringMessages(final String filterStr, final String groupByProperty) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.countDeliveringMessages(queue, filterStr, groupByProperty);
|
AuditLogger.countDeliveringMessages(queue, filterStr, groupByProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1066,7 +1066,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean removeMessage(final long messageID) throws Exception {
|
public boolean removeMessage(final long messageID) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.removeMessage(queue, messageID);
|
AuditLogger.removeMessage(queue, messageID);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1088,7 +1088,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int removeMessages(final int flushLimit, final String filterStr) throws Exception {
|
public int removeMessages(final int flushLimit, final String filterStr) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.removeMessages(queue, flushLimit, filterStr);
|
AuditLogger.removeMessages(queue, flushLimit, filterStr);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1122,7 +1122,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean expireMessage(final long messageID) throws Exception {
|
public boolean expireMessage(final long messageID) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.expireMessage(queue, messageID);
|
AuditLogger.expireMessage(queue, messageID);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1137,7 +1137,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int expireMessages(final String filterStr) throws Exception {
|
public int expireMessages(final String filterStr) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.expireMessages(queue, filterStr);
|
AuditLogger.expireMessages(queue, filterStr);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1155,7 +1155,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean retryMessage(final long messageID) throws Exception {
|
public boolean retryMessage(final long messageID) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.retryMessage(queue, messageID);
|
AuditLogger.retryMessage(queue, messageID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1193,7 +1193,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int retryMessages() throws Exception {
|
public int retryMessages() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.retryMessages(queue);
|
AuditLogger.retryMessages(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1215,7 +1215,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
public boolean moveMessage(final long messageID,
|
public boolean moveMessage(final long messageID,
|
||||||
final String otherQueueName,
|
final String otherQueueName,
|
||||||
final boolean rejectDuplicates) throws Exception {
|
final boolean rejectDuplicates) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.moveMessage(queue, messageID, otherQueueName, rejectDuplicates);
|
AuditLogger.moveMessage(queue, messageID, otherQueueName, rejectDuplicates);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1254,7 +1254,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
final String otherQueueName,
|
final String otherQueueName,
|
||||||
final boolean rejectDuplicates,
|
final boolean rejectDuplicates,
|
||||||
final int messageCount) throws Exception {
|
final int messageCount) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.moveMessages(queue, flushLimit, filterStr, otherQueueName, rejectDuplicates, messageCount);
|
AuditLogger.moveMessages(queue, flushLimit, filterStr, otherQueueName, rejectDuplicates, messageCount);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1286,7 +1286,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int sendMessagesToDeadLetterAddress(final String filterStr) throws Exception {
|
public int sendMessagesToDeadLetterAddress(final String filterStr) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.sendMessagesToDeadLetterAddress(queue, filterStr);
|
AuditLogger.sendMessagesToDeadLetterAddress(queue, filterStr);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1308,8 +1308,8 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
boolean durable,
|
boolean durable,
|
||||||
final String user,
|
final String user,
|
||||||
final String password) throws Exception {
|
final String password) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.sendMessage(queue, null, headers, type, body, durable, user, "****");
|
AuditLogger.sendMessageThroughManagement(queue, headers, type, body, durable, user, "****");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
String s = sendMessage(queue.getAddress(), server, headers, type, body, durable, user, password, queue.getID());
|
String s = sendMessage(queue.getAddress(), server, headers, type, body, durable, user, password, queue.getID());
|
||||||
|
@ -1327,7 +1327,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean sendMessageToDeadLetterAddress(final long messageID) throws Exception {
|
public boolean sendMessageToDeadLetterAddress(final long messageID) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.sendMessageToDeadLetterAddress(queue, messageID);
|
AuditLogger.sendMessageToDeadLetterAddress(queue, messageID);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1342,7 +1342,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int changeMessagesPriority(final String filterStr, final int newPriority) throws Exception {
|
public int changeMessagesPriority(final String filterStr, final int newPriority) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.changeMessagesPriority(queue, filterStr, newPriority);
|
AuditLogger.changeMessagesPriority(queue, filterStr, newPriority);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1362,7 +1362,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean changeMessagePriority(final long messageID, final int newPriority) throws Exception {
|
public boolean changeMessagePriority(final long messageID, final int newPriority) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.changeMessagePriority(queue, messageID, newPriority);
|
AuditLogger.changeMessagePriority(queue, messageID, newPriority);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1380,7 +1380,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String listMessageCounter() {
|
public String listMessageCounter() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.listMessageCounter(queue);
|
AuditLogger.listMessageCounter(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1397,7 +1397,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void resetMessageCounter() {
|
public void resetMessageCounter() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.resetMessageCounter(queue);
|
AuditLogger.resetMessageCounter(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1412,7 +1412,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String listMessageCounterAsHTML() {
|
public String listMessageCounterAsHTML() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.listMessageCounterAsHTML(queue);
|
AuditLogger.listMessageCounterAsHTML(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1427,7 +1427,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String listMessageCounterHistory() throws Exception {
|
public String listMessageCounterHistory() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.listMessageCounterHistory(queue);
|
AuditLogger.listMessageCounterHistory(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1442,7 +1442,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String listMessageCounterHistoryAsHTML() {
|
public String listMessageCounterHistoryAsHTML() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.listMessageCounterHistoryAsHTML(queue);
|
AuditLogger.listMessageCounterHistoryAsHTML(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1457,7 +1457,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void pause() {
|
public void pause() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.pause(queue);
|
AuditLogger.pause(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1482,7 +1482,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void pause(boolean persist) {
|
public void pause(boolean persist) {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.pause(queue, persist);
|
AuditLogger.pause(queue, persist);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1505,7 +1505,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void resume() {
|
public void resume() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.resume(queue);
|
AuditLogger.resume(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1530,7 +1530,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isPaused() throws Exception {
|
public boolean isPaused() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isPaused(queue);
|
AuditLogger.isPaused(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1550,7 +1550,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CompositeData[] browse(int page, int pageSize, String filter) throws Exception {
|
public CompositeData[] browse(int page, int pageSize, String filter) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.browse(queue, page, pageSize);
|
AuditLogger.browse(queue, page, pageSize);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1605,7 +1605,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public CompositeData[] browse(String filter) throws Exception {
|
public CompositeData[] browse(String filter) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.browse(queue, filter);
|
AuditLogger.browse(queue, filter);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1651,7 +1651,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void flushExecutor() {
|
public void flushExecutor() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.flushExecutor(queue);
|
AuditLogger.flushExecutor(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1666,7 +1666,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void resetAllGroups() {
|
public void resetAllGroups() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.resetAllGroups(queue);
|
AuditLogger.resetAllGroups(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1681,7 +1681,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void resetGroup(String groupID) {
|
public void resetGroup(String groupID) {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.resetGroup(queue, groupID);
|
AuditLogger.resetGroup(queue, groupID);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1696,7 +1696,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getGroupCount() {
|
public int getGroupCount() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getGroupCount(queue);
|
AuditLogger.getGroupCount(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1711,7 +1711,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String listGroupsAsJSON() throws Exception {
|
public String listGroupsAsJSON() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.listGroupsAsJSON(queue);
|
AuditLogger.listGroupsAsJSON(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1742,7 +1742,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getRingSize() {
|
public long getRingSize() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getRingSize(queue);
|
AuditLogger.getRingSize(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1757,7 +1757,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String listConsumersAsJSON() throws Exception {
|
public String listConsumersAsJSON() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.listConsumersAsJSON(queue);
|
AuditLogger.listConsumersAsJSON(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1798,7 +1798,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void resetMessagesAdded() throws Exception {
|
public void resetMessagesAdded() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.resetMessagesAdded(queue);
|
AuditLogger.resetMessagesAdded(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1814,7 +1814,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void resetMessagesAcknowledged() throws Exception {
|
public void resetMessagesAcknowledged() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.resetMessagesAcknowledged(queue);
|
AuditLogger.resetMessagesAcknowledged(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1830,7 +1830,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void resetMessagesExpired() throws Exception {
|
public void resetMessagesExpired() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.resetMessagesExpired(queue);
|
AuditLogger.resetMessagesExpired(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1846,7 +1846,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void resetMessagesKilled() throws Exception {
|
public void resetMessagesKilled() throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.resetMessagesKilled(queue);
|
AuditLogger.resetMessagesKilled(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1862,7 +1862,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isGroupRebalance() {
|
public boolean isGroupRebalance() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isGroupRebalance(queue);
|
AuditLogger.isGroupRebalance(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1877,7 +1877,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isGroupRebalancePauseDispatch() {
|
public boolean isGroupRebalancePauseDispatch() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.isGroupRebalancePauseDispatch(queue);
|
AuditLogger.isGroupRebalancePauseDispatch(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1892,7 +1892,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getGroupBuckets() {
|
public int getGroupBuckets() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getGroupBuckets(queue);
|
AuditLogger.getGroupBuckets(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1907,7 +1907,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getGroupFirstKey() {
|
public String getGroupFirstKey() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getGroupFirstKey(queue);
|
AuditLogger.getGroupFirstKey(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
@ -1924,7 +1924,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getPreparedTransactionMessageCount() {
|
public int getPreparedTransactionMessageCount() {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.getPreparedTransactionMessageCount(queue);
|
AuditLogger.getPreparedTransactionMessageCount(queue);
|
||||||
}
|
}
|
||||||
checkStarted();
|
checkStarted();
|
||||||
|
|
|
@ -195,7 +195,7 @@ public class SecurityStoreImpl implements SecurityStore, HierarchicalRepositoryC
|
||||||
connection.setAuditSubject(subject);
|
connection.setAuditSubject(subject);
|
||||||
}
|
}
|
||||||
if (AuditLogger.isResourceLoggingEnabled()) {
|
if (AuditLogger.isResourceLoggingEnabled()) {
|
||||||
AuditLogger.userSuccesfullyLoggedInAudit(subject);
|
AuditLogger.userSuccesfullyAuthenticatedInAudit(subject, connection.getRemoteAddress());
|
||||||
}
|
}
|
||||||
|
|
||||||
return validatedUser;
|
return validatedUser;
|
||||||
|
@ -375,7 +375,7 @@ public class SecurityStoreImpl implements SecurityStore, HierarchicalRepositoryC
|
||||||
ActiveMQServerLogger.LOGGER.securityProblemWhileAuthenticating(e.getMessage());
|
ActiveMQServerLogger.LOGGER.securityProblemWhileAuthenticating(e.getMessage());
|
||||||
|
|
||||||
if (AuditLogger.isResourceLoggingEnabled()) {
|
if (AuditLogger.isResourceLoggingEnabled()) {
|
||||||
AuditLogger.userFailedLoggedInAudit(null, e.getMessage());
|
AuditLogger.userFailedAuthenticationInAudit(null, e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
throw e;
|
throw e;
|
||||||
|
|
|
@ -1673,11 +1673,6 @@ public class ActiveMQServerImpl implements ActiveMQServer {
|
||||||
final OperationContext context,
|
final OperationContext context,
|
||||||
final Map<SimpleString, RoutingType> prefixes,
|
final Map<SimpleString, RoutingType> prefixes,
|
||||||
final String securityDomain) throws Exception {
|
final String securityDomain) throws Exception {
|
||||||
|
|
||||||
if (AuditLogger.isEnabled()) {
|
|
||||||
AuditLogger.createCoreSession(this, name, username, "****", minLargeMessageSize, connection, autoCommitSends,
|
|
||||||
autoCommitAcks, preAcknowledge, xa, defaultAddress, callback, autoCreateQueues, context, prefixes);
|
|
||||||
}
|
|
||||||
String validatedUser = "";
|
String validatedUser = "";
|
||||||
|
|
||||||
if (securityStore != null) {
|
if (securityStore != null) {
|
||||||
|
@ -1686,6 +1681,11 @@ public class ActiveMQServerImpl implements ActiveMQServer {
|
||||||
|
|
||||||
checkSessionLimit(validatedUser);
|
checkSessionLimit(validatedUser);
|
||||||
|
|
||||||
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
|
AuditLogger.createCoreSession(this, connection.getAuditSubject(), connection.getRemoteAddress(), name, username, "****", minLargeMessageSize, connection, autoCommitSends,
|
||||||
|
autoCommitAcks, preAcknowledge, xa, defaultAddress, callback, autoCreateQueues, context, prefixes);
|
||||||
|
}
|
||||||
|
|
||||||
final ServerSessionImpl session = internalCreateSession(name, username, password, validatedUser, minLargeMessageSize, connection, autoCommitSends, autoCommitAcks, preAcknowledge, xa, defaultAddress, callback, context, autoCreateQueues, prefixes, securityDomain);
|
final ServerSessionImpl session = internalCreateSession(name, username, password, validatedUser, minLargeMessageSize, connection, autoCommitSends, autoCommitAcks, preAcknowledge, xa, defaultAddress, callback, context, autoCreateQueues, prefixes, securityDomain);
|
||||||
|
|
||||||
return session;
|
return session;
|
||||||
|
|
|
@ -101,6 +101,7 @@ import org.apache.activemq.artemis.core.transaction.TransactionOperationAbstract
|
||||||
import org.apache.activemq.artemis.core.transaction.TransactionPropertyIndexes;
|
import org.apache.activemq.artemis.core.transaction.TransactionPropertyIndexes;
|
||||||
import org.apache.activemq.artemis.core.transaction.impl.BindingsTransactionImpl;
|
import org.apache.activemq.artemis.core.transaction.impl.BindingsTransactionImpl;
|
||||||
import org.apache.activemq.artemis.core.transaction.impl.TransactionImpl;
|
import org.apache.activemq.artemis.core.transaction.impl.TransactionImpl;
|
||||||
|
import org.apache.activemq.artemis.logs.AuditLogger;
|
||||||
import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
|
import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
|
||||||
import org.apache.activemq.artemis.utils.ArtemisCloseable;
|
import org.apache.activemq.artemis.utils.ArtemisCloseable;
|
||||||
import org.apache.activemq.artemis.utils.BooleanUtil;
|
import org.apache.activemq.artemis.utils.BooleanUtil;
|
||||||
|
@ -1825,32 +1826,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void acknowledge(final MessageReference ref, final AckReason reason, final ServerConsumer consumer) throws Exception {
|
public void acknowledge(final MessageReference ref, final AckReason reason, final ServerConsumer consumer) throws Exception {
|
||||||
if (nonDestructive && reason == AckReason.NORMAL) {
|
acknowledge(null, ref, reason, consumer);
|
||||||
decDelivering(ref);
|
|
||||||
if (logger.isDebugEnabled()) {
|
|
||||||
logger.debug("acknowledge ignored nonDestructive=true and reason=NORMAL");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (ref.isPaged()) {
|
|
||||||
pageSubscription.ack((PagedReference) ref);
|
|
||||||
postAcknowledge(ref, reason);
|
|
||||||
} else {
|
|
||||||
Message message = ref.getMessage();
|
|
||||||
|
|
||||||
boolean durableRef = message.isDurable() && isDurable();
|
|
||||||
|
|
||||||
if (durableRef) {
|
|
||||||
storageManager.storeAcknowledge(id, message.getMessageID());
|
|
||||||
}
|
|
||||||
postAcknowledge(ref, reason);
|
|
||||||
}
|
|
||||||
|
|
||||||
ackAttempts.incrementAndGet();
|
|
||||||
|
|
||||||
if (server != null && server.hasBrokerMessagePlugins()) {
|
|
||||||
server.callBrokerMessagePlugins(plugin -> plugin.messageAcknowledged(ref, reason, consumer));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1860,34 +1836,59 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void acknowledge(final Transaction tx, final MessageReference ref, final AckReason reason, final ServerConsumer consumer) throws Exception {
|
public void acknowledge(final Transaction tx, final MessageReference ref, final AckReason reason, final ServerConsumer consumer) throws Exception {
|
||||||
RefsOperation refsOperation = getRefsOperation(tx, reason);
|
boolean transactional = tx != null;
|
||||||
|
RefsOperation refsOperation = null;
|
||||||
|
if (transactional) {
|
||||||
|
refsOperation = getRefsOperation(tx, reason);
|
||||||
|
}
|
||||||
|
|
||||||
if (nonDestructive && reason == AckReason.NORMAL) {
|
if (nonDestructive && reason == AckReason.NORMAL) {
|
||||||
refsOperation.addOnlyRefAck(ref);
|
if (transactional) {
|
||||||
|
refsOperation.addOnlyRefAck(ref);
|
||||||
|
} else {
|
||||||
|
decDelivering(ref);
|
||||||
|
}
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug("acknowledge tx ignored nonDestructive=true and reason=NORMAL");
|
logger.debug("acknowledge tx ignored nonDestructive=true and reason=NORMAL");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (ref.isPaged()) {
|
if (ref.isPaged()) {
|
||||||
pageSubscription.ackTx(tx, (PagedReference) ref);
|
if (transactional) {
|
||||||
|
pageSubscription.ackTx(tx, (PagedReference) ref);
|
||||||
refsOperation.addAck(ref);
|
refsOperation.addAck(ref);
|
||||||
|
} else {
|
||||||
|
pageSubscription.ack((PagedReference) ref);
|
||||||
|
postAcknowledge(ref, reason);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Message message = ref.getMessage();
|
Message message = ref.getMessage();
|
||||||
|
|
||||||
boolean durableRef = message.isDurable() && isDurable();
|
boolean durableRef = message.isDurable() && isDurable();
|
||||||
|
|
||||||
if (durableRef) {
|
if (durableRef) {
|
||||||
storageManager.storeAcknowledgeTransactional(tx.getID(), id, message.getMessageID());
|
if (transactional) {
|
||||||
|
storageManager.storeAcknowledgeTransactional(tx.getID(), id, message.getMessageID());
|
||||||
tx.setContainsPersistent();
|
tx.setContainsPersistent();
|
||||||
|
} else {
|
||||||
|
storageManager.storeAcknowledge(id, message.getMessageID());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (transactional) {
|
||||||
|
ackAttempts.incrementAndGet();
|
||||||
|
refsOperation.addAck(ref);
|
||||||
|
} else {
|
||||||
|
postAcknowledge(ref, reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
ackAttempts.incrementAndGet();
|
|
||||||
|
|
||||||
refsOperation.addAck(ref);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!transactional) {
|
||||||
|
ackAttempts.incrementAndGet();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (AuditLogger.isMessageLoggingEnabled()) {
|
||||||
|
ServerSession session = server.getSessionByID(consumer.getSessionID());
|
||||||
|
AuditLogger.coreAcknowledgeMessage(session.getRemotingConnection().getAuditSubject(), session.getRemotingConnection().getRemoteAddress(), getName().toString(), ref.getMessage().toString());
|
||||||
|
}
|
||||||
if (server != null && server.hasBrokerMessagePlugins()) {
|
if (server != null && server.hasBrokerMessagePlugins()) {
|
||||||
server.callBrokerMessagePlugins(plugin -> plugin.messageAcknowledged(ref, reason, consumer));
|
server.callBrokerMessagePlugins(plugin -> plugin.messageAcknowledged(ref, reason, consumer));
|
||||||
}
|
}
|
||||||
|
|
|
@ -493,8 +493,8 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener {
|
||||||
try {
|
try {
|
||||||
Message message = reference.getMessage();
|
Message message = reference.getMessage();
|
||||||
|
|
||||||
if (AuditLogger.isMessageEnabled()) {
|
if (AuditLogger.isMessageLoggingEnabled()) {
|
||||||
AuditLogger.coreConsumeMessage(session.getRemotingConnection().getAuditSubject(), getQueueName().toString(), reference.toString());
|
AuditLogger.coreConsumeMessage(session.getRemotingConnection().getAuditSubject(), session.getRemotingConnection().getRemoteAddress(), getQueueName().toString(), reference.toString());
|
||||||
}
|
}
|
||||||
if (server.hasBrokerMessagePlugins()) {
|
if (server.hasBrokerMessagePlugins()) {
|
||||||
server.callBrokerMessagePlugins(plugin -> plugin.beforeDeliver(this, reference));
|
server.callBrokerMessagePlugins(plugin -> plugin.beforeDeliver(this, reference));
|
||||||
|
|
|
@ -524,8 +524,8 @@ public class ServerSessionImpl implements ServerSession, FailureListener {
|
||||||
final boolean browseOnly,
|
final boolean browseOnly,
|
||||||
final boolean supportLargeMessage,
|
final boolean supportLargeMessage,
|
||||||
final Integer credits) throws Exception {
|
final Integer credits) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.createCoreConsumer(this, getUsername(), consumerID, queueName, filterString, priority, browseOnly, supportLargeMessage, credits);
|
AuditLogger.createCoreConsumer(this, remotingConnection.getAuditSubject(), remotingConnection.getRemoteAddress(), consumerID, queueName, filterString, priority, browseOnly, supportLargeMessage, credits);
|
||||||
}
|
}
|
||||||
final SimpleString unPrefixedQueueName = removePrefix(queueName);
|
final SimpleString unPrefixedQueueName = removePrefix(queueName);
|
||||||
|
|
||||||
|
@ -714,8 +714,8 @@ public class ServerSessionImpl implements ServerSession, FailureListener {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Queue createQueue(QueueConfiguration queueConfiguration) throws Exception {
|
public Queue createQueue(QueueConfiguration queueConfiguration) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.createQueue(this, getUsername(), queueConfiguration);
|
AuditLogger.createQueue(this, remotingConnection.getAuditSubject(), remotingConnection.getRemoteAddress(), queueConfiguration);
|
||||||
}
|
}
|
||||||
|
|
||||||
queueConfiguration
|
queueConfiguration
|
||||||
|
@ -924,8 +924,8 @@ public class ServerSessionImpl implements ServerSession, FailureListener {
|
||||||
public AddressInfo createAddress(final SimpleString address,
|
public AddressInfo createAddress(final SimpleString address,
|
||||||
EnumSet<RoutingType> routingTypes,
|
EnumSet<RoutingType> routingTypes,
|
||||||
final boolean autoCreated) throws Exception {
|
final boolean autoCreated) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.serverSessionCreateAddress(this.getName(), getUsername(), address, routingTypes, autoCreated);
|
AuditLogger.serverSessionCreateAddress(this.getName(), remotingConnection.getAuditSubject(), remotingConnection.getRemoteAddress(), address, routingTypes, autoCreated);
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleString realAddress = CompositeAddress.extractAddressName(address);
|
SimpleString realAddress = CompositeAddress.extractAddressName(address);
|
||||||
|
@ -944,8 +944,8 @@ public class ServerSessionImpl implements ServerSession, FailureListener {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AddressInfo createAddress(AddressInfo addressInfo, boolean autoCreated) throws Exception {
|
public AddressInfo createAddress(AddressInfo addressInfo, boolean autoCreated) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.serverSessionCreateAddress(this.getName(), getUsername(), addressInfo, autoCreated);
|
AuditLogger.serverSessionCreateAddress(this.getName(), remotingConnection.getAuditSubject(), remotingConnection.getRemoteAddress(), addressInfo, autoCreated);
|
||||||
}
|
}
|
||||||
|
|
||||||
AddressInfo art = getAddressAndRoutingType(addressInfo);
|
AddressInfo art = getAddressAndRoutingType(addressInfo);
|
||||||
|
@ -1034,8 +1034,8 @@ public class ServerSessionImpl implements ServerSession, FailureListener {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createSharedQueue(QueueConfiguration queueConfiguration) throws Exception {
|
public void createSharedQueue(QueueConfiguration queueConfiguration) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.createSharedQueue(this, getUsername(), queueConfiguration);
|
AuditLogger.createSharedQueue(this, remotingConnection.getAuditSubject(), remotingConnection.getRemoteAddress(), queueConfiguration);
|
||||||
}
|
}
|
||||||
queueConfiguration.setAddress(removePrefix(queueConfiguration.getAddress()));
|
queueConfiguration.setAddress(removePrefix(queueConfiguration.getAddress()));
|
||||||
|
|
||||||
|
@ -1161,8 +1161,8 @@ public class ServerSessionImpl implements ServerSession, FailureListener {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteQueue(final SimpleString queueToDelete) throws Exception {
|
public void deleteQueue(final SimpleString queueToDelete) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.destroyQueue(this, getUsername(), queueToDelete);
|
AuditLogger.destroyQueue(this, remotingConnection.getAuditSubject(), remotingConnection.getRemoteAddress(), queueToDelete);
|
||||||
}
|
}
|
||||||
final SimpleString unPrefixedQueueName = removePrefix(queueToDelete);
|
final SimpleString unPrefixedQueueName = removePrefix(queueToDelete);
|
||||||
|
|
||||||
|
@ -1802,8 +1802,8 @@ public class ServerSessionImpl implements ServerSession, FailureListener {
|
||||||
message.setMessageID(id);
|
message.setMessageID(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AuditLogger.isMessageEnabled()) {
|
if (AuditLogger.isMessageLoggingEnabled()) {
|
||||||
AuditLogger.coreSendMessage(getUsername(), message.toString(), routingContext);
|
AuditLogger.coreSendMessage(remotingConnection.getAuditSubject(), remotingConnection.getRemoteAddress(), message.toString(), routingContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleString address = message.getAddressSimpleString();
|
SimpleString address = message.getAddressSimpleString();
|
||||||
|
@ -2048,8 +2048,8 @@ public class ServerSessionImpl implements ServerSession, FailureListener {
|
||||||
private RoutingStatus handleManagementMessage(final Transaction tx,
|
private RoutingStatus handleManagementMessage(final Transaction tx,
|
||||||
final Message message,
|
final Message message,
|
||||||
final boolean direct) throws Exception {
|
final boolean direct) throws Exception {
|
||||||
if (AuditLogger.isEnabled()) {
|
if (AuditLogger.isBaseLoggingEnabled()) {
|
||||||
AuditLogger.handleManagementMessage(this.getName(), getUsername(), tx, message, direct);
|
AuditLogger.handleManagementMessage(this.getName(), remotingConnection.getAuditSubject(), remotingConnection.getRemoteAddress(), tx, message, direct);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
securityCheck(removePrefix(message.getAddressSimpleString()), CheckType.MANAGE, this);
|
securityCheck(removePrefix(message.getAddressSimpleString()), CheckType.MANAGE, this);
|
||||||
|
|
|
@ -43,12 +43,12 @@ public class BasicAuthenticator implements JMXAuthenticator {
|
||||||
result = securityManager.authenticate(params[0], params[1], null, null);
|
result = securityManager.authenticate(params[0], params[1], null, null);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
if (AuditLogger.isResourceLoggingEnabled()) {
|
if (AuditLogger.isResourceLoggingEnabled()) {
|
||||||
AuditLogger.userSuccesfullyLoggedInAudit(result);
|
AuditLogger.userSuccesfullyAuthenticatedInAudit(result);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
} else {
|
} else {
|
||||||
if (AuditLogger.isResourceLoggingEnabled()) {
|
if (AuditLogger.isResourceLoggingEnabled()) {
|
||||||
AuditLogger.userFailedLoggedInAudit(result, null);
|
AuditLogger.userFailedAuthenticationInAudit(result, null);
|
||||||
}
|
}
|
||||||
throw new SecurityException("Authentication failed");
|
throw new SecurityException("Authentication failed");
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,12 +74,12 @@ public class JaasAuthenticator implements JMXAuthenticator {
|
||||||
});
|
});
|
||||||
loginContext.login();
|
loginContext.login();
|
||||||
if (AuditLogger.isResourceLoggingEnabled()) {
|
if (AuditLogger.isResourceLoggingEnabled()) {
|
||||||
AuditLogger.userSuccesfullyLoggedInAudit(subject);
|
AuditLogger.userSuccesfullyAuthenticatedInAudit(subject);
|
||||||
}
|
}
|
||||||
return subject;
|
return subject;
|
||||||
} catch (LoginException e) {
|
} catch (LoginException e) {
|
||||||
if (AuditLogger.isResourceLoggingEnabled()) {
|
if (AuditLogger.isResourceLoggingEnabled()) {
|
||||||
AuditLogger.userFailedLoggedInAudit(subject, e.getMessage());
|
AuditLogger.userFailedAuthenticationInAudit(subject, e.getMessage());
|
||||||
}
|
}
|
||||||
throw new SecurityException("Authentication failed", e);
|
throw new SecurityException("Authentication failed", e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,9 +46,9 @@ public class AuthenticationFilter implements Filter {
|
||||||
//status 200 means that the user has been authenticated, anything else must be a failure
|
//status 200 means that the user has been authenticated, anything else must be a failure
|
||||||
if (status == 200) {
|
if (status == 200) {
|
||||||
HttpSession session = ((Request) servletRequest).getSession();
|
HttpSession session = ((Request) servletRequest).getSession();
|
||||||
AuditLogger.userSuccesfullyLoggedInAudit(session != null ? (Subject) session.getAttribute("subject") : null);
|
AuditLogger.userSuccesfullyAuthenticatedInAudit(session != null ? (Subject) session.getAttribute("subject") : null);
|
||||||
} else {
|
} else {
|
||||||
AuditLogger.userFailedLoggedInAudit("" + status);
|
AuditLogger.userFailedAuthenticationInAudit("" + status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -537,6 +537,27 @@
|
||||||
</args>
|
</args>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<phase>test-compile</phase>
|
||||||
|
<id>create-createAuditLoggingAMQPMutualSSL</id>
|
||||||
|
<goals>
|
||||||
|
<goal>create</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<configuration>${basedir}/target/classes/servers/audit-logging-amqp-mutual-ssl</configuration>
|
||||||
|
<noWeb>false</noWeb>
|
||||||
|
<allowAnonymous>true</allowAnonymous>
|
||||||
|
<user>admin</user>
|
||||||
|
<password>admin</password>
|
||||||
|
<instance>${basedir}/target/audit-logging-amqp-mutual-ssl</instance>
|
||||||
|
<args>
|
||||||
|
<!-- this is needed to run the server remotely -->
|
||||||
|
<arg>--java-options</arg>
|
||||||
|
<arg>-Djava.rmi.server.hostname=localhost</arg>
|
||||||
|
<!--<arg>-Djava.rmi.server.hostname=localhost -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005</arg>-->
|
||||||
|
</args>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>test-compile</phase>
|
<phase>test-compile</phase>
|
||||||
<id>create-jmx-failback</id>
|
<id>create-jmx-failback</id>
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
|
<configuration xmlns="urn:activemq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd">
|
||||||
|
<core xmlns="urn:activemq:core">
|
||||||
|
|
||||||
|
<bindings-directory>./data/messaging/bindings</bindings-directory>
|
||||||
|
|
||||||
|
<journal-directory>./data/messaging/journal</journal-directory>
|
||||||
|
|
||||||
|
<large-messages-directory>./data/messaging/largemessages</large-messages-directory>
|
||||||
|
|
||||||
|
<paging-directory>./data/messaging/paging</paging-directory>
|
||||||
|
|
||||||
|
<acceptors>
|
||||||
|
<acceptor name="artemis">tcp://localhost:61616?securityDomain=guest</acceptor> <!-- this is only for the smoke test health-check -->
|
||||||
|
<acceptor name="netty-ssl-acceptor">tcp://localhost:5500?sslEnabled=true;needClientAuth=true;keyStorePath=server-side-keystore.jks;keyStorePassword=secureexample;trustStorePath=server-side-truststore.jks;trustStorePassword=secureexample</acceptor>
|
||||||
|
</acceptors>
|
||||||
|
|
||||||
|
<security-settings>
|
||||||
|
<security-setting match="exampleQueue">
|
||||||
|
<permission roles="consumers" type="consume"/>
|
||||||
|
<permission roles="producers" type="send"/>
|
||||||
|
</security-setting>
|
||||||
|
</security-settings>
|
||||||
|
|
||||||
|
<addresses>
|
||||||
|
<address name="exampleQueue">
|
||||||
|
<anycast>
|
||||||
|
<queue name="exampleQueue"/>
|
||||||
|
</anycast>
|
||||||
|
</address>
|
||||||
|
</addresses>
|
||||||
|
</core>
|
||||||
|
</configuration>
|
|
@ -0,0 +1,19 @@
|
||||||
|
#
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
# contributor license agreements. See the NOTICE file distributed with
|
||||||
|
# this work for additional information regarding copyright ownership.
|
||||||
|
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
# (the "License"); you may not use this file except in compliance with
|
||||||
|
# the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
producers=myUser
|
||||||
|
consumers=myUser
|
|
@ -0,0 +1,18 @@
|
||||||
|
#
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
# contributor license agreements. See the NOTICE file distributed with
|
||||||
|
# this work for additional information regarding copyright ownership.
|
||||||
|
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
# (the "License"); you may not use this file except in compliance with
|
||||||
|
# the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
myUser=CN=ActiveMQ Artemis Client, OU=Artemis, O=ActiveMQ, L=AMQ, ST=AMQ, C=AMQ
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,80 @@
|
||||||
|
#
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
# contributor license agreements. See the NOTICE file distributed with
|
||||||
|
# this work for additional information regarding copyright ownership.
|
||||||
|
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
# (the "License"); you may not use this file except in compliance with
|
||||||
|
# the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Additional logger names to configure (root logger is always configured)
|
||||||
|
# Root logger option
|
||||||
|
loggers=org.eclipse.jetty,org.jboss.logging,org.apache.activemq.artemis.core.server,org.apache.activemq.artemis.utils,org.apache.activemq.artemis.journal,org.apache.activemq.artemis.jms.server,org.apache.activemq.artemis.integration.bootstrap,org.apache.activemq.audit.base,org.apache.activemq.audit.message,org.apache.activemq.audit.resource
|
||||||
|
|
||||||
|
# Root logger level
|
||||||
|
logger.level=INFO
|
||||||
|
# ActiveMQ Artemis logger levels
|
||||||
|
logger.org.apache.activemq.artemis.core.server.level=INFO
|
||||||
|
logger.org.apache.activemq.artemis.journal.level=INFO
|
||||||
|
logger.org.apache.activemq.artemis.utils.level=INFO
|
||||||
|
logger.org.apache.activemq.artemis.jms.level=INFO
|
||||||
|
logger.org.apache.activemq.artemis.integration.bootstrap.level=INFO
|
||||||
|
logger.org.eclipse.jetty.level=WARN
|
||||||
|
# Root logger handlers
|
||||||
|
logger.handlers=FILE,CONSOLE
|
||||||
|
|
||||||
|
logger.org.apache.activemq.audit.base.level=DEBUG
|
||||||
|
logger.org.apache.activemq.audit.base.handlers=AUDIT_FILE
|
||||||
|
logger.org.apache.activemq.audit.base.useParentHandlers=false
|
||||||
|
|
||||||
|
logger.org.apache.activemq.audit.message.level=DEBUG
|
||||||
|
logger.org.apache.activemq.audit.message.handlers=AUDIT_FILE
|
||||||
|
logger.org.apache.activemq.audit.message.useParentHandlers=
|
||||||
|
|
||||||
|
logger.org.apache.activemq.audit.resource.level=DEBUG
|
||||||
|
logger.org.apache.activemq.audit.resource.handlers=AUDIT_FILE
|
||||||
|
logger.org.apache.activemq.audit.resource.useParentHandlers=false
|
||||||
|
|
||||||
|
# Console handler configuration
|
||||||
|
handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler
|
||||||
|
handler.CONSOLE.properties=autoFlush
|
||||||
|
handler.CONSOLE.level=DEBUG
|
||||||
|
handler.CONSOLE.autoFlush=true
|
||||||
|
handler.CONSOLE.formatter=PATTERN
|
||||||
|
|
||||||
|
# File handler configuration
|
||||||
|
handler.FILE=org.jboss.logmanager.handlers.PeriodicRotatingFileHandler
|
||||||
|
handler.FILE.level=DEBUG
|
||||||
|
handler.FILE.properties=suffix,append,autoFlush,fileName
|
||||||
|
handler.FILE.suffix=.yyyy-MM-dd
|
||||||
|
handler.FILE.append=true
|
||||||
|
handler.FILE.autoFlush=true
|
||||||
|
handler.FILE.fileName=../log/artemis.log
|
||||||
|
handler.FILE.formatter=PATTERN
|
||||||
|
|
||||||
|
# Formatter pattern configuration
|
||||||
|
formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter
|
||||||
|
formatter.PATTERN.properties=pattern
|
||||||
|
formatter.PATTERN.pattern=%d %-5p [%c] %s%E%n
|
||||||
|
|
||||||
|
#Audit logger
|
||||||
|
handler.AUDIT_FILE.level=DEBUG
|
||||||
|
handler.AUDIT_FILE=org.jboss.logmanager.handlers.PeriodicRotatingFileHandler
|
||||||
|
handler.AUDIT_FILE.properties=suffix,append,autoFlush,fileName
|
||||||
|
handler.AUDIT_FILE.suffix=.yyyy-MM-dd
|
||||||
|
handler.AUDIT_FILE.append=true
|
||||||
|
handler.AUDIT_FILE.autoFlush=true
|
||||||
|
handler.AUDIT_FILE.fileName=../log/audit.log
|
||||||
|
handler.AUDIT_FILE.formatter=AUDIT_PATTERN
|
||||||
|
|
||||||
|
formatter.AUDIT_PATTERN=org.jboss.logmanager.formatters.PatternFormatter
|
||||||
|
formatter.AUDIT_PATTERN.properties=pattern
|
||||||
|
formatter.AUDIT_PATTERN.pattern=%d [AUDIT](%t) %s%E%n
|
|
@ -0,0 +1,30 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
activemq {
|
||||||
|
org.apache.activemq.artemis.spi.core.security.jaas.TextFileCertificateLoginModule required
|
||||||
|
debug=true
|
||||||
|
org.apache.activemq.jaas.textfiledn.user="cert-users.properties"
|
||||||
|
org.apache.activemq.jaas.textfiledn.role="cert-roles.properties";
|
||||||
|
};
|
||||||
|
|
||||||
|
guest {
|
||||||
|
org.apache.activemq.artemis.spi.core.security.jaas.GuestLoginModule sufficient
|
||||||
|
debug=false
|
||||||
|
org.apache.activemq.jaas.guest.user="guest"
|
||||||
|
org.apache.activemq.jaas.guest.role="guest";
|
||||||
|
};
|
Binary file not shown.
Binary file not shown.
|
@ -22,6 +22,7 @@ import javax.management.remote.JMXConnectorFactory;
|
||||||
import javax.management.remote.JMXServiceURL;
|
import javax.management.remote.JMXServiceURL;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.MalformedURLException;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
@ -35,6 +36,8 @@ import org.junit.Assert;
|
||||||
|
|
||||||
public class SmokeTestBase extends ActiveMQTestBase {
|
public class SmokeTestBase extends ActiveMQTestBase {
|
||||||
Set<Process> processes = new HashSet<>();
|
Set<Process> processes = new HashSet<>();
|
||||||
|
private static final String JMX_SERVER_HOSTNAME = "localhost";
|
||||||
|
private static final int JMX_SERVER_PORT = 10099;
|
||||||
|
|
||||||
public static final String basedir = System.getProperty("basedir");
|
public static final String basedir = System.getProperty("basedir");
|
||||||
|
|
||||||
|
@ -92,7 +95,11 @@ public class SmokeTestBase extends ActiveMQTestBase {
|
||||||
return process;
|
return process;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static JMXConnector getJmxConnector(String hostname, int port) throws Exception {
|
protected JMXConnector getJmxConnector() throws MalformedURLException {
|
||||||
|
return getJmxConnector(JMX_SERVER_HOSTNAME, JMX_SERVER_PORT);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static JMXConnector getJmxConnector(String hostname, int port) throws MalformedURLException {
|
||||||
// Without this, the RMI server would bind to the default interface IP (the user's local IP mostly)
|
// Without this, the RMI server would bind to the default interface IP (the user's local IP mostly)
|
||||||
System.setProperty("java.rmi.server.hostname", hostname);
|
System.setProperty("java.rmi.server.hostname", hostname);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,90 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package org.apache.activemq.artemis.tests.smoke.logging;
|
||||||
|
|
||||||
|
import javax.jms.Connection;
|
||||||
|
import javax.jms.ConnectionFactory;
|
||||||
|
import javax.jms.Message;
|
||||||
|
import javax.jms.MessageConsumer;
|
||||||
|
import javax.jms.MessageProducer;
|
||||||
|
import javax.jms.Queue;
|
||||||
|
import javax.jms.Session;
|
||||||
|
import javax.jms.TextMessage;
|
||||||
|
|
||||||
|
import org.apache.qpid.jms.JmsConnectionFactory;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The various keystore files used for this test were generated using the following commands:
|
||||||
|
*
|
||||||
|
* keytool -genkey -keystore server-side-keystore.jks -storepass secureexample -keypass secureexample -dname "CN=ActiveMQ Artemis Server, OU=Artemis, O=ActiveMQ, L=AMQ, S=AMQ, C=AMQ" -keyalg RSA
|
||||||
|
* keytool -export -keystore server-side-keystore.jks -file server-side-cert.cer -storepass secureexample
|
||||||
|
* keytool -import -keystore client-side-truststore.jks -file server-side-cert.cer -storepass secureexample -keypass secureexample -noprompt
|
||||||
|
* keytool -genkey -keystore client-side-keystore.jks -storepass secureexample -keypass secureexample -dname "CN=ActiveMQ Artemis Client, OU=Artemis, O=ActiveMQ, L=AMQ, S=AMQ, C=AMQ" -keyalg RSA
|
||||||
|
* keytool -export -keystore client-side-keystore.jks -file client-side-cert.cer -storepass secureexample
|
||||||
|
* keytool -import -keystore server-side-truststore.jks -file client-side-cert.cer -storepass secureexample -keypass secureexample -noprompt
|
||||||
|
*/
|
||||||
|
public class AuditLoggerAMQPMutualSSLTest extends AuditLoggerTestBase {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getServerName() {
|
||||||
|
return "audit-logging-amqp-mutual-ssl";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testAuditForProducerAndConsumer() throws Exception {
|
||||||
|
String sslhost = "amqps://localhost:5500";
|
||||||
|
|
||||||
|
int maxInactivityDurationInitialDelay = 30000;
|
||||||
|
int idleTimeout = 120000;
|
||||||
|
boolean verifyHost = false;
|
||||||
|
String keyStoreLocation = "target/" + getServerName() + "/etc/client-side-keystore.jks";
|
||||||
|
String keyStorePassword = "secureexample";
|
||||||
|
String trustStoreLocation = "target/" + getServerName() + "/etc/client-side-truststore.jks";
|
||||||
|
String trustStorePassword = "secureexample";
|
||||||
|
|
||||||
|
String remoteUri = sslhost +
|
||||||
|
"?maxInactivityDurationInitialDelay=" + maxInactivityDurationInitialDelay +
|
||||||
|
"&amqp.idleTimeout=" + idleTimeout +
|
||||||
|
"&transport.verifyHost=" + verifyHost +
|
||||||
|
"&transport.keyStoreLocation=" + keyStoreLocation +
|
||||||
|
"&transport.keyStorePassword=" + keyStorePassword +
|
||||||
|
"&transport.trustStoreLocation=" + trustStoreLocation +
|
||||||
|
"&transport.trustStorePassword=" + trustStorePassword;
|
||||||
|
|
||||||
|
ConnectionFactory connectionFactory = new JmsConnectionFactory(remoteUri);
|
||||||
|
try (Connection connection = connectionFactory.createConnection()) {
|
||||||
|
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
||||||
|
Queue queue = session.createQueue("exampleQueue");
|
||||||
|
MessageProducer sender = session.createProducer(queue);
|
||||||
|
TextMessage stm = session.createTextMessage("Hello world ");
|
||||||
|
stm.setStringProperty("foo", "bar");
|
||||||
|
sender.send(stm);
|
||||||
|
MessageConsumer consumer = session.createConsumer(queue);
|
||||||
|
connection.start();
|
||||||
|
Message m = consumer.receive(500);
|
||||||
|
assertNotNull(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
checkAuditLogRecord(true, "AMQ601715: User myUser(producers)@", "successfully authenticated");
|
||||||
|
checkAuditLogRecord(true, "AMQ601267: User myUser(producers)@", "is creating a core session");
|
||||||
|
checkAuditLogRecord(true, "AMQ601500: User myUser(producers)@", "is sending a message AMQPStandardMessage");
|
||||||
|
checkAuditLogRecord(true, "AMQ601265: User myUser(producers)@", "is creating a core consumer");
|
||||||
|
checkAuditLogRecord(true, "AMQ601501: User myUser(producers)@", "is consuming a message from exampleQueue");
|
||||||
|
checkAuditLogRecord(true, "AMQ601502: User myUser(producers)@", "is acknowledging a message from exampleQueue: AMQPStandardMessage");
|
||||||
|
}
|
||||||
|
}
|
|
@ -16,6 +16,12 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.activemq.artemis.tests.smoke.logging;
|
package org.apache.activemq.artemis.tests.smoke.logging;
|
||||||
|
|
||||||
|
import javax.management.MBeanServerConnection;
|
||||||
|
import javax.management.MBeanServerInvocationHandler;
|
||||||
|
import javax.management.openmbean.CompositeData;
|
||||||
|
import javax.management.remote.JMXConnector;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
|
import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
|
||||||
import org.apache.activemq.artemis.api.core.RoutingType;
|
import org.apache.activemq.artemis.api.core.RoutingType;
|
||||||
import org.apache.activemq.artemis.api.core.SimpleString;
|
import org.apache.activemq.artemis.api.core.SimpleString;
|
||||||
|
@ -26,71 +32,18 @@ import org.apache.activemq.artemis.api.core.client.ServerLocator;
|
||||||
import org.apache.activemq.artemis.api.core.management.ActiveMQServerControl;
|
import org.apache.activemq.artemis.api.core.management.ActiveMQServerControl;
|
||||||
import org.apache.activemq.artemis.api.core.management.ObjectNameBuilder;
|
import org.apache.activemq.artemis.api.core.management.ObjectNameBuilder;
|
||||||
import org.apache.activemq.artemis.api.core.management.QueueControl;
|
import org.apache.activemq.artemis.api.core.management.QueueControl;
|
||||||
import org.apache.activemq.artemis.tests.smoke.common.SmokeTestBase;
|
|
||||||
import org.junit.Assert;
|
|
||||||
import org.junit.Before;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import javax.management.MBeanServerConnection;
|
public class AuditLoggerResourceTest extends AuditLoggerTestBase {
|
||||||
import javax.management.MBeanServerInvocationHandler;
|
|
||||||
import javax.management.openmbean.CompositeData;
|
|
||||||
import javax.management.remote.JMXConnector;
|
|
||||||
import javax.management.remote.JMXConnectorFactory;
|
|
||||||
import javax.management.remote.JMXServiceURL;
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileReader;
|
|
||||||
import java.io.FileWriter;
|
|
||||||
import java.io.PrintWriter;
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
public class AuditLoggerResourceTest extends SmokeTestBase {
|
@Override
|
||||||
|
protected String getServerName() {
|
||||||
private static final File auditLog = new File("target/audit-logging/log/audit.log");
|
return "audit-logging";
|
||||||
|
|
||||||
private static final String JMX_SERVER_HOSTNAME = "localhost";
|
|
||||||
private static final int JMX_SERVER_PORT = 10099;
|
|
||||||
|
|
||||||
public static final String SERVER_NAME = "audit-logging";
|
|
||||||
|
|
||||||
@Before
|
|
||||||
public void before() throws Exception {
|
|
||||||
cleanupData(SERVER_NAME);
|
|
||||||
disableCheckThread();
|
|
||||||
startServer(SERVER_NAME, 0, 30000);
|
|
||||||
emptyLogFile();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void emptyLogFile() throws Exception {
|
|
||||||
if (auditLog.exists()) {
|
|
||||||
try (PrintWriter writer = new PrintWriter(new FileWriter(auditLog))) {
|
|
||||||
writer.print("");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAuditResourceLog() throws Exception {
|
public void testAuditResourceLog() throws Exception {
|
||||||
HashMap environment = new HashMap();
|
JMXConnector jmxConnector = getJmxConnector();
|
||||||
String[] credentials = new String[] {"admin", "admin"};
|
|
||||||
environment.put(JMXConnector.CREDENTIALS, credentials);
|
|
||||||
// Without this, the RMI server would bind to the default interface IP (the user's local IP mostly)
|
|
||||||
System.setProperty("java.rmi.server.hostname", JMX_SERVER_HOSTNAME);
|
|
||||||
|
|
||||||
// I don't specify both ports here manually on purpose. See actual RMI registry connection port extraction below.
|
|
||||||
String urlString = "service:jmx:rmi:///jndi/rmi://" + JMX_SERVER_HOSTNAME + ":" + JMX_SERVER_PORT + "/jmxrmi";
|
|
||||||
|
|
||||||
JMXServiceURL url = new JMXServiceURL(urlString);
|
|
||||||
JMXConnector jmxConnector = null;
|
|
||||||
|
|
||||||
try {
|
|
||||||
jmxConnector = JMXConnectorFactory.connect(url, environment);
|
|
||||||
System.out.println("Successfully connected to: " + urlString);
|
|
||||||
} catch (Exception e) {
|
|
||||||
jmxConnector = null;
|
|
||||||
e.printStackTrace();
|
|
||||||
Assert.fail(e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
MBeanServerConnection mBeanServerConnection = jmxConnector.getMBeanServerConnection();
|
MBeanServerConnection mBeanServerConnection = jmxConnector.getMBeanServerConnection();
|
||||||
|
@ -132,35 +85,4 @@ public class AuditLoggerResourceTest extends SmokeTestBase {
|
||||||
jmxConnector.close();
|
jmxConnector.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//check the audit log has a line that contains all the values
|
|
||||||
private void checkAuditLogRecord(boolean exist, String... values) throws Exception {
|
|
||||||
Assert.assertTrue(auditLog.exists());
|
|
||||||
boolean hasRecord = false;
|
|
||||||
try (BufferedReader reader = new BufferedReader(new FileReader(auditLog))) {
|
|
||||||
String line = reader.readLine();
|
|
||||||
while (line != null) {
|
|
||||||
if (line.contains(values[0])) {
|
|
||||||
boolean hasAll = true;
|
|
||||||
for (int i = 1; i < values.length; i++) {
|
|
||||||
if (!line.contains(values[i])) {
|
|
||||||
hasAll = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (hasAll) {
|
|
||||||
hasRecord = true;
|
|
||||||
System.out.println("audit has it: " + line);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
line = reader.readLine();
|
|
||||||
}
|
|
||||||
if (exist) {
|
|
||||||
Assert.assertTrue(hasRecord);
|
|
||||||
} else {
|
|
||||||
Assert.assertFalse(hasRecord);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,17 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.activemq.artemis.tests.smoke.logging;
|
package org.apache.activemq.artemis.tests.smoke.logging;
|
||||||
|
|
||||||
|
import javax.jms.Connection;
|
||||||
|
import javax.jms.ConnectionFactory;
|
||||||
|
import javax.jms.MessageConsumer;
|
||||||
|
import javax.jms.MessageProducer;
|
||||||
|
import javax.jms.Session;
|
||||||
|
import javax.jms.TextMessage;
|
||||||
|
import javax.management.MBeanServerConnection;
|
||||||
|
import javax.management.MBeanServerInvocationHandler;
|
||||||
|
import javax.management.remote.JMXConnector;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
|
import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
|
||||||
import org.apache.activemq.artemis.api.core.Message;
|
import org.apache.activemq.artemis.api.core.Message;
|
||||||
import org.apache.activemq.artemis.api.core.QueueConfiguration;
|
import org.apache.activemq.artemis.api.core.QueueConfiguration;
|
||||||
|
@ -27,54 +38,23 @@ import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
|
||||||
import org.apache.activemq.artemis.api.core.client.ServerLocator;
|
import org.apache.activemq.artemis.api.core.client.ServerLocator;
|
||||||
import org.apache.activemq.artemis.api.core.management.AddressControl;
|
import org.apache.activemq.artemis.api.core.management.AddressControl;
|
||||||
import org.apache.activemq.artemis.api.core.management.ObjectNameBuilder;
|
import org.apache.activemq.artemis.api.core.management.ObjectNameBuilder;
|
||||||
import org.apache.activemq.artemis.tests.smoke.common.SmokeTestBase;
|
|
||||||
import org.apache.activemq.artemis.utils.Base64;
|
import org.apache.activemq.artemis.utils.Base64;
|
||||||
import org.apache.activemq.artemis.utils.RandomUtil;
|
import org.apache.activemq.artemis.utils.RandomUtil;
|
||||||
import org.apache.activemq.artemis.utils.Wait;
|
import org.apache.activemq.artemis.utils.Wait;
|
||||||
import org.apache.qpid.jms.JmsConnectionFactory;
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import javax.jms.Connection;
|
public class AuditLoggerTest extends AuditLoggerTestBase {
|
||||||
import javax.jms.ConnectionFactory;
|
|
||||||
import javax.jms.MessageConsumer;
|
|
||||||
import javax.jms.MessageProducer;
|
|
||||||
import javax.jms.Session;
|
|
||||||
import javax.jms.TextMessage;
|
|
||||||
import javax.management.MBeanServerConnection;
|
|
||||||
import javax.management.MBeanServerInvocationHandler;
|
|
||||||
import javax.management.remote.JMXConnector;
|
|
||||||
import javax.management.remote.JMXConnectorFactory;
|
|
||||||
import javax.management.remote.JMXServiceURL;
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileReader;
|
|
||||||
import java.io.FileWriter;
|
|
||||||
import java.io.PrintWriter;
|
|
||||||
import java.net.MalformedURLException;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
public class AuditLoggerTest extends SmokeTestBase {
|
|
||||||
|
|
||||||
private static final File auditLog = new File("target/audit-logging2/log/audit.log");
|
|
||||||
|
|
||||||
private static final String JMX_SERVER_HOSTNAME = "localhost";
|
|
||||||
private static final int JMX_SERVER_PORT = 10099;
|
|
||||||
|
|
||||||
public static final String SERVER_NAME = "audit-logging2";
|
|
||||||
|
|
||||||
protected ClientSession session;
|
protected ClientSession session;
|
||||||
private ServerLocator locator;
|
private ServerLocator locator;
|
||||||
private ClientSessionFactory sf;
|
private ClientSessionFactory sf;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
|
@Override
|
||||||
public void before() throws Exception {
|
public void before() throws Exception {
|
||||||
cleanupData(SERVER_NAME);
|
super.before();
|
||||||
disableCheckThread();
|
|
||||||
startServer(SERVER_NAME, 0, 30000);
|
|
||||||
emptyLogFile();
|
|
||||||
locator = createNonHALocator(true).setBlockOnNonDurableSend(true);
|
locator = createNonHALocator(true).setBlockOnNonDurableSend(true);
|
||||||
sf = createSessionFactory(locator);
|
sf = createSessionFactory(locator);
|
||||||
session = sf.createSession("guest", "guest", false, true, false, false, 100);
|
session = sf.createSession("guest", "guest", false, true, false, false, 100);
|
||||||
|
@ -82,12 +62,9 @@ public class AuditLoggerTest extends SmokeTestBase {
|
||||||
addClientSession(session);
|
addClientSession(session);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void emptyLogFile() throws Exception {
|
@Override
|
||||||
if (auditLog.exists()) {
|
protected String getServerName() {
|
||||||
try (PrintWriter writer = new PrintWriter(new FileWriter(auditLog))) {
|
return "audit-logging2";
|
||||||
writer.print("");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -139,30 +116,6 @@ public class AuditLoggerTest extends SmokeTestBase {
|
||||||
checkAuditLogRecord(true, "is sending a message");
|
checkAuditLogRecord(true, "is sending a message");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected JMXConnector getJmxConnector() throws MalformedURLException {
|
|
||||||
HashMap environment = new HashMap();
|
|
||||||
String[] credentials = new String[] {"admin", "admin"};
|
|
||||||
environment.put(JMXConnector.CREDENTIALS, credentials);
|
|
||||||
// Without this, the RMI server would bind to the default interface IP (the user's local IP mostly)
|
|
||||||
System.setProperty("java.rmi.server.hostname", JMX_SERVER_HOSTNAME);
|
|
||||||
|
|
||||||
// I don't specify both ports here manually on purpose. See actual RMI registry connection port extraction below.
|
|
||||||
String urlString = "service:jmx:rmi:///jndi/rmi://" + JMX_SERVER_HOSTNAME + ":" + JMX_SERVER_PORT + "/jmxrmi";
|
|
||||||
|
|
||||||
JMXServiceURL url = new JMXServiceURL(urlString);
|
|
||||||
JMXConnector jmxConnector = null;
|
|
||||||
|
|
||||||
try {
|
|
||||||
jmxConnector = JMXConnectorFactory.connect(url, environment);
|
|
||||||
System.out.println("Successfully connected to: " + urlString);
|
|
||||||
} catch (Exception e) {
|
|
||||||
jmxConnector = null;
|
|
||||||
e.printStackTrace();
|
|
||||||
Assert.fail(e.getMessage());
|
|
||||||
}
|
|
||||||
return jmxConnector;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAuditHotLogCore() throws Exception {
|
public void testAuditHotLogCore() throws Exception {
|
||||||
internalSend("CORE");
|
internalSend("CORE");
|
||||||
|
@ -218,57 +171,10 @@ public class AuditLoggerTest extends SmokeTestBase {
|
||||||
Assert.assertNotNull(clientMessage);
|
Assert.assertNotNull(clientMessage);
|
||||||
clientMessage = consumer.receive(5000);
|
clientMessage = consumer.receive(5000);
|
||||||
Assert.assertNotNull(clientMessage);
|
Assert.assertNotNull(clientMessage);
|
||||||
checkAuditLogRecord(true, "is consuming a message from");
|
|
||||||
} finally {
|
} finally {
|
||||||
connection.close();
|
connection.close();
|
||||||
}
|
}
|
||||||
}
|
checkAuditLogRecord(true, "is consuming a message from");
|
||||||
|
checkAuditLogRecord(true, "is acknowledging a message from");
|
||||||
//check the audit log has a line that contains all the values
|
|
||||||
private void checkAuditLogRecord(boolean exist, String... values) throws Exception {
|
|
||||||
Assert.assertTrue(auditLog.exists());
|
|
||||||
boolean hasRecord = false;
|
|
||||||
try (BufferedReader reader = new BufferedReader(new FileReader(auditLog))) {
|
|
||||||
String line = reader.readLine();
|
|
||||||
while (line != null) {
|
|
||||||
if (line.contains(values[0])) {
|
|
||||||
boolean hasAll = true;
|
|
||||||
for (int i = 1; i < values.length; i++) {
|
|
||||||
if (!line.contains(values[i])) {
|
|
||||||
hasAll = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (hasAll) {
|
|
||||||
hasRecord = true;
|
|
||||||
System.out.println("audit has it: " + line);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
line = reader.readLine();
|
|
||||||
}
|
|
||||||
if (exist) {
|
|
||||||
Assert.assertTrue(hasRecord);
|
|
||||||
} else {
|
|
||||||
Assert.assertFalse(hasRecord);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ConnectionFactory createConnectionFactory(String protocol, String uri) {
|
|
||||||
if (protocol.toUpperCase().equals("OPENWIRE")) {
|
|
||||||
return new org.apache.activemq.ActiveMQConnectionFactory(uri);
|
|
||||||
} else if (protocol.toUpperCase().equals("AMQP")) {
|
|
||||||
|
|
||||||
if (uri.startsWith("tcp://")) {
|
|
||||||
// replacing tcp:// by amqp://
|
|
||||||
uri = "amqp" + uri.substring(3);
|
|
||||||
}
|
|
||||||
return new JmsConnectionFactory(uri);
|
|
||||||
} else if (protocol.toUpperCase().equals("CORE") || protocol.toUpperCase().equals("ARTEMIS")) {
|
|
||||||
return new org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory(uri);
|
|
||||||
} else {
|
|
||||||
throw new IllegalStateException("Unkown:" + protocol);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,107 @@
|
||||||
|
/*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
* (the "License"); you may not use this file except in compliance with
|
||||||
|
* the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package org.apache.activemq.artemis.tests.smoke.logging;
|
||||||
|
|
||||||
|
import javax.jms.ConnectionFactory;
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileReader;
|
||||||
|
import java.io.FileWriter;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
|
||||||
|
import org.apache.activemq.artemis.tests.smoke.common.SmokeTestBase;
|
||||||
|
import org.apache.qpid.jms.JmsConnectionFactory;
|
||||||
|
import org.junit.Assert;
|
||||||
|
import org.junit.Before;
|
||||||
|
|
||||||
|
public abstract class AuditLoggerTestBase extends SmokeTestBase {
|
||||||
|
|
||||||
|
private File auditLog = null;
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void before() throws Exception {
|
||||||
|
cleanupData(getServerName());
|
||||||
|
disableCheckThread();
|
||||||
|
startServer(getServerName(), 0, 30000);
|
||||||
|
emptyLogFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void emptyLogFile() throws Exception {
|
||||||
|
if (getAuditLog().exists()) {
|
||||||
|
try (PrintWriter writer = new PrintWriter(new FileWriter(getAuditLog()))) {
|
||||||
|
writer.print("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected File getAuditLog() {
|
||||||
|
if (auditLog == null) {
|
||||||
|
auditLog = new File("target/" + getServerName() + "/log/audit.log");
|
||||||
|
}
|
||||||
|
return auditLog;
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract String getServerName();
|
||||||
|
|
||||||
|
//check the audit log has a line that contains all the values
|
||||||
|
protected void checkAuditLogRecord(boolean exist, String... values) throws Exception {
|
||||||
|
Assert.assertTrue(getAuditLog().exists());
|
||||||
|
boolean hasRecord = false;
|
||||||
|
try (BufferedReader reader = new BufferedReader(new FileReader(getAuditLog()))) {
|
||||||
|
String line = reader.readLine();
|
||||||
|
while (line != null) {
|
||||||
|
if (line.contains(values[0])) {
|
||||||
|
boolean hasAll = true;
|
||||||
|
for (int i = 1; i < values.length; i++) {
|
||||||
|
if (!line.contains(values[i])) {
|
||||||
|
hasAll = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hasAll) {
|
||||||
|
hasRecord = true;
|
||||||
|
System.out.println("audit has it: " + line);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
line = reader.readLine();
|
||||||
|
}
|
||||||
|
if (exist) {
|
||||||
|
Assert.assertTrue(hasRecord);
|
||||||
|
} else {
|
||||||
|
Assert.assertFalse(hasRecord);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ConnectionFactory createConnectionFactory(String protocol, String uri) {
|
||||||
|
if (protocol.toUpperCase().equals("OPENWIRE")) {
|
||||||
|
return new org.apache.activemq.ActiveMQConnectionFactory(uri);
|
||||||
|
} else if (protocol.toUpperCase().equals("AMQP")) {
|
||||||
|
|
||||||
|
if (uri.startsWith("tcp://")) {
|
||||||
|
// replacing tcp:// by amqp://
|
||||||
|
uri = "amqp" + uri.substring(3);
|
||||||
|
}
|
||||||
|
return new JmsConnectionFactory(uri);
|
||||||
|
} else if (protocol.toUpperCase().equals("CORE") || protocol.toUpperCase().equals("ARTEMIS")) {
|
||||||
|
return new org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory(uri);
|
||||||
|
} else {
|
||||||
|
throw new IllegalStateException("Unkown:" + protocol);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue