mx4j/src/tools/mx4j/tools/remote/local LocalConnectorServer.java,1.4,1.5

[email protected]
Newsgroups gmane.comp.java.mx4j.cvs
Message-ID <[email protected]>
Update of /cvsroot/mx4j/mx4j/src/tools/mx4j/tools/remote/local
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30169/tools/mx4j/tools/remote/local

Modified Files:
	LocalConnectorServer.java 
Log Message:
Fix for bug #907629: now using the same classloader mechanism of the provider to lookup the resolver

Index: LocalConnectorServer.java
===================================================================
RCS file: /cvsroot/mx4j/mx4j/src/tools/mx4j/tools/remote/local/LocalConnectorServer.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** LocalConnectorServer.java	18 Sep 2003 18:44:03 -0000	1.4
--- LocalConnectorServer.java	1 Mar 2004 18:05:39 -0000	1.5
***************
*** 53,57 ****
        JMXServiceURL address = getAddress();
        String protocol = address.getProtocol();
!       ConnectionResolver resolver = ConnectionResolver.getInstance(protocol);
        if (resolver == null) throw new MalformedURLException("Unsupported protocol: " + protocol);
  
--- 53,58 ----
        JMXServiceURL address = getAddress();
        String protocol = address.getProtocol();
!       Map environment = getEnvironment();
!       ConnectionResolver resolver = ConnectionResolver.newConnectionResolver(protocol, environment);
        if (resolver == null) throw new MalformedURLException("Unsupported protocol: " + protocol);
  
***************
*** 59,63 ****
        MBeanServer server = super.getMBeanServer();
  
-       Map environment = getEnvironment();
        MBeanServer resolvedServer = (MBeanServer)resolver.createServer(address, environment);
        if (resolvedServer == null)
--- 60,63 ----
***************
*** 103,109 ****
        JMXServiceURL address = getAddress();
        String protocol = address.getProtocol();
!       ConnectionResolver resolver = ConnectionResolver.getInstance(protocol);
        if (resolver == null) throw new MalformedURLException("Unsupported protocol: " + protocol);
!       resolver.unbindServer(getMBeanServer(), address, getEnvironment());
  
        unregister(address);
--- 103,110 ----
        JMXServiceURL address = getAddress();
        String protocol = address.getProtocol();
!       Map environment = getEnvironment();
!       ConnectionResolver resolver = ConnectionResolver.newConnectionResolver(protocol, environment);
        if (resolver == null) throw new MalformedURLException("Unsupported protocol: " + protocol);
!       resolver.unbindServer(getMBeanServer(), address, environment);
  
        unregister(address);



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.