axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nadir Amra <a...@us.ibm.com>
Subject Re: Stop or Remove or Un-Registered Deployed Web Services Programmatically?
Date Thu, 24 Jan 2008 15:19:43 GMT
Is there a way to delete the service from axis2 engine memory - that is, 
delete the class loader for the service?  Is that what deleteServiceGroup 
does?

Nadir K. Amra


"Afkham Azeez" <afkham@gmail.com> wrote on 01/24/2008 12:36:02 AM:

> Here is how we've done this in WSAS. We've written Admin services 
> called ServiceAdmin[1] & ServiceGroupAdmin[2]. So a WS client can 
> call these admin services to stop/start services and also remove 
services. 
> 
> Here is the relevant code snippet from ServiceAdmin
>     public void stopService(String serviceName) throws Exception {
>         AxisService axisService = getAxisConfig().
> getServiceForActivation(serviceName);
>         if (axisService == null) {
>             throw new Exception("Invalid service name " + serviceName);
>         }
> 
>         try {
>             getAxisConfig().stopService(serviceName);
>         } catch (AxisFault e) {
>             String msg = "Cannot stop service " + serviceName;
>             log.error(msg, e);
>             throw new Exception(msg);
>         }
>     }
> 
> For deleting services, see the 
> ServiceGroupAdmin#deleteServiceGroup(String serviceGroupName)  method.
> 
> In these cases, you could get hold of the AxisConfiguration as follows:
> 
> MessageContext.getCurrentMessageContext().getRootContext().
> getAxisConfiguration()
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message