[Carbon-commits] [Carbon Components] svn commit r44797 - in trunk/carbon-components: governance/org.wso2.carbon.governance.dashboardpopulator/src/main/java/org/wso2/carbon/governance/dashboardpopulator/internal governance/org.wso2.carbon.governance.gadgetsource/src/main/java/org/wso2/carbon/governance/gadgetsource/internal governance/org.wso2.carbon.governance.list/src/main/java/org/wso2/carbon/governance/list/internal governance/org.wso2.carbon.governance.registry.eventing/src/main/java/org/wso2/carbon/governance/registry/eventing/internal governance/org.wso2.carbon.governance.samples.lcm.notifications/src/main/java/org/wso2/carbon/governance/samples/lcm/notifications/internal registry/org.wso2.carbon.registry.eventing/src/main/java/org/wso2/carbon/registry/eventing/handlers/erbsm registry/org.wso2.carbon.registry.eventing/src/main/java/org/wso2/carbon/registry/eventing/internal registry/org.wso2.carbon.registry.eventing/src/main/java/org/wso2/carbon/registry/eventing/receivers registry/org.wso2.carbon.registry.info/src/main/java/org/wso2/carbon/registry/info/services registry/org.wso2.carbon.registry.info/src/main/java/org/wso2/carbon/registry/info/services/utils registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils
senaka at wso2.com
senaka at wso2.com
Wed Sep 2 20:38:47 PDT 2009
Author: senaka
Date: Wed Sep 2 20:38:46 2009
New Revision: 44797
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=44797
Log:
fixing log4j inconsistencies.
Modified:
trunk/carbon-components/governance/org.wso2.carbon.governance.dashboardpopulator/src/main/java/org/wso2/carbon/governance/dashboardpopulator/internal/DashboardPopulatorServiceComponent.java
trunk/carbon-components/governance/org.wso2.carbon.governance.gadgetsource/src/main/java/org/wso2/carbon/governance/gadgetsource/internal/GovernanceMgtUIGadgetSourceServiceComponent.java
trunk/carbon-components/governance/org.wso2.carbon.governance.list/src/main/java/org/wso2/carbon/governance/list/internal/GovernanceMgtUIListMetadataServiceComponent.java
trunk/carbon-components/governance/org.wso2.carbon.governance.registry.eventing/src/main/java/org/wso2/carbon/governance/registry/eventing/internal/GovernanceRegistryEventingServiceComponent.java
trunk/carbon-components/governance/org.wso2.carbon.governance.samples.lcm.notifications/src/main/java/org/wso2/carbon/governance/samples/lcm/notifications/internal/DLCMNotificationsServiceComponent.java
trunk/carbon-components/registry/org.wso2.carbon.registry.eventing/src/main/java/org/wso2/carbon/registry/eventing/handlers/erbsm/EmbeddedRegistryBasedSubscriptionManagerResourceRelocateHandler.java
trunk/carbon-components/registry/org.wso2.carbon.registry.eventing/src/main/java/org/wso2/carbon/registry/eventing/internal/RegistryEventingServiceComponent.java
trunk/carbon-components/registry/org.wso2.carbon.registry.eventing/src/main/java/org/wso2/carbon/registry/eventing/receivers/RegistryEventingMessageReceiver.java
trunk/carbon-components/registry/org.wso2.carbon.registry.info/src/main/java/org/wso2/carbon/registry/info/services/InfoService.java
trunk/carbon-components/registry/org.wso2.carbon.registry.info/src/main/java/org/wso2/carbon/registry/info/services/utils/SubscriptionBeanPopulator.java
trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/AddRolePermissionUtil.java
trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/AddUserPermissionUtil.java
trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/ChangeRolePermissionsUtil.java
trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/ChangeUserPermissionsUtil.java
trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/GetResourceTreeEntryUtil.java
Modified: trunk/carbon-components/governance/org.wso2.carbon.governance.dashboardpopulator/src/main/java/org/wso2/carbon/governance/dashboardpopulator/internal/DashboardPopulatorServiceComponent.java
URL: http://wso2.org/svn/browse/wso2/trunk/carbon-components/governance/org.wso2.carbon.governance.dashboardpopulator/src/main/java/org/wso2/carbon/governance/dashboardpopulator/internal/DashboardPopulatorServiceComponent.java?rev=44797&r1=44796&r2=44797&view=diff
==============================================================================
--- trunk/carbon-components/governance/org.wso2.carbon.governance.dashboardpopulator/src/main/java/org/wso2/carbon/governance/dashboardpopulator/internal/DashboardPopulatorServiceComponent.java (original)
+++ trunk/carbon-components/governance/org.wso2.carbon.governance.dashboardpopulator/src/main/java/org/wso2/carbon/governance/dashboardpopulator/internal/DashboardPopulatorServiceComponent.java Wed Sep 2 20:38:46 2009
@@ -106,16 +106,12 @@
}
protected void setRegistryService(RegistryService registryService) {
- if (log.isDebugEnabled()) {
- log.info("Setting the Registry Service");
- }
+ log.debug("Setting the Registry Service");
DashboardPopulatorContext.setRegistryService(registryService);
}
protected void unsetRegistryService(RegistryService registryService) {
- if (log.isDebugEnabled()) {
- log.info("Unsetting the Registry Service");
- }
+ log.debug("Unsetting the Registry Service");
DashboardPopulatorContext.setRegistryService(null);
}
}
Modified: trunk/carbon-components/governance/org.wso2.carbon.governance.gadgetsource/src/main/java/org/wso2/carbon/governance/gadgetsource/internal/GovernanceMgtUIGadgetSourceServiceComponent.java
URL: http://wso2.org/svn/browse/wso2/trunk/carbon-components/governance/org.wso2.carbon.governance.gadgetsource/src/main/java/org/wso2/carbon/governance/gadgetsource/internal/GovernanceMgtUIGadgetSourceServiceComponent.java?rev=44797&r1=44796&r2=44797&view=diff
==============================================================================
--- trunk/carbon-components/governance/org.wso2.carbon.governance.gadgetsource/src/main/java/org/wso2/carbon/governance/gadgetsource/internal/GovernanceMgtUIGadgetSourceServiceComponent.java (original)
+++ trunk/carbon-components/governance/org.wso2.carbon.governance.gadgetsource/src/main/java/org/wso2/carbon/governance/gadgetsource/internal/GovernanceMgtUIGadgetSourceServiceComponent.java Wed Sep 2 20:38:46 2009
@@ -33,15 +33,11 @@
private static Log log = LogFactory.getLog(GovernanceMgtUIGadgetSourceServiceComponent.class);
protected void activate(ComponentContext context) {
- if(log.isDebugEnabled()){
- log.debug("Governance Gadget Source bundle is activated ");
- }
+ log.debug("Governance Gadget Source bundle is activated ");
}
protected void deactivate(ComponentContext context) {
- if(log.isDebugEnabled()){
- log.debug("Governance Gadget Source bundle is deactivated ");
- }
+ log.debug("Governance Gadget Source bundle is deactivated ");
}
protected void setRegistryService(RegistryService registryService) {
Modified: trunk/carbon-components/governance/org.wso2.carbon.governance.list/src/main/java/org/wso2/carbon/governance/list/internal/GovernanceMgtUIListMetadataServiceComponent.java
URL: http://wso2.org/svn/browse/wso2/trunk/carbon-components/governance/org.wso2.carbon.governance.list/src/main/java/org/wso2/carbon/governance/list/internal/GovernanceMgtUIListMetadataServiceComponent.java?rev=44797&r1=44796&r2=44797&view=diff
==============================================================================
--- trunk/carbon-components/governance/org.wso2.carbon.governance.list/src/main/java/org/wso2/carbon/governance/list/internal/GovernanceMgtUIListMetadataServiceComponent.java (original)
+++ trunk/carbon-components/governance/org.wso2.carbon.governance.list/src/main/java/org/wso2/carbon/governance/list/internal/GovernanceMgtUIListMetadataServiceComponent.java Wed Sep 2 20:38:46 2009
@@ -33,15 +33,11 @@
private static Log log = LogFactory.getLog(GovernanceMgtUIListMetadataServiceComponent.class);
protected void activate(ComponentContext context) {
- if(log.isDebugEnabled()){
- log.debug("Governance List Metadata bundle is activated ");
- }
+ log.debug("Governance List Metadata bundle is activated ");
}
protected void deactivate(ComponentContext context) {
- if(log.isDebugEnabled()){
- log.debug("Governance List Metadata bundle is deactivated ");
- }
+ log.debug("Governance List Metadata bundle is deactivated ");
}
protected void setRegistryService(RegistryService registryService) {
Modified: trunk/carbon-components/governance/org.wso2.carbon.governance.registry.eventing/src/main/java/org/wso2/carbon/governance/registry/eventing/internal/GovernanceRegistryEventingServiceComponent.java
URL: http://wso2.org/svn/browse/wso2/trunk/carbon-components/governance/org.wso2.carbon.governance.registry.eventing/src/main/java/org/wso2/carbon/governance/registry/eventing/internal/GovernanceRegistryEventingServiceComponent.java?rev=44797&r1=44796&r2=44797&view=diff
==============================================================================
--- trunk/carbon-components/governance/org.wso2.carbon.governance.registry.eventing/src/main/java/org/wso2/carbon/governance/registry/eventing/internal/GovernanceRegistryEventingServiceComponent.java (original)
+++ trunk/carbon-components/governance/org.wso2.carbon.governance.registry.eventing/src/main/java/org/wso2/carbon/governance/registry/eventing/internal/GovernanceRegistryEventingServiceComponent.java Wed Sep 2 20:38:46 2009
@@ -53,15 +53,11 @@
private boolean initialized = false;
protected void activate(ComponentContext context) {
- if(log.isDebugEnabled()){
- log.debug("Governance Eventing bundle is activated ");
- }
+ log.debug("Governance Eventing bundle is activated ");
}
protected void deactivate(ComponentContext context) {
- if(log.isDebugEnabled()){
- log.debug("Governance Eventing bundle is deactivated ");
- }
+ log.debug("Governance Eventing bundle is deactivated ");
}
protected void setRegistryService(RegistryService registryService) {
Modified: trunk/carbon-components/governance/org.wso2.carbon.governance.samples.lcm.notifications/src/main/java/org/wso2/carbon/governance/samples/lcm/notifications/internal/DLCMNotificationsServiceComponent.java
URL: http://wso2.org/svn/browse/wso2/trunk/carbon-components/governance/org.wso2.carbon.governance.samples.lcm.notifications/src/main/java/org/wso2/carbon/governance/samples/lcm/notifications/internal/DLCMNotificationsServiceComponent.java?rev=44797&r1=44796&r2=44797&view=diff
==============================================================================
--- trunk/carbon-components/governance/org.wso2.carbon.governance.samples.lcm.notifications/src/main/java/org/wso2/carbon/governance/samples/lcm/notifications/internal/DLCMNotificationsServiceComponent.java (original)
+++ trunk/carbon-components/governance/org.wso2.carbon.governance.samples.lcm.notifications/src/main/java/org/wso2/carbon/governance/samples/lcm/notifications/internal/DLCMNotificationsServiceComponent.java Wed Sep 2 20:38:46 2009
@@ -53,15 +53,11 @@
private boolean initialized = false;
protected void activate(ComponentContext context) {
- if(log.isDebugEnabled()){
- log.info("DLCM Notifications bundle is activated ");
- }
+ log.debug("DLCM Notifications bundle is activated ");
}
protected void deactivate(ComponentContext context) {
- if(log.isDebugEnabled()){
- log.info("DLCM Notifications bundle is deactivated ");
- }
+ log.debug("DLCM Notifications bundle is deactivated ");
}
protected void setRegistryService(RegistryService registryService) {
Modified: trunk/carbon-components/registry/org.wso2.carbon.registry.eventing/src/main/java/org/wso2/carbon/registry/eventing/handlers/erbsm/EmbeddedRegistryBasedSubscriptionManagerResourceRelocateHandler.java
URL: http://wso2.org/svn/browse/wso2/trunk/carbon-components/registry/org.wso2.carbon.registry.eventing/src/main/java/org/wso2/carbon/registry/eventing/handlers/erbsm/EmbeddedRegistryBasedSubscriptionManagerResourceRelocateHandler.java?rev=44797&r1=44796&r2=44797&view=diff
==============================================================================
--- trunk/carbon-components/registry/org.wso2.carbon.registry.eventing/src/main/java/org/wso2/carbon/registry/eventing/handlers/erbsm/EmbeddedRegistryBasedSubscriptionManagerResourceRelocateHandler.java (original)
+++ trunk/carbon-components/registry/org.wso2.carbon.registry.eventing/src/main/java/org/wso2/carbon/registry/eventing/handlers/erbsm/EmbeddedRegistryBasedSubscriptionManagerResourceRelocateHandler.java Wed Sep 2 20:38:46 2009
@@ -40,9 +40,7 @@
private static Log log = LogFactory.getLog(EmbeddedRegistryBasedSubscriptionManagerResourceRelocateHandler.class);
public String move(RequestContext requestContext) throws RegistryException {
- if (log.isDebugEnabled()) {
- log.info("Started Moving subscription detail");
- }
+ log.debug("Started Moving subscription detail");
String sourcePath = requestContext.getSourcePath();
String targetPath = requestContext.getTargetPath();
//Registry registry = Utils.getSystemRegistry();
@@ -53,9 +51,7 @@
return null;
}
} catch (RegistryException e) {
- if (log.isDebugEnabled()) {
- log.warn("Failed to Move subscription detail " + e.getMessage());
- }
+ log.warn("Failed to Move subscription detail " + e.getMessage());
return null;
}
Resource topicIndex = registry.get(getSubStoreContext() +
@@ -113,16 +109,14 @@
requestContext.getRepository().put(getSubStoreContext() +
EmbeddedRegistryBasedSubscriptionManager.TOPIC_INDEX, topicIndex);
if (log.isDebugEnabled()) {
- log.info("Moved subscription detail from: " + getSubStoreContext() + sourcePath +
+ log.debug("Moved subscription detail from: " + getSubStoreContext() + sourcePath +
" to: " + getSubStoreContext() + targetPath);
}
return null;
}
public String copy(RequestContext requestContext) throws RegistryException {
- if (log.isDebugEnabled()) {
- log.info("Started Copying subscription detail");
- }
+ log.debug("Started Copying subscription detail");
String uuid = UUIDGenerator.getUUID();
String sourcePath = requestContext.getSourcePath();
String targetPath = requestContext.getTargetPath();
@@ -134,9 +128,7 @@
return null;
}
} catch (RegistryException e) {
- if (log.isDebugEnabled()) {
- log.warn("Failed to Copy subscription detail " + e.getMessage());
- }
+ log.warn("Failed to Copy subscription detail " + e.getMessage());
return null;
}
Resource topicIndex = registry.get(getSubStoreContext() +
@@ -147,7 +139,7 @@
}
registry.copy(getSubStoreContext() + sourcePath, getSubStoreContext() + targetPath);
if (log.isDebugEnabled()) {
- log.info("Copied subscription detail from: " + getSubStoreContext() + sourcePath +
+ log.debug("Copied subscription detail from: " + getSubStoreContext() + sourcePath +
" to: " + getSubStoreContext() + targetPath);
}
Map<String, String> addMap = new HashMap<String, String>();
@@ -171,9 +163,7 @@
String newSubPath = getSubStoreContext() + topic + RegistryConstants.PATH_SEPARATOR + uuid;
registry.move(oldSubPath, newSubPath);
addMap.put(uuid, topic);
- if (log.isDebugEnabled()) {
- log.debug("Added subscription entry under key: " + uuid);
- }
+ log.debug("Added subscription entry under key: " + uuid);
Resource newResource = registry.get(newSubPath);
if (newResource != null) {
String filterValue = newResource.getProperty(EmbeddedRegistryBasedSubscriptionManager.FILTER_VALUE);
@@ -200,9 +190,7 @@
}
public String rename(RequestContext requestContext) throws RegistryException {
- if (log.isDebugEnabled()) {
- log.info("Started Renaming subscription detail");
- }
+ log.debug("Started Renaming subscription detail");
String sourcePath = requestContext.getSourcePath();
String targetPath = requestContext.getTargetPath();
//Registry registry = Utils.getSystemRegistry();
@@ -213,9 +201,7 @@
return null;
}
} catch (RegistryException e) {
- if (log.isDebugEnabled()) {
- log.warn("Failed to Rename subscription detail " + e.getMessage());
- }
+ log.warn("Failed to Rename subscription detail " + e.getMessage());
return null;
}
Resource topicIndex = registry.get(getSubStoreContext() +
@@ -273,16 +259,14 @@
requestContext.getRepository().put(getSubStoreContext() +
EmbeddedRegistryBasedSubscriptionManager.TOPIC_INDEX, topicIndex);
if (log.isDebugEnabled()) {
- log.info("Renamed subscription detail from: " + getSubStoreContext() + sourcePath +
+ log.debug("Renamed subscription detail from: " + getSubStoreContext() + sourcePath +
" to: " + getSubStoreContext() + targetPath);
}
return null;
}
public void delete(RequestContext requestContext) throws RegistryException {
- if (log.isDebugEnabled()) {
- log.info("Started Deleting subscription detail");
- }
+ log.debug("Started Deleting subscription detail");
String path = requestContext.getResourcePath().getPath();
//Registry registry = Utils.getSystemRegistry();
Registry registry = requestContext.getRegistry();
@@ -292,9 +276,7 @@
return;
}
} catch (RegistryException e) {
- if (log.isDebugEnabled()) {
- log.warn("Failed to Delete subscription detail " + e.getMessage());
- }
+ log.warn("Failed to Delete subscription detail " + e.getMessage());
return;
}
Resource topicIndex = registry.get(getSubStoreContext() +
@@ -318,9 +300,7 @@
}
String topic = (String)name;
if (topic.startsWith(path)) {
- if (log.isDebugEnabled()) {
- log.debug("Deleted topic: " + topic);
- }
+ log.debug("Deleted topic: " + topic);
removeList.add((String)key);
propertiesModified = true;
}
@@ -339,7 +319,7 @@
EmbeddedRegistryBasedSubscriptionManager.TOPIC_INDEX, topicIndex);
registry.delete(getSubStoreContext() + path);
if (log.isDebugEnabled()) {
- log.info("Removed subscription detail from: " + getSubStoreContext() + path);
+ log.debug("Removed subscription detail from: " + getSubStoreContext() + path);
}
}
}
Modified: trunk/carbon-components/registry/org.wso2.carbon.registry.eventing/src/main/java/org/wso2/carbon/registry/eventing/internal/RegistryEventingServiceComponent.java
URL: http://wso2.org/svn/browse/wso2/trunk/carbon-components/registry/org.wso2.carbon.registry.eventing/src/main/java/org/wso2/carbon/registry/eventing/internal/RegistryEventingServiceComponent.java?rev=44797&r1=44796&r2=44797&view=diff
==============================================================================
--- trunk/carbon-components/registry/org.wso2.carbon.registry.eventing/src/main/java/org/wso2/carbon/registry/eventing/internal/RegistryEventingServiceComponent.java (original)
+++ trunk/carbon-components/registry/org.wso2.carbon.registry.eventing/src/main/java/org/wso2/carbon/registry/eventing/internal/RegistryEventingServiceComponent.java Wed Sep 2 20:38:46 2009
@@ -137,9 +137,7 @@
log.error(msg);
throw new ActivationException(msg);
}
- if (log.isDebugEnabled()) {
- log.info("The Registry Eventing Service is available at: " + endpoint);
- }
+ log.debug("The Registry Eventing Service is available at: " + endpoint);
RegistryEventSource registryEventSource = RegistryEventSource.getInstance();
// TODO: The Subscription manager should be picked from some configuration file and dynamically generated in here.
try {
@@ -175,9 +173,7 @@
}
bundleContext = context.getBundleContext();
registerEventingService();
- if(log.isDebugEnabled()){
- log.debug("Registry Eventing bundle is activated ");
- }
+ log.debug("Registry Eventing bundle is activated ");
}
private void registerEventingService() {
@@ -200,9 +196,7 @@
protected void deactivate(ComponentContext context) {
unregisterEventingService();
- if(log.isDebugEnabled()){
- log.debug("Registry Eventing bundle is deactivated ");
- }
+ log.debug("Registry Eventing bundle is deactivated ");
}
protected void setConfigurationContextService(ConfigurationContextService configurationContextService) {
Modified: trunk/carbon-components/registry/org.wso2.carbon.registry.eventing/src/main/java/org/wso2/carbon/registry/eventing/receivers/RegistryEventingMessageReceiver.java
URL: http://wso2.org/svn/browse/wso2/trunk/carbon-components/registry/org.wso2.carbon.registry.eventing/src/main/java/org/wso2/carbon/registry/eventing/receivers/RegistryEventingMessageReceiver.java?rev=44797&r1=44796&r2=44797&view=diff
==============================================================================
--- trunk/carbon-components/registry/org.wso2.carbon.registry.eventing/src/main/java/org/wso2/carbon/registry/eventing/receivers/RegistryEventingMessageReceiver.java (original)
+++ trunk/carbon-components/registry/org.wso2.carbon.registry.eventing/src/main/java/org/wso2/carbon/registry/eventing/receivers/RegistryEventingMessageReceiver.java Wed Sep 2 20:38:46 2009
@@ -65,9 +65,7 @@
try {
processMessage(mc);
} catch (EventException e) {
- if (log.isDebugEnabled()) {
- log.error("An exception occured. Unable to Process Request", e);
- }
+ log.error("An exception occured. Unable to Process Request", e);
ResponseMessageBuilder messageBuilder = new ResponseMessageBuilder(mc);
SOAPEnvelope soapEnvelope = messageBuilder.genFaultResponse(mc,
RegistryEventingConstants.WSE_FAULT_CODE_RECEIVER, "EventSourceUnableToProcess",
@@ -121,18 +119,14 @@
messageBuilder.genSubscriptionResponse(subscription);
dispatchResponse(soapEnvelope, RegistryEventingConstants.WSE_SUBSCRIBE_RESPONSE, mc, false);
} else {
- if (log.isDebugEnabled()) {
- log.debug("Subscription Failed, sending fault response");
- }
+ log.debug("Subscription Failed, sending fault response");
SOAPEnvelope soapEnvelope = messageBuilder.genFaultResponse(mc,
RegistryEventingConstants.WSE_FAULT_CODE_RECEIVER, "EventSourceUnableToProcess",
"Unable to subscribe ", "");
dispatchResponse(soapEnvelope, RegistryEventingConstants.WSA_FAULT, mc, true);
}
} else {
- if (log.isDebugEnabled()) {
- log.debug("Subscription Failed, sending fault response");
- }
+ log.debug("Subscription Failed, sending fault response");
SOAPEnvelope soapEnvelope = messageBuilder.genFaultResponse(mc,
SubscriptionBuilder.getErrorCode(),
SubscriptionBuilder.getErrorSubCode(),
@@ -154,9 +148,7 @@
SOAPEnvelope soapEnvelope = messageBuilder.genUnSubscribeResponse(subscription);
dispatchResponse(soapEnvelope, RegistryEventingConstants.WSE_UNSUBSCRIBE_RESPONSE, mc, false);
} else {
- if (log.isDebugEnabled()) {
- log.debug("UnSubscription failed, sending fault repsponse");
- }
+ log.debug("UnSubscription failed, sending fault repsponse");
SOAPEnvelope soapEnvelope = messageBuilder.genFaultResponse(mc,
RegistryEventingConstants.WSE_FAULT_CODE_RECEIVER, "EventSourceUnableToProcess",
"Unable to Unsubscribe", "");
@@ -177,9 +169,7 @@
SOAPEnvelope soapEnvelope = messageBuilder.genGetStatusResponse(subscription);
dispatchResponse(soapEnvelope, RegistryEventingConstants.WSE_GET_STATUS_RESPONSE, mc, false);
} else {
- if (log.isDebugEnabled()) {
- log.debug("GetStatus failed, sending fault response");
- }
+ log.debug("GetStatus failed, sending fault response");
SOAPEnvelope soapEnvelope = messageBuilder.genFaultResponse(mc,
RegistryEventingConstants.WSE_FAULT_CODE_RECEIVER, "EventSourceUnableToProcess",
"Subscription Not Found", "");
@@ -213,9 +203,7 @@
messageBuilder.genRenewSubscriptionResponse(subscription);
dispatchResponse(soapEnvelope, RegistryEventingConstants.WSE_RENEW_RESPONSE, mc, false);
} else {
- if (log.isDebugEnabled()) {
- log.debug("Renew failed, sending fault response");
- }
+ log.debug("Renew failed, sending fault response");
SOAPEnvelope soapEnvelope = messageBuilder.genFaultResponse(mc,
RegistryEventingConstants.WSE_FAULT_CODE_RECEIVER, "UnableToRenew",
"Subscription Not Found", "");
@@ -229,10 +217,7 @@
dispatchResponse(soapEnvelope, RegistryEventingConstants.WSA_FAULT, mc, true);
}
} else {
- if (log.isDebugEnabled()) {
- log.debug("Received Event");
- //notify(new RegistryEvent<SOAPEnvelope>(mc.getEnvelope()), "http://localhost:8280/services/SimpleLoggerSink");
- }
+ log.debug("Received Event");
Event<MessageContext> emc = new Event<MessageContext>();
emc.setMessage(mc);
log.debug("Fetching subscribed endpoints");
@@ -241,9 +226,7 @@
if (endpoint == null || endpoint[0] == null) {
continue;
} else if (endpoint[0].toLowerCase().startsWith("mailto:")) {
- if (log.isDebugEnabled()) {
- log.debug("Sending Notification to: " + endpoint[0]);
- }
+ log.debug("Sending Notification to: " + endpoint[0]);
OMElement payload = mc.getEnvelope().getBody().getFirstElement();
if (payload != null) {
RegistryEvent<String> re = new RegistryEvent<String>(payload.getText());
@@ -266,14 +249,10 @@
UserCoreConstants.ClaimTypeURIs.EMAIL_ADDRESS, UserCoreConstants.DEFAULT_PROFILE);
}
} catch (Exception e) {
- if (log.isDebugEnabled()) {
- log.error("Failed Sending Notification to: " + endpoint[0]);
- }
+ log.error("Failed Sending Notification to: " + endpoint[0]);
continue;
}
- if (log.isDebugEnabled()) {
- log.debug("Sending Notification to: " + email);
- }
+ log.debug("Sending Notification to: " + email);
OMElement payload = mc.getEnvelope().getBody().getFirstElement();
if (payload != null) {
RegistryEvent<String> re = new RegistryEvent<String>(payload.getText());
@@ -285,9 +264,7 @@
instance.notify(re, email, true);
}
} else {
- if (log.isDebugEnabled()) {
- log.debug("Sending Notification to: " + endpoint[0]);
- }
+ log.debug("Sending Notification to: " + endpoint[0]);
RegistryEvent<SOAPEnvelope> re = new RegistryEvent<SOAPEnvelope>(mc.getEnvelope());
re.setTopic(endpoint[1]);
if (endpoint[2] != null && endpoint[2].equals(Boolean.toString(Boolean.TRUE))) {
Modified: trunk/carbon-components/registry/org.wso2.carbon.registry.info/src/main/java/org/wso2/carbon/registry/info/services/InfoService.java
URL: http://wso2.org/svn/browse/wso2/trunk/carbon-components/registry/org.wso2.carbon.registry.info/src/main/java/org/wso2/carbon/registry/info/services/InfoService.java?rev=44797&r1=44796&r2=44797&view=diff
==============================================================================
--- trunk/carbon-components/registry/org.wso2.carbon.registry.info/src/main/java/org/wso2/carbon/registry/info/services/InfoService.java (original)
+++ trunk/carbon-components/registry/org.wso2.carbon.registry.info/src/main/java/org/wso2/carbon/registry/info/services/InfoService.java Wed Sep 2 20:38:46 2009
@@ -161,7 +161,7 @@
if (resource != null && (resource instanceof Collection)) {
log.debug("Found Collection at path: " + path);
return false;
- } else if (resource == null && log.isDebugEnabled()) {
+ } else if (resource == null) {
log.error("No resource was found at path: " + path);
} else {
log.debug("Found Resource at path: " + path);
@@ -230,9 +230,7 @@
if (username == null || !username.equals(registry.getUserName())) {
if (!SubscriptionBeanPopulator.isAuthorized(registry, path,
AccessControlConstants.AUTHORIZE)) {
- if (log.isDebugEnabled()) {
- log.warn("User doesn't have AUTHORIZE priviledges, can't unsubscribe");
- }
+ log.warn("User doesn't have AUTHORIZE priviledges, can't unsubscribe");
return false;
}
} else if (!SubscriptionBeanPopulator.isAuthorized(registry, path,
Modified: trunk/carbon-components/registry/org.wso2.carbon.registry.info/src/main/java/org/wso2/carbon/registry/info/services/utils/SubscriptionBeanPopulator.java
URL: http://wso2.org/svn/browse/wso2/trunk/carbon-components/registry/org.wso2.carbon.registry.info/src/main/java/org/wso2/carbon/registry/info/services/utils/SubscriptionBeanPopulator.java?rev=44797&r1=44796&r2=44797&view=diff
==============================================================================
--- trunk/carbon-components/registry/org.wso2.carbon.registry.info/src/main/java/org/wso2/carbon/registry/info/services/utils/SubscriptionBeanPopulator.java (original)
+++ trunk/carbon-components/registry/org.wso2.carbon.registry.info/src/main/java/org/wso2/carbon/registry/info/services/utils/SubscriptionBeanPopulator.java Wed Sep 2 20:38:46 2009
@@ -50,9 +50,7 @@
SubscriptionInstance subscriptionInstance = new SubscriptionInstance();
if (subscription != null) {
if (subscription.getId() == null || subscription.getFilterValue() == null) {
- if (log.isDebugEnabled()) {
- log.error("Failed getting ID or Filter Value");
- }
+ log.error("Failed getting ID or Filter Value");
return null;
}
String eventName = subscription.getFilterValue().substring(
@@ -97,9 +95,7 @@
try {
resource = userRegistry.get(path);
} catch (Exception e) {
- if (log.isDebugEnabled()) {
- log.warn("Unable to fetch Resource at path: " + path);
- }
+ log.warn("Unable to fetch Resource at path: " + path);
resource = null;
}
} else {
@@ -158,15 +154,11 @@
if (username == null || !username.equals(userRegistry.getUserName())) {
if (!isAuthorized(userRegistry, testPath, AccessControlConstants.AUTHORIZE)) {
- if (log.isDebugEnabled()) {
- log.warn("User does not have AUTHORIZE priviledge to see this subscription");
- }
+ log.warn("User does not have AUTHORIZE priviledge to see this subscription");
continue;
}
} else if (!isAuthorized(userRegistry, testPath, ActionConstants.GET)) {
- if (log.isDebugEnabled()) {
- log.warn("User does not have GET priviledge to see this subscription");
- }
+ log.warn("User does not have GET priviledge to see this subscription");
continue;
}
}
@@ -195,10 +187,8 @@
} catch (Exception e) {
String msg = "Failed to get subscriptions information of the resource " +
resourcePath + ". " + e.getMessage();
- if (log.isDebugEnabled()) {
- log.error("Failed to get subscriptions information of the resource " +
+ log.error("Failed to get subscriptions information of the resource " +
resourcePath + ".", e);
- }
subscriptionBean.setErrorMessage(msg);
}
return subscriptionBean;
@@ -239,9 +229,7 @@
try {
resource = userRegistry.get(path);
} catch (Exception e) {
- if (log.isDebugEnabled()) {
- log.warn("Unable to fetch Resource at path: " + path);
- }
+ log.warn("Unable to fetch Resource at path: " + path);
resource = null;
}
if (resource != null) {
@@ -308,10 +296,8 @@
} catch (Exception e) {
String msg = "Failed to subscribe to information of the resource " +
resourcePath + ". " + e.getMessage();
- if (log.isDebugEnabled()) {
- log.error("Failed to subscribe to information of the resource " +
+ log.error("Failed to subscribe to information of the resource " +
resourcePath + ".", e);
- }
subscriptionBean.setErrorMessage(msg);
}
return subscriptionBean;
Modified: trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/AddRolePermissionUtil.java
URL: http://wso2.org/svn/browse/wso2/trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/AddRolePermissionUtil.java?rev=44797&r1=44796&r2=44797&view=diff
==============================================================================
--- trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/AddRolePermissionUtil.java (original)
+++ trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/AddRolePermissionUtil.java Wed Sep 2 20:38:46 2009
@@ -116,9 +116,7 @@
}*/
String msg = "Role authorization performed successfully.";
- if(log.isDebugEnabled()) {
- log.debug(msg);
- }
+ log.debug(msg);
} catch (UserStoreException e) {
String msg = "Failed to add role permissions. " + e.getMessage();
Modified: trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/AddUserPermissionUtil.java
URL: http://wso2.org/svn/browse/wso2/trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/AddUserPermissionUtil.java?rev=44797&r1=44796&r2=44797&view=diff
==============================================================================
--- trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/AddUserPermissionUtil.java (original)
+++ trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/AddUserPermissionUtil.java Wed Sep 2 20:38:46 2009
@@ -117,9 +117,7 @@
}*/
String msg = "User authorization performed successfully.";
- if(log.isDebugEnabled()) {
- log.debug(msg);
- }
+ log.debug(msg);
} catch (UserStoreException e) {
String msg = "Failed to add user permission.";
Modified: trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/ChangeRolePermissionsUtil.java
URL: http://wso2.org/svn/browse/wso2/trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/ChangeRolePermissionsUtil.java?rev=44797&r1=44796&r2=44797&view=diff
==============================================================================
--- trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/ChangeRolePermissionsUtil.java (original)
+++ trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/ChangeRolePermissionsUtil.java Wed Sep 2 20:38:46 2009
@@ -142,9 +142,7 @@
}
String msg = "Role authorizations performed successfully.";
- if(log.isDebugEnabled()) {
- log.debug(msg);
- }
+ log.debug(msg);
} catch (UserStoreException e) {
String msg = "Couldn't set authorizations. Caused by: " + e.getMessage();
log.error(msg, e);
Modified: trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/ChangeUserPermissionsUtil.java
URL: http://wso2.org/svn/browse/wso2/trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/ChangeUserPermissionsUtil.java?rev=44797&r1=44796&r2=44797&view=diff
==============================================================================
--- trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/ChangeUserPermissionsUtil.java (original)
+++ trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/ChangeUserPermissionsUtil.java Wed Sep 2 20:38:46 2009
@@ -160,9 +160,7 @@
}
String msg = "User authorizations performed successfully.";
- if(log.isDebugEnabled()) {
- log.debug(msg);
- }
+ log.debug(msg);
} catch (Exception e) {
String msg = "Couldn't set authorizations. Caused by: " + e.getMessage();
Modified: trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/GetResourceTreeEntryUtil.java
URL: http://wso2.org/svn/browse/wso2/trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/GetResourceTreeEntryUtil.java?rev=44797&r1=44796&r2=44797&view=diff
==============================================================================
--- trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/GetResourceTreeEntryUtil.java (original)
+++ trunk/carbon-components/registry/org.wso2.carbon.registry.resource/src/main/java/org/wso2/carbon/registry/resource/services/utils/GetResourceTreeEntryUtil.java Wed Sep 2 20:38:46 2009
@@ -48,7 +48,7 @@
if (log.isDebugEnabled()) {
// We need to log this as an error, only if we are in debug mode. If not, this is
// not required to be known.
- log.error("An exception occured: ", e);
+ log.debug("[ERROR] An exception occured: ", e);
}
resource = null;
} finally {
More information about the Carbon-commits
mailing list