jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r543994 - /jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/servlet/RemoteBindingServlet.java
Date Sun, 03 Jun 2007 21:34:37 GMT
Author: jukka
Date: Sun Jun  3 14:34:36 2007
New Revision: 543994

URL: http://svn.apache.org/viewvc?view=rev&rev=543994
Log:
JCR-956: Fixed problems in RemoteBindingServlet

Modified:
    jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/servlet/RemoteBindingServlet.java

Modified: jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/servlet/RemoteBindingServlet.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/servlet/RemoteBindingServlet.java?view=diff&rev=543994&r1=543993&r2=543994
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/servlet/RemoteBindingServlet.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/servlet/RemoteBindingServlet.java
Sun Jun  3 14:34:36 2007
@@ -19,6 +19,7 @@
 import java.io.IOException;
 import java.io.ObjectOutputStream;
 import java.rmi.RemoteException;
+import java.rmi.server.RemoteObject;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
@@ -76,7 +77,7 @@
      * @throws ServletException if the repository could not be instantiated
      */
     protected RemoteRepository getRemoteRepository() throws ServletException {
-        if (remote != null) {
+        if (remote == null) {
             try {
                 RemoteAdapterFactory factory = getRemoteAdapterFactory();
                 remote = factory.getRemoteRepository(new ServletRepository(this));
@@ -132,7 +133,7 @@
         response.setContentType("application/octet-stream");
         ObjectOutputStream output =
             new ObjectOutputStream(response.getOutputStream());
-        output.writeObject(getRemoteRepository());
+        output.writeObject(RemoteObject.toStub(getRemoteRepository()));
         output.flush();
     }
 



Mime
View raw message