Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 96810 invoked from network); 26 Jun 2007 12:03:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Jun 2007 12:03:17 -0000 Received: (qmail 74483 invoked by uid 500); 26 Jun 2007 12:03:20 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 74260 invoked by uid 500); 26 Jun 2007 12:03:19 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 74247 invoked by uid 500); 26 Jun 2007 12:03:19 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 74240 invoked by uid 99); 26 Jun 2007 12:03:19 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jun 2007 05:03:19 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jun 2007 05:03:15 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id A73361A981A; Tue, 26 Jun 2007 05:02:54 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r550781 - in /webservices/axis2/trunk/java/modules: clustering/src/org/apache/axis2/clustering/context/ clustering/src/org/apache/axis2/clustering/context/commands/ kernel/src/org/apache/axis2/context/ Date: Tue, 26 Jun 2007 12:02:54 -0000 To: axis2-cvs@ws.apache.org From: azeez@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070626120254.A73361A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: azeez Date: Tue Jun 26 05:02:53 2007 New Revision: 550781 URL: http://svn.apache.org/viewvc?view=rev&rev=550781 Log: Delete service group context functionality Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/ContextClusteringCommandFactory.java webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/commands/DeleteServiceGroupContextCommand.java webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/ContextClusteringCommandFactory.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/ContextClusteringCommandFactory.java?view=diff&rev=550781&r1=550780&r2=550781 ============================================================================== --- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/ContextClusteringCommandFactory.java (original) +++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/ContextClusteringCommandFactory.java Tue Jun 26 05:02:53 2007 @@ -22,7 +22,6 @@ import org.apache.axis2.clustering.context.commands.UpdateServiceContextCommand; import org.apache.axis2.clustering.context.commands.UpdateServiceGroupContextCommand; import org.apache.axis2.clustering.context.commands.DeleteServiceGroupContextCommand; -import org.apache.axis2.clustering.context.commands.DeleteServiceContextCommand; import org.apache.axis2.clustering.tribes.AckManager; import org.apache.axis2.context.AbstractContext; import org.apache.axis2.context.ConfigurationContext; @@ -213,20 +212,10 @@ ServiceGroupContext sgCtx = (ServiceGroupContext) abstractContext; DeleteServiceGroupContextCommand cmd = new DeleteServiceGroupContextCommand(); cmd.setUniqueId(UUIDGenerator.getUUID()); - cmd.setServiceGroupName(sgCtx.getDescription().getServiceGroupName()); cmd.setServiceGroupContextId(sgCtx.getId()); return cmd; - } else if (abstractContext instanceof ServiceContext) { - ServiceContext serviceCtx = (ServiceContext) abstractContext; - DeleteServiceContextCommand cmd = new DeleteServiceContextCommand(); - cmd.setUniqueId(UUIDGenerator.getUUID()); - cmd.setServiceGroupName(serviceCtx.getGroupName()); - cmd.setServiceGroupContextId(serviceCtx.getServiceGroupContext().getId()); - cmd.setServiceName(serviceCtx.getAxisService().getName()); - - return cmd; - } + } return null; } } Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/commands/DeleteServiceGroupContextCommand.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/commands/DeleteServiceGroupContextCommand.java?view=diff&rev=550781&r1=550780&r2=550781 ============================================================================== --- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/commands/DeleteServiceGroupContextCommand.java (original) +++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/context/commands/DeleteServiceGroupContextCommand.java Tue Jun 26 05:02:53 2007 @@ -16,25 +16,22 @@ package org.apache.axis2.clustering.context.commands; import org.apache.axis2.context.ConfigurationContext; +import org.apache.axis2.context.ServiceGroupContext; import org.apache.axis2.clustering.ClusteringFault; import org.apache.axis2.clustering.context.ContextClusteringCommand; +import org.apache.axis2.description.AxisServiceGroup; /** - * + * */ public class DeleteServiceGroupContextCommand extends ContextClusteringCommand { - private String serviceGroupName; private String serviceGroupContextId; - public void setServiceGroupName(String serviceGroupName) { - this.serviceGroupName = serviceGroupName; - } - public void setServiceGroupContextId(String serviceGroupContextId) { this.serviceGroupContextId = serviceGroupContextId; } public void execute(ConfigurationContext configurationContext) throws ClusteringFault { - // TODO: Implementation + configurationContext.removeServiceGroupContext(serviceGroupContextId); } } Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java?view=diff&rev=550781&r1=550780&r2=550781 ============================================================================== --- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java (original) +++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java Tue Jun 26 05:02:53 2007 @@ -194,7 +194,7 @@ * * * @param messageContext : MessageContext - * @throws org.apache.axis2.AxisFault : If something goes wrong + * @throws AxisFault : If something goes wrong */ public void fillServiceContextAndServiceGroupContext(MessageContext messageContext) throws AxisFault { @@ -296,7 +296,7 @@ */ public void unregisterOperationContext(String key) { synchronized (operationContextMap) { - OperationContext opCtx = (OperationContext)operationContextMap.get(key); + OperationContext opCtx = (OperationContext) operationContextMap.get(key); operationContextMap.remove(key); contextRemoved(opCtx); } @@ -343,6 +343,7 @@ * Gets a OperationContext given a Message ID. * * @return Returns OperationContext OperationContext + * @param id */ public OperationContext getOperationContext(String id) { OperationContext opCtx; @@ -385,8 +386,7 @@ valueServiceName = value.getServiceName(); valueServiceGroupName = value.getServiceGroupName(); - if ((valueOperationName != null) && (valueOperationName.equals(operationName))) - { + if ((valueOperationName != null) && (valueOperationName.equals(operationName))) { if ((valueServiceName != null) && (valueServiceName.equals(serviceName))) { if ((valueServiceGroupName != null) && (serviceGroupName != null) && (valueServiceGroupName.equals(serviceGroupName))) { @@ -438,6 +438,7 @@ * Allows users to resolve the path relative to the root diretory. * * @param path + * @return */ public File getRealPath(String path) { URL repository = axisConfiguration.getRepository(); @@ -505,12 +506,12 @@ int index = 0; for (Iterator iter = serviceGroupContextMap.keySet().iterator(); iter.hasNext();) { ids[index] = (String) iter.next(); - index ++; + index++; } for (Iterator iter = applicationSessionServiceGroupContexts.keySet().iterator(); iter.hasNext();) { ids[index] = (String) iter.next(); - index ++; + index++; } return ids; } @@ -546,7 +547,8 @@ /** * Sets the thread factory. * - * @param pool + * @param pool The thread pool + * @throws AxisFault If a thread pool has already been set */ public void setThreadPool(ThreadFactory pool) throws AxisFault { if (threadPool == null) { @@ -556,6 +558,21 @@ } } + /** + * Remove a ServiceGroupContext + * + * @param serviceGroupContextId The ID of the ServiceGroupContext + */ + public void removeServiceGroupContext(String serviceGroupContextId) { + if (serviceGroupContextMap == null) { + return; + } + ServiceGroupContext serviceGroupContext = + (ServiceGroupContext) serviceGroupContextMap.get(serviceGroupContextId); + serviceGroupContextMap.remove(serviceGroupContextId); + cleanupServiceContexts(serviceGroupContext); + } + private void cleanupServiceGroupContexts() { if (serviceGroupContextMap == null) { return; @@ -736,4 +753,4 @@ public ConfigurationContext getRootContext() { return this; } -} +} \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org For additional commands, e-mail: axis-cvs-help@ws.apache.org