Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 60675 invoked from network); 3 Sep 2006 23:53:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Sep 2006 23:53:56 -0000 Received: (qmail 82139 invoked by uid 500); 3 Sep 2006 23:53:50 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 82084 invoked by uid 500); 3 Sep 2006 23:53:50 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 82062 invoked by uid 99); 3 Sep 2006 23:53:50 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Sep 2006 16:53:50 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jason.dillon@gmail.com designates 64.233.166.182 as permitted sender) Received: from [64.233.166.182] (HELO py-out-1112.google.com) (64.233.166.182) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Sep 2006 16:53:49 -0700 Received: by py-out-1112.google.com with SMTP id x66so4452037pye for ; Sun, 03 Sep 2006 16:53:28 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:mime-version:in-reply-to:references:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer:sender; b=oGUNjriyt0b2ZHVjk3LcnBH4jP5Il+Ko9CEdpK2nTll87zu6UeqEq1hnnCfHHz4SkVYzjyQnwr/TPTeu5e+GQyn8Xnpohlrw1sPxdVhIdFm50M1bknUeEq6qJIjcyZ0roNX54EAwOL6TtOQPCqrOAVHSm4516tx/amjWeQ4CaIw= Received: by 10.35.108.18 with SMTP id k18mr6348247pym; Sun, 03 Sep 2006 16:53:28 -0700 (PDT) Received: from ?10.0.1.4? ( [24.7.69.241]) by mx.gmail.com with ESMTP id d13sm4501494pyd.2006.09.03.16.53.27; Sun, 03 Sep 2006 16:53:27 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <74e15baa0609030600y798a0ae1u3becbc3e79364fa7@mail.gmail.com> References: <1E373D7E-E9C6-4F5E-BECE-24FA799E2098@planet57.com> <74e15baa0609030534y456522b2mfdf1289a258b2a9c@mail.gmail.com> <74e15baa0609030600y798a0ae1u3becbc3e79364fa7@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <3200B75F-302E-451B-A682-9ADF407017FA@planet57.com> Content-Transfer-Encoding: 7bit From: Jason Dillon Subject: Re: When has the server started? Date: Sun, 3 Sep 2006 16:53:24 -0700 To: dev@geronimo.apache.org X-Mailer: Apple Mail (2.752.2) Sender: Jason Dillon X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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. * * * 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 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 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 >> >> >> >>