You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Stephan Siano (JIRA)" <ji...@apache.org> on 2011/02/10 10:58:57 UTC

[jira] Commented: (ARIES-554) aries JNDI bundle breaks remote JMX clients via RMI

    [ https://issues.apache.org/jira/browse/ARIES-554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12992971#comment-12992971 ] 

Stephan Siano commented on ARIES-554:
-------------------------------------

I did some additional tests about this issue. The context issue goes away if I do a Thread.currentThread().setContextClassLoader(Activator.class.getClassLoader()); call before using the JMXConnectionFactory.connect() call. Alterrnatively I can put the BundleContext into the environment (with key "osgi.service.jndi.bundleContext"). I will run into another issue with proxy lookup then, but I will open a separate JIRA task for that.

> aries JNDI bundle breaks remote JMX clients via RMI
> ---------------------------------------------------
>
>                 Key: ARIES-554
>                 URL: https://issues.apache.org/jira/browse/ARIES-554
>             Project: Aries
>          Issue Type: Bug
>          Components: JNDI
>    Affects Versions: 0.2, 0.3
>            Reporter: Stephan Siano
>
> If the aries JNDI bundles are present in the environment, connections to remote JMX agents fail. I could recreate the issue with a bundle containing only the line
> JMXConnectorFactory.connect(new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:1717/jmxrmi"));
> in the start() method of the bundle activator (and nothing else).
> The bundle will start both on equinox and felix as long as the aries jndi bundles (I tried version 0.2 and 0.3-SNAPSHOT) are not running and any java application that allows remote JMX at that port is running (check with jconsole if you are unsure). It will not start as soon as the jndi bundle is started. As far as I got in debugging this, the JMXConnectionFactory is trying to do a JNDI lookup for the RMI connection and is delegated to the Aries JNDI coding, that is trying to determine a bundle context for the call.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira