mx4j/src/core/mx4j/remote/resolver/iiop IIOPResolver.java,1.8,1.9

Simone Bordet <[email protected]>
Newsgroups gmane.comp.java.mx4j.cvs
Message-ID <[email protected]>
Update of /cvsroot/mx4j/mx4j/src/core/mx4j/remote/resolver/iiop
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26590/core/mx4j/remote/resolver/iiop

Modified Files:
	IIOPResolver.java 
Log Message:
+ Updated destroyServer, now implementing from ConnectionResolver
+ Overridden bindServer, connecting the RMIServerImpl

Index: IIOPResolver.java
===================================================================
RCS file: /cvsroot/mx4j/mx4j/src/core/mx4j/remote/resolver/iiop/IIOPResolver.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** IIOPResolver.java	8 Nov 2003 16:49:07 -0000	1.8
--- IIOPResolver.java	18 Jul 2004 21:16:33 -0000	1.9
***************
*** 90,97 ****
     }
  
     protected String encodeStub(RMIServerImpl rmiServer, Map environment) throws IOException
     {
        Stub stub = (Stub)bindClient(rmiServer.toStub(), environment);
!       String ior = orb.object_to_string(stub);
        return IOR_CONTEXT + ior;
     }
--- 90,105 ----
     }
  
+    public JMXServiceURL bindServer(Object server, JMXServiceURL url, Map environment) throws IOException
+    {
+       RMIServerImpl rmiServer = (RMIServerImpl)server;
+       Stub stub = (Stub)PortableRemoteObject.toStub(rmiServer);
+       stub.connect(getORB(environment));
+       return super.bindServer(server, url, environment);
+    }
+ 
     protected String encodeStub(RMIServerImpl rmiServer, Map environment) throws IOException
     {
        Stub stub = (Stub)bindClient(rmiServer.toStub(), environment);
!       String ior = getORB(environment).object_to_string(stub);
        return IOR_CONTEXT + ior;
     }
***************
*** 119,124 ****
     }
  
!    protected void destroyServer(Object server, Map environment) throws IOException
     {
        if (orb != null)
        {
--- 127,133 ----
     }
  
!    public void destroyServer(Object server, JMXServiceURL url, Map environment) throws IOException
     {
+       if (!isEncodedForm(url)) return;
        if (orb != null)
        {



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&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.