Return-Path: Delivered-To: apmail-incubator-geronimo-dev-archive@incubator.apache.org Received: (qmail 58448 invoked by uid 500); 14 Aug 2003 12:24:41 -0000 Mailing-List: contact geronimo-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: geronimo-dev@incubator.apache.org Delivered-To: mailing list geronimo-dev@incubator.apache.org Received: (qmail 58239 invoked from network); 14 Aug 2003 12:24:38 -0000 Received: from unknown (HELO antivirus) (212.149.79.170) by daedalus.apache.org with SMTP; 14 Aug 2003 12:24:38 -0000 Received: from 212.149.79.250 by antivirus (InterScan E-Mail VirusWall NT); Thu, 14 Aug 2003 15:24:01 +0200 Received: from profitsoftware.com ([10.107.70.116]) by mail.profithome.com (Merak 4.4.1) with SMTP id LICENSE for ; Thu, 14 Aug 2003 15:26:50 +0300 Message-ID: <3F3B7F82.412AB5AA@profitsoftware.com> Date: Thu, 14 Aug 2003 15:24:34 +0300 From: Pasi Salminen X-Mailer: Mozilla 4.7 [en-gb] (WinNT; U) X-Accept-Language: fi,en MIME-Version: 1.0 To: geronimo-dev@incubator.apache.org Subject: Re: [General] Container interface and AbstractContainer References: <32EED962-CE4E-11D7-B36D-000A959D0312@yahoo.co.uk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N James Strachan wrote: > On Thursday, August 14, 2003, at 12:42 pm, Greg Wilkins wrote: > > James Strachan wrote: > >> On Thursday, August 14, 2003, at 11:56 am, Alex Blewitt wrote: > >>>> Though as soon as I did this something hit me - if you add a > >>>> component by itself - and a component doesn't have an ObjectName > >>>> (at least on the Component interface today) then how does the > >>>> Container know the ObjectNames of the components? i.e. how can we > >>>> implement the getComponentNames() method? > >>> > >>> > >>> (a) I don't think the getComponentNames() adds anything that you > >>> couldn't get yourself from the getComponents() > >> > >> Its there for JMX agents & GUIs. Its just 1 helper method. (Should > >> probably return ObjectName[] as its only real purpose is for JMX > >> agents right?) > > > > Correct - but I'm happy to leave it for now as it is only a conveniance > > method and we need to get the core semantics worked out. > > Cool. Should it be String[] then after Jan's comment that > getObjectName() should return String? > > > > >>> (b) Is it true that every Component has an ObjectName? I don't think > >>> it does (necessarily), and I think this assumption could lead to bad > >>> coding ... > >> Am not sure. Thats why I brought it up. Either it does or we add > >> components to a container with an ObjectName. Though I confess to not > >> knowing enough of jsr 77 & 88 to make that call. > > > > According to JSR77 all our components should have ObjectNames. > > Jan has proposed that we add getObjectName to the Component interface > > > > (eventually it should probably be factored out to a ManagedObject > > interface - but whatever it will be on component). > > +1 either way. Does a ManagedObject have to have an ObjectName? Whilst > we're all discussing it, if someone knows for sure it'd be worth moving > it to there & inheriting it. > Yes it does. Snippet from the spec: " JSR77.3.1.1.1 objectName OBJECT_NAME objectName The object name of the managed object. The objectName attribute is of the type OBJECT_NAME which is a string that complies with the syntax specified for a J2EEManagedObject name below. The objectName attribute must not be null. The value of objectName must be unique within the management domain. Management applications use this value to identify managed objects, for example identifying the source of events. " > > > I > > Maybe I've not grokked this code fully yet but either Container needs > > a getObjectName() or the addComponent() method should take an > > ObjectName right? This is echo-ing Jan's previous comment that > > Component should have a method... > >>> > >>> > >>> The point of having a separate type for Component is that it should > >>> be a component, not an ObjectName. > >>> > >>> If you were writing > >>> > >>> public interface JMXContainer extends Container { > >>> } > >>> > >>> then you might want to restrict everything having an ObjectName, but > >>> that's not necessarily going to be the case. > >> Remember that this stuff is internal to the container. Any old POJO > >> or MBean could be used as a component. > > > > I don't think so. > > > > Even if they are POJOs, JSR77 requires them to have a method that > > returns the ObjectName of the MBean that represents/manages them. > > I just mean if I add MyBean which does not have an ObjectName to the > container, we'd create a Component facade (maybe using a DynamicMBean > or whatever). i.e. out in component/service developer land, we don't > have to have a getObjectName on all our components. The Component > interface can wrap other components such as arbitrary MBeans etc. > > However inside the container itself to be JSR77 every Component has an > ObjectName. Or am I way off base here? > if component is a ManagedObject (and I guess it is) then the answer is yes. > > > So JMX infrastructure or not, we need JMX ObjectNames associated with > > our components if we are to do JSR77. > > Agreed. > > James > ------- > http://radio.weblogs.com/0112098/ __________________________________________________________________________ This message and its attachments have been found clean from known viruses with three different antivirus programs. __________________________________________________________________________