Dims,

I was just about to get around to that :). Basically by going through the
AxisServlet to set up the Admin Object (which would be called by JMX) the
management becomes transport specific (i.e. only for HTTP Servers, or
servers deployed in a web app). I have however completed testing the
ServiceAdmin Object which will provide this solution (included below). It
also requires a couple of minor changes to the AxisServlet class (also
included below) which relate to the intialisation of the AxisEngine. The
changes to AxisServlet are on lines 56 and 185 - 192. 

The above changes will allow static (non service calls) to stop and start
individual services.

I have create a new Feature Request (Axis - 1424) and will submit this if
that is ok,


Thanks,

Brian

-----Original Message-----
From: Davanum Srinivas [mailto:[EMAIL PROTECTED]
Sent: 30 June 2004 11:10
To: [EMAIL PROTECTED]
Subject: Re: Solution : Starting/Stoping Services on Demand


Brian,

what i had in mind was that the AxisServlet when it starts up, it will
start up the JMX thingy with the AxisEngine that it creates/uses. Will
this not work?

-- dims


----- Original Message -----
From: Brian Dillon (ext. 944) <[EMAIL PROTECTED]>
Date: Wed, 30 Jun 2004 10:41:35 +0100
Subject: Solution : Starting/Stoping Services on Demand
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>









Hi,

 

A short while ago I 
asked about stoping and starting Axis Services on demand. Davanum 
Srinivas provided a way to do this through the AdminServlet (Thanks
Dims). However
I was looking for a way that would make it possible to do through JMX or the

like. The main issue I had was that I couldn't get a reference to the
AxisEngine
which was in memory (If I created a new one it dodn't share the same 
configuration and thus couldn't see/control the deployed 
services).

 

I have found a workaround to my 
problem of not being able to locate the correct Axis Engine in memory.
If I have
a new deployed Axis Service (AdminService) then I can get the correct Axis 
Engine through;

 

AxisEngine.getCurrentMessageContext().getAxisEngine()

 

To get the SOAPService Object 
corresponding to the service I wish to stop/start I can use;

 

AxisEngine.getCurrentMessageContext().getAxisEngine().getService(serviceName
)

 

And then on the SOAPService method 
stop() and start() can be called;

 

As I mentioned this 
must be called within the context of a service call so unless we want to
start 
shipping an AdminService as part of Axis this part would be left up to
people 
themselves to call in their own AdminService.

 

Thanks,

 

Brian.



**********************************************************************

The information contained in this e-mail is confidential, may be
privileged and is intended only for the user of the recipient named
above.  If you are not the intended recipient or a representative of
the intended recipient, you have received this e-mail in error and
must not copy, use or disclose the contents of this e-mail to anybody
else.  If you have received this e-mail in error, please notify the
sender immediately by return e-mail and permanently delete the copy
you received.  This e-mail has been swept for computer viruses. 
However, you should carry out your own virus checks.

Registered in Ireland, No. 205721.  http://www.FINEOS.com

**********************************************************************







-- 
Davanum Srinivas - http://webservices.apache.org/~dims/

Attachment: AxisServlet.java
Description: Binary data

Attachment: ServiceAdmin.java
Description: Binary data

Reply via email to