Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 57E2811F21 for ; Mon, 31 Mar 2014 07:03:25 +0000 (UTC) Received: (qmail 45620 invoked by uid 500); 31 Mar 2014 07:03:16 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 45279 invoked by uid 500); 31 Mar 2014 07:03:08 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 45198 invoked by uid 99); 31 Mar 2014 07:03:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Mar 2014 07:03:07 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of khuevu@gmail.com designates 209.85.219.47 as permitted sender) Received: from [209.85.219.47] (HELO mail-oa0-f47.google.com) (209.85.219.47) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Mar 2014 07:03:01 +0000 Received: by mail-oa0-f47.google.com with SMTP id i11so8799442oag.34 for ; Mon, 31 Mar 2014 00:02:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=kYTcOFkFPrvioTImtXlfjnCQd19KoDBUob5Fvraj5aI=; b=iFFEsB20jUlfvWJ0H0VLIMKveY3O1SIwGnQMImE8KZO+4UzDME+jat6J8X5tOzvF7J +nqaHJMQGmk9PU+rnu3+4sJjTmE22ZDw7rEn6ADHnZ8bO1DA8qjGj25qFWh9dgCyoM1J 22cnpA6jsWAn4UdW3FFl259mRDoAI8Y+eFWm8kC7UcTCou+Inoapu3ieX7Tt/+/eEa8d RbT33BbUN0QPFQRwxmlRFmdwR+/QxJj98mrHpJof321Kf+HwPNhtUWb5QPV7KU+U6fSa 8qKjHOIQcdSO6j/D53wjQXKP7wJpteHnCWfxv5YPlF4N3kPy08pOORxi1vsf7txSetPk at8A== X-Received: by 10.60.141.9 with SMTP id rk9mr20859716oeb.12.1396249359479; Mon, 31 Mar 2014 00:02:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.151.225 with HTTP; Mon, 31 Mar 2014 00:02:09 -0700 (PDT) From: Khue Vu Date: Mon, 31 Mar 2014 15:02:09 +0800 Message-ID: Subject: [modeler] Problem of creating MBean using mbeans-descriptors To: user@commons.apache.org Content-Type: multipart/alternative; boundary=047d7b3a9cac16f7bc04f5e1a371 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b3a9cac16f7bc04f5e1a371 Content-Type: text/plain; charset=ISO-8859-1 Hi, I am using Apache Modeler to create ModelMBean. First I register the MBean with the following: Registry registry = Registry.getRegistry(null, null); registry.setMBeanServer(ManagementFactory.getPlatformMBeanServer()); InputStream in = this.getClass().getResourceAsStream("/some_mbean.xml"); registry.loadMetadata(in); ... registry.registerComponent(managedInstance, objectName, null); With managedInstance is the instance of the managed resource of the ModelMBean. (Class of it will be specified in the "*type*" attribute of mbean element). When I retrieve the MBean using Registry.findManagedBean or use the MBeanServer interface directly, the MBean is there. But it has none of the operations defined in the descriptors (there is only one: "onSuccessfulCommit" method). Did I miss something ? Note that I didn't specify the "*className*" attribute of mbean element as in this example: http://commons.apache.org/proper/commons-modeler/apidocs/org/apache/commons/modeler/package-summary.htmlin which the *org.apache.catalina.mbeans.GroupMBean* is used. Thank you, Khue. --047d7b3a9cac16f7bc04f5e1a371--