You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by aa...@apache.org on 2011/11/22 08:58:10 UTC

svn commit: r1204848 - in /cayenne/main/trunk: docs/doc/src/main/resources/RELEASE-NOTES.txt framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/hessian/HessianConnection.java

Author: aadamchik
Date: Tue Nov 22 07:58:09 2011
New Revision: 1204848

URL: http://svn.apache.org/viewvc?rev=1204848&view=rev
Log:
CAY-1629 [PATCH] Can't add custom Hessian serializers to the client

patch by John Huss

Modified:
    cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/hessian/HessianConnection.java

Modified: cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt?rev=1204848&r1=1204847&r2=1204848&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt Tue Nov 22 07:58:09 2011
@@ -16,6 +16,7 @@ Changes/New Features Since 3.1M3:
 CAY-1603 Improve custom ExtendedType registration API
 CAY-1608 Implement constructor injection support for DefaultAdhocObjectFactory
 CAY-1618 Create database adapters instances with proper injection
+CAY-1629 [PATCH] Can't add custom Hessian serializers to the client
 CAY-1637 [PATCH] DataContextFactory is cumbersome to customize
 CAY-1638 [PATCH] Can't disable validation for CayenneContext
 CAY-1639 cayenne-lifecycle: don't call String representation of ObjectId a UUID

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/hessian/HessianConnection.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/hessian/HessianConnection.java?rev=1204848&r1=1204847&r2=1204848&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/hessian/HessianConnection.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/remote/hessian/HessianConnection.java Tue Nov 22 07:58:09 2011
@@ -31,6 +31,7 @@ import org.apache.commons.logging.LogFac
 
 import com.caucho.hessian.client.HessianRuntimeException;
 import com.caucho.hessian.io.HessianProtocolException;
+import com.caucho.hessian.io.SerializerFactory;
 
 /**
  * An ClientConnection that passes messages to a remotely deployed HessianService. It
@@ -56,7 +57,8 @@ public class HessianConnection extends B
 
     protected RemoteSession session;
     protected RemoteService service;
-
+    protected SerializerFactory serializerFactory;
+    
     /**
      * Creates HessianConnection that will establish dedicated session and will not use
      * HTTP basic authentication.
@@ -197,6 +199,9 @@ public class HessianConnection extends B
         factory.setUser(userName);
         factory.setPassword(password);
         factory.setReadTimeout(getReadTimeout());
+
+        this.serializerFactory = factory.getSerializerFactory();
+
         try {
             this.service = (RemoteService) factory.create(RemoteService.class, url);
         }
@@ -268,4 +273,9 @@ public class HessianConnection extends B
 
         return Util.unwindException(th);
     }
+
+    public SerializerFactory getSerializerFactory() {
+        return serializerFactory;
+    }
+
 }