Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 95189 invoked from network); 11 Nov 2009 08:48:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Nov 2009 08:48:56 -0000 Received: (qmail 37797 invoked by uid 500); 11 Nov 2009 08:48:55 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 37691 invoked by uid 500); 11 Nov 2009 08:48:55 -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 37683 invoked by uid 99); 11 Nov 2009 08:48:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Nov 2009 08:48:55 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rwonly@gmail.com designates 209.85.160.56 as permitted sender) Received: from [209.85.160.56] (HELO mail-pw0-f56.google.com) (209.85.160.56) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Nov 2009 08:48:47 +0000 Received: by pwj6 with SMTP id 6so605442pwj.35 for ; Wed, 11 Nov 2009 00:48:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=4nj67tHI/UgyWh6RUNDay/V88xP/9L3frq3YJkUsvrI=; b=dssLt3cdfvIyonb6Ujl3IUsXQBnu/2F3FZa8lBK2+YnpCkbRAarhBsTJHKTjvX6tCn 6prcFJxHhPeAxeVNg67VQpBR8wOZfG6JMP7xL8aDafsJHbicT7rLFJA8314dLCODBpe8 hlkNvHDQq1aSPRFK1BJfpo8zYrCtRXRurBJOk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Jjb8IfiiY/099mL5INVm/keg5E5V+6Nh2y6Al78NtdCUztoBn1hAX9q+VBMSjBOVZ5 9LHW+DKT3jjuMPfdJ1t3AymKKekJM3AtWHiHnpndOpEmHWorSyLFT5G/U0kSDq7borcS t+HaIz5TIzglxkUj1SnbtDxzQGTAijUnOMKu0= MIME-Version: 1.0 Received: by 10.143.26.31 with SMTP id d31mr135124wfj.269.1257929305582; Wed, 11 Nov 2009 00:48:25 -0800 (PST) Date: Wed, 11 Nov 2009 16:48:25 +0800 Message-ID: Subject: Blueprint MBean progress From: Rex Wang To: dev@geronimo.apache.org Content-Type: multipart/alternative; boundary=001636e0af30696d080478147d77 X-Virus-Checked: Checked by ClamAV on apache.org --001636e0af30696d080478147d77 Content-Type: text/plain; charset=ISO-8859-1 Hi, Dear all, I just created my floder "rex" underneath sandbox to post the current design of BlueprintMBean. If anyone is interesting about it, you can checkout and help give us some review comments :-) You can get the definition by svn co https://svn.apache.org/repos/asf/geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx The MBean mainly contains two parts of contents. One is about how to retrieve a blueprint bundles metadata, and the other one is for getting the last event of a blueprint bundle, which actually represents its state. Besides, we also define two util methods to help retrieve the blueprintContainer's service ID from the framework. We try keeping the design and code style consistent with the OSGi rfc 139. So, as the returned compositeData of the above methods, we define 5 CompositeTypes accordingly, i.e. BEAN_METADATA_TYPE, SERVICE_MATADATA_TYPE, REFERENCE_METADATA_TYPE, REFERENCE_LIST_METADATA_TYPE, BLUEPRINT_EVENT_TYPE. What's more, to simplify the data structure, we pull out the ARGUMENT_TYPE and PROPERTY_TYPE from the BEAN_METADATA_TYPE, and define two independent methods for them. The other composite types, such as COMPONENT_METADATA_TYPE and SERVICE_REFERENCE_METADATA_TYPE are just intermediate material to create Bean, service, reference, and reference-list types. The problem is the values. From the bluepirnt spec, the values can appear in 4 places, that is, BeanArgument, BeanProperty, CollectionMetadata, MapEntry. That means there should be an item named "VALUE" in the 4 compositeTypes. But the value type is uncertain. A value can be one of 7 value types(, , , , Collectoins, , ) + 4 manager types(, , , ). So we have to create a placeholder type to represent such value item. Hence, if a user get a compositeData and one of its item has a placeholder type, he need to iterate all the 11 types to confirm what is the exact one. That is why the GENERIC_METADATA_TYPE exists. I am not very comfortable on this, but seems that is the only acceptable solution. (btw, we haven't finished the coding on the 7 value compositeTypes.) Another problem is the namespace. Currently we used "org.apache.geronimo.blueprint.jmx" as the package name, but I don't know if there is any concern on it. And we also borrow the Item class and JmxConstants class from the rfc 139 api. That may not be applicable because they won't be exported by the 139 api bundle. So we have to create them by ourselves. Temporarily, you have to check out https://svn.apache.org/repos/asf/geronimo/sandbox/rex/M2_REPO to help pass the compilation. Ok, that is a brief introduction on what a BlueprintMBean is. Particularly, thanks Siqi for his help, and any suggestion is appreciated! -Rex --001636e0af30696d080478147d77 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, Dear all,

I just created my floder "rex" underneath s= andbox to post the current design of BlueprintMBean. If anyone is interesti= ng about it, you can checkout and help give us some review comments :-)

You can get the definition by svn co https://s= vn.apache.org/repos/asf/geronimo/sandbox/rex/org.apache.geronimo.blueprint.= jmx

The MBean mainly contains two parts of contents. One is about how to re= trieve a blueprint bundles metadata, and the other one is for getting the l= ast event of a blueprint bundle, which actually represents its state. Besid= es, we also define two util methods to help retrieve the blueprintContainer= 's service ID from the framework.

We try keeping the design and code style consistent with the OSGi rfc 1= 39. So, as the returned compositeData of the above methods, we define 5 Com= positeTypes accordingly, i.e. BEAN_METADATA_TYPE, SERVICE_MATADATA_TYPE, RE= FERENCE_METADATA_TYPE, REFERENCE_LIST_METADATA_TYPE, BLUEPRINT_EVENT_TYPE. = What's more, to simplify the data structure, we pull out the ARGUMENT_T= YPE and PROPERTY_TYPE from the BEAN_METADATA_TYPE, and define two independe= nt methods for them. The other composite types, such as COMPONENT_METADATA_= TYPE and SERVICE_REFERENCE_METADATA_TYPE are just intermediate material to = create Bean, service, reference, and reference-list types.

The problem is the values. From the bluepirnt spec, the values can appe= ar in 4 places, that is, BeanArgument, BeanProperty, CollectionMetadata, Ma= pEntry. That means there should be an item named "VALUE" in the 4= compositeTypes. But the value type is uncertain. A value can be one of 7 v= alue types(<value>, <ref>, <idref>, <map>, Collecto= ins, <props>, <null>) + 4 manager types(<bean>, <servi= ce>, <reference>, <reference-list>). So we have to create a = placeholder type to represent such value item. Hence, if a user get a compo= siteData and one of its item has a placeholder type, he need to iterate all= the 11 types to confirm what is the exact one. That is why the GENERIC_MET= ADATA_TYPE exists. I am not very comfortable on this, but seems that is the= only acceptable solution. (btw, we haven't finished the coding on the = 7 value compositeTypes.)

Another problem is the namespace. Currently we used "org.apache.ge= ronimo.blueprint.jmx" as the package name, but I don't know if the= re is any concern on it. And we also borrow the Item class and JmxConstants= class from the rfc 139 api. That may not be applicable because they won= 9;t be exported by the 139 api bundle. So we have to create them by ourselv= es. Temporarily, you have to check out https://svn.apache.org/repos/asf/gero= nimo/sandbox/rex/M2_REPO to help pass the compilation.

Ok, that is a brief introduction on what a BlueprintMBean is. Particula= rly, thanks Siqi for his help, and any suggestion is appreciated!

-R= ex


--001636e0af30696d080478147d77--