chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1039008 - in /incubator/chemistry/opencmis/trunk: chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/ chemistry-opencmis-commons/chemistry-opencmis-commo...
Date Thu, 25 Nov 2010 11:34:34 GMT
Author: fmui
Date: Thu Nov 25 11:34:34 2010
New Revision: 1039008

URL: http://svn.apache.org/viewvc?rev=1039008&view=rev
Log:
- added memory threshold parameter (controls content download with web services client)

Modified:
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/PortProvider.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/PortProvider.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/PortProvider.java?rev=1039008&r1=1039007&r2=1039008&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/PortProvider.java
(original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/PortProvider.java
Thu Nov 25 11:34:34 2010
@@ -277,8 +277,13 @@ public class PortProvider {
             } else if (service instanceof NavigationService) {
                 portObject = ((NavigationService) service).getNavigationServicePort(new MTOMFeature());
             } else if (service instanceof ObjectService) {
+                int threshold = 4 * 1024 * 1024;
+                try {
+                    threshold = Integer.parseInt((String) fSession.get(SessionParameter.WEBSERVICES_MEMORY_THRESHOLD));
+                } catch (Exception e) {
+                }
                 portObject = ((ObjectService) service).getObjectServicePort(new MTOMFeature(),
-                        new StreamingAttachmentFeature(null, true, 4 * 1024 * 1024));
+                        new StreamingAttachmentFeature(null, true, threshold));
                 ((BindingProvider) portObject).getRequestContext().put(
                         JAXWSProperties.HTTP_CLIENT_STREAMING_CHUNK_SIZE, CHUNK_SIZE);
             } else if (service instanceof VersioningService) {

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java?rev=1039008&r1=1039007&r2=1039008&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java
(original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-api/src/main/java/org/apache/chemistry/opencmis/commons/SessionParameter.java
Thu Nov 25 11:34:34 2010
@@ -51,6 +51,7 @@ public final class SessionParameter {
     public static final String WEBSERVICES_MULTIFILING_SERVICE = "org.apache.chemistry.opencmis.binding.webservices.MultiFilingService";
     public static final String WEBSERVICES_POLICY_SERVICE = "org.apache.chemistry.opencmis.binding.webservices.PolicyService";
     public static final String WEBSERVICES_ACL_SERVICE = "org.apache.chemistry.opencmis.binding.webservices.ACLService";
+    public static final String WEBSERVICES_MEMORY_THRESHOLD = "org.apache.chemistry.opencmis.binding.webservices.memoryThreshold";
 
     /** Factory class name for the local binding. */
     public static final String LOCAL_FACTORY = "org.apache.chemistry.opencmis.binding.local.classname";
@@ -75,7 +76,7 @@ public final class SessionParameter {
     public static final String CACHE_SIZE_PATHTOID = "org.apache.chemistry.opencmis.cache.pathtoid.size";
     public static final String CACHE_TTL_PATHTOID = "org.apache.chemistry.opencmis.cache.pathtoid.ttl";
     public static final String CACHE_PATH_OMIT = "org.apache.chemistry.opencmis.cache.path.omit";
-    
+
     public static final String CACHE_SIZE_REPOSITORIES = "org.apache.chemistry.opencmis.binding.cache.repositories.size";
     public static final String CACHE_SIZE_TYPES = "org.apache.chemistry.opencmis.binding.cache.types.size";
     public static final String CACHE_SIZE_LINKS = "org.apache.chemistry.opencmis.binding.cache.links.size";



Mime
View raw message