geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: When has the server started?
Date Mon, 04 Sep 2006 20:39:58 GMT

On Sep 3, 2006, at 7:53 PM, Jason Dillon wrote:

> Okay, I was able to get something working... though I had to use  
> classes from geronimo-kernel... not sure how to perform the same  
> operations with just JMX interfaces.
>
> If anyone knows, please speak up... it would be nice to not need to  
> use kernel classes to check a few boolean attributes on remote beans.
>
> I still think we might want to expose fullyStarted on the kernel  
> directly, and configure it so that its exposed as a MBean  
> attribute, so that AbstractName and AbstractNameQuery are not needed.

IMO this would be a perversion of the geronimo architecture.  What  
does "fully started" mean anyway?  If you start with say geronimo- 
jetty-minimal and add cars to turn it into a full j2ee server while  
it is running, when exactly is it started?  It certainly has nothing  
to do with the kernel.

When we thought about this last the best idea we could come up with  
is that it's "fully started" when all the modules listed in  
persistent configuration lists (should be persistent module lists)  
that are in the bootstrap or included recursively in those modules  
are started. Think about what happens if a module in the original PCL  
includes another PCL.

There used to be something to detect and wait for this in the m1  
geronimo deployment plugin

thanks
david jencks

>
>  * * *
>
> Anyways, what I have now works well... and now geronimo:start can  
> tell when the minimal servers are started :-)
>
> Thanks for the hint about PersistentConfigurationList.
>
> --jason
>
>
> On Sep 3, 2006, at 6:00 AM, Aaron Mulder wrote:
>
>> I think if you get the AbstractName for the LocalAttributeManager  
>> in a
>> test program, there's a method on the AbstractName to get or generate
>> an ObjectName, and then you could use that ObjectName to access the
>> LocalAttributeManager (and therefore the kernelFullyStarted  
>> attribute)
>> via JMX.  I'm not sure that will work, but it's where I would start.
>> If that doesn't work, you could try invoking the
>> getAttribute(abstractName, attributeName) operation on the Kernel via
>> JMX (so you'd access the Kernel via JMX, but call an operation on it
>> to access the LocalAttributeManager).
>>
>> FWIW, I think Daemon just loops over a Set to be fully generic -- I'm
>> pretty sure that in practice, the LocalAttributeManager is the one  
>> and
>> only PersistentConfigurationList in the server.
>>
>> Thanks,
>>     Aaron
>>
>> On 9/3/06, Jason Dillon <jason@planet57.com> wrote:
>>> Any idea how to actually do that?
>>>
>>> --jason
>>>
>>>
>>> On Sep 3, 2006, at 5:34 AM, Aaron Mulder wrote:
>>>
>>> > I think kernelFullyStarted is a GBean attribute on only certain  
>>> types
>>> > of GBeans -- I believe PersistentConfigurationList GBeans.   
>>> It's set
>>> > by Daemon.java when the startup process is complete, so it's not a
>>> > kernel-level feature, but should still work for all practical
>>> > purposes.  I would think you'd be able to get the property from  
>>> the
>>> > LocalAttributeManager via JMX.
>>> >
>>> > Thanks,
>>> >     Aaron
>>> >
>>> > On 9/1/06, Jason Dillon <jason@planet57.com> wrote:
>>> >> What is the best way to detect when the server has started  
>>> using JMX?
>>> >>
>>> >> The ServerBehavior class in the deployment plugin has some  
>>> code that
>>> >> connects to JMX, then lists the configurations, and then takes he
>>> >> first configuration and get the "kernelFulltStarted" attribute  
>>> from
>>> >> it... but it assumes that  
>>> ConfigurationManager.listConfigurations()
>>> >> returns an array of ObjectNames, which it does not.
>>> >>
>>> >> I also peeked at the server's JMX tree via jconsole and I  
>>> don't see
>>> >> any attribute or operation that matches up to  
>>> "kernelFullyStarted".
>>> >> There is also a strange "null" element of the tree, but I will  
>>> leave
>>> >> that for another day.
>>> >>
>>> >> So, how can I easily check of the server has started by  
>>> polling a JMX
>>> >> attribute?
>>> >>
>>> >> --jason
>>> >>
>>>
>>>
>


Mime
View raw message