From users-return-7141-apmail-qpid-users-archive=qpid.apache.org@qpid.apache.org Mon Oct 22 14:15:10 2012 Return-Path: X-Original-To: apmail-qpid-users-archive@www.apache.org Delivered-To: apmail-qpid-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 70570DD41 for ; Mon, 22 Oct 2012 14:15:10 +0000 (UTC) Received: (qmail 92765 invoked by uid 500); 22 Oct 2012 14:15:10 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 92439 invoked by uid 500); 22 Oct 2012 14:15:09 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 92409 invoked by uid 99); 22 Oct 2012 14:15:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Oct 2012 14:15:08 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of wprice@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Oct 2012 14:15:02 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9MEEdcc031113 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 22 Oct 2012 10:14:39 -0400 Received: from [10.11.9.40] (vpn-9-40.rdu.redhat.com [10.11.9.40]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9MEEb7v017581 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Mon, 22 Oct 2012 10:14:39 -0400 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: Call qpid jmx from ear deployed in JBoss7.1.2Final From: "Weston M. Price" In-Reply-To: Date: Mon, 22 Oct 2012 10:14:36 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <578A163A-55A4-48B1-8E65-32BFC2C857F1@redhat.com> References: To: users@qpid.apache.org X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Virus-Checked: Checked by ClamAV on apache.org Hi Joey, Yep, I will ask around and see what I can come up with.=20 Regards, Weston On Oct 22, 2012, at 9:41 AM, Joey Daughtery = wrote: > Weston > Thanks for the information. I submitted the following last week, but = no one > has responded. If you happen to know anyone that might be able to = help, > can you forward the link below to them. >=20 > https://community.jboss.org/thread/208071?tstart=3D0 >=20 > Thanks >=20 > Joe Daughtery >=20 > On Fri, Oct 19, 2012 at 10:28 AM, Weston M. Price = wrote: >=20 >> Hi Joey, >> Probably the best place for this post would be in the AS7 = forums >> as it does appear AS7 is not interpreting the url correctly and since = it >> works as expected outside of the container it looks like it might be = a >> defect on the AS7 side. Probably the best place to start would be in = the >> AS7 forum: >>=20 >> https://community.jboss.org/en/jbossas7?view=3Ddiscussions >>=20 >> =46rom what I can see in your code, it 'should' work as expected. >>=20 >> Regards, >>=20 >> Weston >> On Oct 19, 2012, at 10:01 AM, Joey Daughtery = >> wrote: >>=20 >>> All >>> The following code when ran in a main method runs as expected. = However, >>> when I put the code inside an ear and call it via a webservice = endpoint, >> I >>> get the exception below. Appears that jboss is interpreting the url = as >> if >>> the code is attempting to connect to the jboss service. I was = thinking >>> that because qpid is listening on port 8999, that jboss would hit = that >>> port, there by triggering the jmx lookup on qpid. >>>=20 >>> Exception: >>> Failed to retrieve RMIServer stub: = javax.naming.NameNotFoundException: >>> rmi://localhost:8999/jmxrmi -- service >>> jboss.naming.context.java.rmi:.localhost:8999.jmxrmi"} >>>=20 >>> Code: >>>=20 >>> private static void main() { >>> String[] attributes =3D new String[]{"Name", "Owner", >>> "ActiveConsumerCount", "AutoDelete", "Capacity", "ConsumerCount", >>> "Description", "Durable", "Exclusive", "FlowOverfull", >>> "FlowResumeCapacity", "MaximumDeliveryCount", >>> "MaximumMessageAge", "MaximumMessageCount", "MaximumMessageSize", >>> "MaximumQueueDepth", "MessageCount", "QueueDepth", "QueueType", >>> "ReceivedMessageCount"}; >>>=20 >>> try { >>> Map environment =3D new HashMap> Object>(); >>>=20 >>> // credentials: user name and password >>> environment.put(JMXConnector.CREDENTIALS, new >> String[]{"admin", >>> "admin"}); >>> JMXServiceURL url =3D new >>> = JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:8999/jmxrmi"); >>> JMXConnector jmxConnector =3D = JMXConnectorFactory.connect(url, >>> environment); >>> MBeanServerConnection mbsc =3D >>> jmxConnector.getMBeanServerConnection(); >>> String[] domains =3D mbsc.getDomains(); >>> for (int k =3D 0; k < domains.length; k++) { >>> String domain =3D domains[k]; >>> ObjectName queueObjectName =3D new ObjectName(domain + >> ":*"); >>> Set nameSet =3D mbsc.queryNames(queueObjectName, = null); >>> Iterator it =3D nameSet.iterator(); >>> while (it.hasNext()) { >>> ObjectName n =3D (ObjectName) it.next(); >>> //System.out.println(n.getCanonicalName() + ": " + >>> n.getKeyPropertyListString()); >>> ObjectName queueObjectName2 =3D new >>> ObjectName(domain+":"+n.getKeyPropertyListString()); >>> Iterator it2 =3D = mbsc.getAttributes(queueObjectName2, >>> attributes).asList().iterator(); >>> System.out.println("########################NEXT >>> DOMAIN: "+domain+":"+n.getKeyPropertyListString()); >>> while (it2.hasNext()) { >>> Attribute att =3D (Attribute) it2.next(); >>> System.out.println("attribute: "+att.getName() = + " >>> value: " + att.getValue()); >>> } >>>=20 >>> } >>> } >>> } catch (Exception e) { >>> e.printStackTrace(); >>> } >>> } >>>=20 >>> Thanks >>>=20 >>> Joe >>=20 >>=20 >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org >> For additional commands, e-mail: users-help@qpid.apache.org >>=20 >>=20 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For additional commands, e-mail: users-help@qpid.apache.org