chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1075352 - in /chemistry/site/trunk/content/java: opencmis-client-api.mdtext opencmis-cookbook.mdtext
Date Mon, 28 Feb 2011 14:39:19 GMT
Author: fmui
Date: Mon Feb 28 14:39:19 2011
New Revision: 1075352

URL: http://svn.apache.org/viewvc?rev=1075352&view=rev
Log:
added a few sentences about client performance tuning

Modified:
    chemistry/site/trunk/content/java/opencmis-client-api.mdtext
    chemistry/site/trunk/content/java/opencmis-cookbook.mdtext

Modified: chemistry/site/trunk/content/java/opencmis-client-api.mdtext
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/opencmis-client-api.mdtext?rev=1075352&r1=1075351&r2=1075352&view=diff
==============================================================================
--- chemistry/site/trunk/content/java/opencmis-client-api.mdtext (original)
+++ chemistry/site/trunk/content/java/opencmis-client-api.mdtext Mon Feb 28 14:39:19 2011
@@ -64,6 +64,8 @@ In order to create a session, the Sessio
 <a name="OpenCMISClientAPI-ExampleCode"></a>
 ## Example Code
 
+There are also more examples on the [OpenCMIS Cookbook page](opencmis-cookbook.html).
+
 <a name="OpenCMISClientAPI-SessionCreation-AtomPubBinding"></a>
 ### Session Creation - AtomPub Binding
 <DIV class="codeHeader">Opening a Atom Pub Connection</DIV>
@@ -82,10 +84,6 @@ In order to create a session, the Sessio
     parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
     parameter.put(SessionParameter.REPOSITORY_ID, "myRepository");
     
-    // session locale
-    parameter.put(SessionParameter.LOCALE_ISO3166_COUNTRY, "");
-    parameter.put(SessionParameter.LOCALE_ISO639_LANGUAGE, "de");
-    
     // create session
     Session s = f.createSession(parameter);
 
@@ -116,11 +114,6 @@ In order to create a session, the Sessio
     parameter.put(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE, "http://<host>:<port>/cmis/services/RepositoryService?wsdl");
     parameter.put(SessionParameter.WEBSERVICES_VERSIONING_SERVICE, "http://<host>:<port>/cmis/services/VersioningService?wsdl");
     
-    // session locale
-    parameter.put(SessionParameter.LOCALE_ISO3166_COUNTRY, "");
-    parameter.put(SessionParameter.LOCALE_ISO639_LANGUAGE, "de");
-    parameter.put(SessionParameter.LOCALE_VARIANT, "");
-    
     // create session
     Session s = f.createSession(parameter);
 

Modified: chemistry/site/trunk/content/java/opencmis-cookbook.mdtext
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/opencmis-cookbook.mdtext?rev=1075352&r1=1075351&r2=1075352&view=diff
==============================================================================
--- chemistry/site/trunk/content/java/opencmis-cookbook.mdtext (original)
+++ chemistry/site/trunk/content/java/opencmis-cookbook.mdtext Mon Feb 28 14:39:19 2011
@@ -30,18 +30,12 @@ Breadcrumb: opencmis:OpenCMIS
     parameter.put(SessionParameter.ATOMPUB_URL, "http://localhost:8080/alfresco/service/cmis");
// URL to your CMIS server.
     // parameter.put(SessionParameter.REPOSITORY_ID, "myRepository"); // Only necessary if
there is more than one repository.
     parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
-
-    // Session locale.
-    parameter.put(SessionParameter.LOCALE_ISO3166_COUNTRY, "");
-    parameter.put(SessionParameter.LOCALE_ISO639_LANGUAGE, "en");
-    parameter.put(SessionParameter.LOCALE_VARIANT, "US");
     
     // Create session.
     Session session = null;
     try {
         // This supposes only one repository is available at the URL.
-        Repository soleRepository =
-        sessionFactory.getRepositories(parameter).get(0);
+        Repository soleRepository = sessionFactory.getRepositories(parameter).get(0);
         session = soleRepository.createSession();
     }
     catch(CmisConnectionException e) { 
@@ -94,7 +88,21 @@ See [this page](http://java.sun.com/docs
     CookieHandler.setDefault(cm);
 
 
-<a name="OpenCMISCookbook-Understandingtheclientsidecache"></a>
+### Tuning the performance
+
+The client performance relies on two aspects: Caching and the requested data.
+
+The OpenCMIS Session object does a lot of caching for you and tries to avoid calls to the
repository wherever
+possible. In order to be effective, you have to reuse the Session object whenever possible.
Creating a new Session
+object for each call decreases the performance drastically. Session objects and CMIS objects
are thread-safe and
+can/should be reused across threads.
+
+OperationContext objects control which data (properties, renditions, relationships, allowable
actions, ACLs,
+policies, etc.) is requested from the repository. The more data is requested, the longer
it takes to transmit and
+process it. By default, OpenCMIS fetches more data than most applications need. Tuning the
OperationContext,
+and especially the property filter, can result in a significant performance improvement.
+
+
 ### Understanding the client side cache
 
 Client side caching is turned on by default. That is, `getObject()` will
@@ -245,6 +253,7 @@ can have a value.
 This is a very simple C# example that demonstrates how to connect to an
 OpenCMIS server via the Web Services binding. Please note that .Net only
 allows UsernameTokens over HTTPS.
+(See also [DotCMIS](dotnet/dotcmis.html)).
 
     :::C#
     using System;



Mime
View raw message