You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Jim Alateras <ji...@intalio.com> on 2002/08/29 05:56:14 UTC

shutting down phoenix

Is there a facility to shutdown phoenix from the command line?

cheers
</jima> 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Programatic Shutdown of Phoenix

Posted by Stephen McConnell <mc...@apache.org>.

Peter Donald wrote:
> Hi,
> 
> On Sat, 31 Aug 2002 16:22, Peter Donald wrote:
> 
>>On Sat, 31 Aug 2002 14:27, Jim Alateras wrote:
>>
>>>Is there also a way to stop phoenix programmatically? Could i retrieve a
>>>reference to the Embeddor, from  the ComponentManager, and call shutdown.
>>
>>Well you *can* locate MBeanServer (either via RMI or programatically), then
>>locate the embeddor and request its shutdown. However that is potentially
>>ugly code and brittle to boot (especially with JMX namespaces not fixed
>>just yet).
>>
>>However give me an hour or so and I will add a method
>>
>>BlockContext.requestShutdown()
>>
>>This will allow the Block to request the shutdown of its own application.
>>The application will then shutdown. If there are 0 applications left in
>>kernel and the "persitent" flag has not been set this will cause the kernel
>>to shutdown. That work for you?
> 
> 
> done.
> 
> Everyone else, I have gone and implemtented BlockContext.requestShutdown() so 
> that Blocks can shutdown their application (and their kernel if only app in 
> kernel). Could some one give it a bit of a good test drive. It seems to work 
> fine here ... 
> 

-1

BlockContext is currently a convinience wrapper to a set of keyed 
context objects.  It is completely within the contract of a component to 
access the supplied context via keys as distinct from narrowing to the 
BlockContext interface.  The introduction of a method with behaviour in 
context is inconsitent with the context contract and breaks 
interoperability with other containers capable of managing pure context 
arguments.

Steve.

-- 

Stephen J. McConnell

OSM SARL
digital products for a global economy
mailto:mcconnell@osm.net
http://www.osm.net


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Programatic Shutdown of Phoenix

Posted by Leo Simons <ls...@multimia.com>.
> Everyone else, I have gone and implemtented BlockContext.requestShutdown() so 
> that Blocks can shutdown their application (and their kernel if only app in 
> kernel). Could some one give it a bit of a good test drive. It seems to work 
> fine here ... 

not considering that...

...I think this is an API change and we're in beta...
...this is a minor violation of IoC...

things seem to work just fine here too =)

cheers,

Leo



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Programatic Shutdown of Phoenix

Posted by Peter Donald <pe...@apache.org>.
Hi,

On Sat, 31 Aug 2002 16:22, Peter Donald wrote:
> On Sat, 31 Aug 2002 14:27, Jim Alateras wrote:
> > Is there also a way to stop phoenix programmatically? Could i retrieve a
> > reference to the Embeddor, from  the ComponentManager, and call shutdown.
>
> Well you *can* locate MBeanServer (either via RMI or programatically), then
> locate the embeddor and request its shutdown. However that is potentially
> ugly code and brittle to boot (especially with JMX namespaces not fixed
> just yet).
>
> However give me an hour or so and I will add a method
>
> BlockContext.requestShutdown()
>
> This will allow the Block to request the shutdown of its own application.
> The application will then shutdown. If there are 0 applications left in
> kernel and the "persitent" flag has not been set this will cause the kernel
> to shutdown. That work for you?

done.

Everyone else, I have gone and implemtented BlockContext.requestShutdown() so 
that Blocks can shutdown their application (and their kernel if only app in 
kernel). Could some one give it a bit of a good test drive. It seems to work 
fine here ... 

-- 
Cheers,

Peter Donald
----------------------------------------------------------------
Fools ignore complexity.  Pragmatists suffer it.
Some can avoid it.  Geniuses remove it.
-- Perlis's Programming Proverb #58, SIGPLAN Notices, Sept. 1982
----------------------------------------------------------------


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: shutting down phoenix

Posted by Jim Alateras <ji...@intalio.com>.
thanks Peter, that will definitely work for me.

cheers
</jima>

> -----Original Message-----
> From: Peter Donald [mailto:peter@apache.org]
> Sent: Saturday, August 31, 2002 4:23 PM
> To: Avalon-Phoenix Developers List
> Subject: Re: shutting down phoenix
>
>
> On Sat, 31 Aug 2002 14:27, Jim Alateras wrote:
> > Is there also a way to stop phoenix programmatically? Could i retrieve a
> > reference to the Embeddor, from  the ComponentManager, and call
> shutdown.
>
> Well you *can* locate MBeanServer (either via RMI or
> programatically), then
> locate the embeddor and request its shutdown. However that is potentially
> ugly code and brittle to boot (especially with JMX namespaces not
> fixed just
> yet).
>
> However give me an hour or so and I will add a method
>
> BlockContext.requestShutdown()
>
> This will allow the Block to request the shutdown of its own
> application. The
> application will then shutdown. If there are 0 applications left
> in kernel
> and the "persitent" flag has not been set this will cause the kernel to
> shutdown. That work for you?
>
> --
> Cheers,
>
> Peter Donald
> Sufficiently advanced science is
>  indistinguishable from magic"
>                -- Arthur C. Clarke
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: shutting down phoenix

Posted by Peter Donald <pe...@apache.org>.
On Sat, 31 Aug 2002 14:27, Jim Alateras wrote:
> Is there also a way to stop phoenix programmatically? Could i retrieve a
> reference to the Embeddor, from  the ComponentManager, and call shutdown.

Well you *can* locate MBeanServer (either via RMI or programatically), then 
locate the embeddor and request its shutdown. However that is potentially 
ugly code and brittle to boot (especially with JMX namespaces not fixed just 
yet). 

However give me an hour or so and I will add a method

BlockContext.requestShutdown()

This will allow the Block to request the shutdown of its own application. The 
application will then shutdown. If there are 0 applications left in kernel 
and the "persitent" flag has not been set this will cause the kernel to 
shutdown. That work for you?

-- 
Cheers,

Peter Donald
Sufficiently advanced science is 
 indistinguishable from magic" 
               -- Arthur C. Clarke


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: shutting down phoenix

Posted by Jim Alateras <ji...@intalio.com>.
Peter,

Thanks for the being so responsive.

Is there also a way to stop phoenix programmatically? Could i retrieve a
reference to the Embeddor, from  the ComponentManager, and call shutdown.

cheers
</jima>

> -----Original Message-----
> From: Peter Donald [mailto:peter@apache.org]
> Sent: Saturday, August 31, 2002 2:05 PM
> To: Avalon Developers List
> Cc: avalon-phoenix-dev@jakarta.apache.org
> Subject: Re: shutting down phoenix
>
>
> Hi,
>
> On Thu, 29 Aug 2002 13:56, Jim Alateras wrote:
> > Is there a facility to shutdown phoenix from the command line?
>
> yep -theres a couple. If you are on unix, recently a script has
> been added to
> CVS (thanks Alexis!) that makes it act like a standard linux
> daemon. You can
> start, stop restart etc it. You can grab it from
>
> http://cvs.apache.org/viewcvs.cgi/*checkout*/jakarta-avalon-phoeni
> x/src/script/phoenix.sh?rev=1.4&content-type=text/plain
>
> Alternatively you could use the wrapper project
> (http://wrapper.sourceforge.net) to run phoenix. This basically
> runs its as a
> "daemon" or service (under win32) etc.
>
> Does this work for you ?
>
> --
> Cheers,
>
> Peter Donald
> "Artists can color the sky red because they know it's blue.
> Those of us who
>  aren't artists must color things the way they really are or people might
>  think we're stupid." -- Jules Feiffer
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: shutting down phoenix

Posted by Jim Alateras <ji...@intalio.com>.
Peter,

Thanks for the being so responsive.

Is there also a way to stop phoenix programmatically? Could i retrieve a
reference to the Embeddor, from  the ComponentManager, and call shutdown.

cheers
</jima>

> -----Original Message-----
> From: Peter Donald [mailto:peter@apache.org]
> Sent: Saturday, August 31, 2002 2:05 PM
> To: Avalon Developers List
> Cc: avalon-phoenix-dev@jakarta.apache.org
> Subject: Re: shutting down phoenix
>
>
> Hi,
>
> On Thu, 29 Aug 2002 13:56, Jim Alateras wrote:
> > Is there a facility to shutdown phoenix from the command line?
>
> yep -theres a couple. If you are on unix, recently a script has
> been added to
> CVS (thanks Alexis!) that makes it act like a standard linux
> daemon. You can
> start, stop restart etc it. You can grab it from
>
> http://cvs.apache.org/viewcvs.cgi/*checkout*/jakarta-avalon-phoeni
> x/src/script/phoenix.sh?rev=1.4&content-type=text/plain
>
> Alternatively you could use the wrapper project
> (http://wrapper.sourceforge.net) to run phoenix. This basically
> runs its as a
> "daemon" or service (under win32) etc.
>
> Does this work for you ?
>
> --
> Cheers,
>
> Peter Donald
> "Artists can color the sky red because they know it's blue.
> Those of us who
>  aren't artists must color things the way they really are or people might
>  think we're stupid." -- Jules Feiffer
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: shutting down phoenix

Posted by Peter Donald <pe...@apache.org>.
Hi,

On Thu, 29 Aug 2002 13:56, Jim Alateras wrote:
> Is there a facility to shutdown phoenix from the command line?

yep -theres a couple. If you are on unix, recently a script has been added to 
CVS (thanks Alexis!) that makes it act like a standard linux daemon. You can 
start, stop restart etc it. You can grab it from 

http://cvs.apache.org/viewcvs.cgi/*checkout*/jakarta-avalon-phoenix/src/script/phoenix.sh?rev=1.4&content-type=text/plain

Alternatively you could use the wrapper project 
(http://wrapper.sourceforge.net) to run phoenix. This basically runs its as a 
"daemon" or service (under win32) etc. 

Does this work for you ?

-- 
Cheers,

Peter Donald
"Artists can color the sky red because they know it's blue.  Those of us who
 aren't artists must color things the way they really are or people might 
 think we're stupid." -- Jules Feiffer 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: shutting down phoenix

Posted by Peter Donald <pe...@apache.org>.
Hi,

On Thu, 29 Aug 2002 13:56, Jim Alateras wrote:
> Is there a facility to shutdown phoenix from the command line?

yep -theres a couple. If you are on unix, recently a script has been added to 
CVS (thanks Alexis!) that makes it act like a standard linux daemon. You can 
start, stop restart etc it. You can grab it from 

http://cvs.apache.org/viewcvs.cgi/*checkout*/jakarta-avalon-phoenix/src/script/phoenix.sh?rev=1.4&content-type=text/plain

Alternatively you could use the wrapper project 
(http://wrapper.sourceforge.net) to run phoenix. This basically runs its as a 
"daemon" or service (under win32) etc. 

Does this work for you ?

-- 
Cheers,

Peter Donald
"Artists can color the sky red because they know it's blue.  Those of us who
 aren't artists must color things the way they really are or people might 
 think we're stupid." -- Jules Feiffer 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>