Re: TC5 JMX

2003-03-25 Thread Amy Roh
> Amy Roh wrote:
>
> >> I moved the valve registration in addValve().
> >
> > Cool.  I think logger and realm registration should be in setLogger and
> > setRealm as well so mbeans can get registered correctly.  Also,
> > deregistration for old mbean should happen when new logger or realm is
> > null.
>
> +1 :-)
>
> For the second part - deregistration should happen on stop().
>
> If you are going to implement this ( please ! ), don't worry about the
> embed use case, I'll fix it if there are problems.

So you haven't done logger/realm registration/deregistration?  I would hate
to duplicate what you already have in your workspace.  So let me know.  I
can add registration in start() and deregistration in stop().  Is there a
reason why LoggerBase doesn't implement Lifecycle?  Logger registration
won't be consistent since only FileLogger implements Lifecycle and not the
other two (SystemOut, SystemErr).

>
>
> >> I got reload() to work - but right now I'm stuck with some problems in
> >> stop()/start().
> >>
> >> Reload doesn't deal with modified web.xml - and for some reason
> >> stop()/start() finds some older mappers, something is not cleaning up.
> >>
> >> stop() does now remove all mbeans that it created.
> >
> > Awesome.  :-)
>
> Well, I finally got it working ( in standalone ). I had to create a new
> ServletContext, copy all the settings, then unregister and register again.
>
> It's a bit tricky - we have to unregister/register, otherwise the mapper
> will not work, and what's worse - it's almost impossible to undo all the
> actions that happen in init/start ( since many are driven by web.xml ).

This reminds me that the current mapper doesn't work if there isn't an
Engine with "Catalina" name since it's hard coded, right?

Amy

>
> I don't know how start/stop worked before ( or if it worked ), but
creating
> a new context seemes like a reasonable solution and may avoid some leaks
> or other problems.
>
> The negative is that extending StandardContext will become more tricky.
>
> I'll probably commit tommorow - I still need to remove a lot of debug
> statements and test in embeded case. ( I also checked Host.stop - it
> seems to clean up the JMX, I don't know yet if start() will recreate
> the same environemnt ).
>
>
> Costin
>
> >
> > Amy
> >
> >>
> >> ( by "now" I mean my work version, I have a number of debug statements
> >> to remove and I'll check in ).
> >>
> >>
> >>
> >> Costin
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TC5 JMX

2003-03-24 Thread Costin Manolache
Amy Roh wrote:

>> I moved the valve registration in addValve().
> 
> Cool.  I think logger and realm registration should be in setLogger and
> setRealm as well so mbeans can get registered correctly.  Also,
> deregistration for old mbean should happen when new logger or realm is
> null.

+1 :-)

For the second part - deregistration should happen on stop().

If you are going to implement this ( please ! ), don't worry about the
embed use case, I'll fix it if there are problems.


>> I got reload() to work - but right now I'm stuck with some problems in
>> stop()/start().
>>
>> Reload doesn't deal with modified web.xml - and for some reason
>> stop()/start() finds some older mappers, something is not cleaning up.
>>
>> stop() does now remove all mbeans that it created.
> 
> Awesome.  :-)

Well, I finally got it working ( in standalone ). I had to create a new
ServletContext, copy all the settings, then unregister and register again.

It's a bit tricky - we have to unregister/register, otherwise the mapper
will not work, and what's worse - it's almost impossible to undo all the
actions that happen in init/start ( since many are driven by web.xml ).

I don't know how start/stop worked before ( or if it worked ), but creating 
a new context seemes like a reasonable solution and may avoid some leaks
or other problems.

The negative is that extending StandardContext will become more tricky.

I'll probably commit tommorow - I still need to remove a lot of debug 
statements and test in embeded case. ( I also checked Host.stop - it 
seems to clean up the JMX, I don't know yet if start() will recreate 
the same environemnt ).


Costin

> 
> Amy
> 
>>
>> ( by "now" I mean my work version, I have a number of debug statements
>> to remove and I'll check in ).
>>
>>
>>
>> Costin
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TC5 JMX

2003-03-24 Thread Amy Roh
> Amy Roh wrote:
>
> > Costin,
> >
> > It doesn't seem like mbeans are created appropriately when logger,
realm,
> > and valve are dynamically added after start.  Is the mbean registration
> > code listening to those events?
>
> It should.
>
> For valve - I think it works now ( I'll make a commit soon with few more
> fixes ). The registration happens in ContainerBase, when the valve is
added
> - and unregistration is also in ContainerBase when the vavle is removed.
>
> >  I see that logger/valve registration is done in
> > ContainerBase.start().  Also, the mbeans are not getting deregistered
and
> > failed to be removed from admin.  Let me know what your plans are.  :-)
>
> I moved the valve registration in addValve().

Cool.  I think logger and realm registration should be in setLogger and
setRealm as well so mbeans can get registered correctly.  Also,
deregistration for old mbean should happen when new logger or realm is null.

>
> I got reload() to work - but right now I'm stuck with some problems in
> stop()/start().
>
> Reload doesn't deal with modified web.xml - and for some reason
> stop()/start() finds some older mappers, something is not cleaning up.
>
> stop() does now remove all mbeans that it created.

Awesome.  :-)

Amy

>
> ( by "now" I mean my work version, I have a number of debug statements
> to remove and I'll check in ).
>
>
>
> Costin
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TC5 JMX

2003-03-24 Thread Costin Manolache
Amy Roh wrote:

> Costin,
> 
> It doesn't seem like mbeans are created appropriately when logger, realm,
> and valve are dynamically added after start.  Is the mbean registration
> code listening to those events?

It should. 

For valve - I think it works now ( I'll make a commit soon with few more
fixes ). The registration happens in ContainerBase, when the valve is added
- and unregistration is also in ContainerBase when the vavle is removed.

>  I see that logger/valve registration is done in
> ContainerBase.start().  Also, the mbeans are not getting deregistered and
> failed to be removed from admin.  Let me know what your plans are.  :-)

I moved the valve registration in addValve(). 

I got reload() to work - but right now I'm stuck with some problems in
stop()/start(). 

Reload doesn't deal with modified web.xml - and for some reason
stop()/start() finds some older mappers, something is not cleaning up.

stop() does now remove all mbeans that it created.

( by "now" I mean my work version, I have a number of debug statements
to remove and I'll check in ).



Costin


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



TC5 JMX

2003-03-24 Thread Amy Roh
Costin,

It doesn't seem like mbeans are created appropriately when logger, realm,
and valve are dynamically added after start.  Is the mbean registration code
listening to those events?  I see that logger/valve registration is done in
ContainerBase.start().  Also, the mbeans are not getting deregistered and
failed to be removed from admin.  Let me know what your plans are.  :-)

Thanks!
Amy


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]