Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 47324 invoked from network); 22 Mar 2011 03:48:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Mar 2011 03:48:47 -0000 Received: (qmail 59516 invoked by uid 500); 22 Mar 2011 03:48:46 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 59503 invoked by uid 500); 22 Mar 2011 03:48:46 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 59495 invoked by uid 99); 22 Mar 2011 03:48:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Mar 2011 03:48:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Mar 2011 03:48:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id BCB4B41E12 for ; Tue, 22 Mar 2011 03:48:05 +0000 (UTC) Date: Tue, 22 Mar 2011 03:48:05 +0000 (UTC) From: "David Liu (JIRA)" To: issues@cxf.apache.org Message-ID: <1139290617.3136.1300765685768.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <934668222.383.1300096769548.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CXF-3398) JMX Naming issue - cannot register the mutil endpoints with same service bean MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CXF-3398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009543#comment-13009543 ] David Liu commented on CXF-3398: -------------------------------- Thanks Dan. David > JMX Naming issue - cannot register the mutil endpoints with same service bean > ----------------------------------------------------------------------------- > > Key: CXF-3398 > URL: https://issues.apache.org/jira/browse/CXF-3398 > Project: CXF > Issue Type: Bug > Components: Core, Management > Reporter: David Liu > Assignee: Daniel Kulp > Fix For: 2.3.4 > > > It looks like there is bug in CXF that it cannot register two different Endpoint to JMX if both has a same service bean (although we deploy both endpoint on different url.). Please see my example below, it will throw the exception *javax.management.InstanceAlreadyExistsException*. I think the issue is that cxf is using > I have two suggestions: > * Can we short the JMX namespace and its name for cxf endpoint? It likes okay in visualvm, however, it will become a really long name when we use command-line interface of jmx, e.g. jmxsh. > * Can CXF allow the user to customize the JMX name space and JMX endpoint name? > {code} > public static void main(String[] args) throws Throwable { > InstrumentationManagerImpl im = new InstrumentationManagerImpl(); > im.setBus(BusFactory.getDefaultBus()); > im.setEnabled(true); > im.setServer(ManagementFactory.getPlatformMBeanServer()); > im.init(); > im.register(); > HelloWorldImpl helloworldImpl1 = new HelloWorldImpl(); > ServerFactoryBean svrFactory = new ServerFactoryBean(); > svrFactory.setAddress("http://localhost:9000/Hello"); > svrFactory.setServiceBean(helloworldImpl1); > svrFactory.create(); > HelloWorldImpl helloworldImpl2 = new HelloWorldImpl(); > ServerFactoryBean svrFactory2 = new ServerFactoryBean(); > svrFactory2.setAddress("http://localhost:9000/Hello2"); > svrFactory2.setServiceBean(helloworldImpl2); > svrFactory2.create(); > System.out.println("Server ready..."); > Thread.sleep(5 * 60 * 1000); > System.out.println("Server exiting"); > System.exit(0); > } > {code} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira