chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r786219 - in /websites/production/chemistry: ./ content/java/documentation-lifecycle.html content/java/opencmis-client-api.html content/java/opencmis-cookbook.html
Date Mon, 28 Feb 2011 14:45:36 GMT
Author: fmui
Date: Mon Feb 28 14:45:35 2011
New Revision: 786219

Log:
Publishing merge to chemistry site by fmui

Added:
    websites/production/chemistry/content/java/documentation-lifecycle.html
      - copied unchanged from r786218, websites/staging/chemistry/trunk/content/java/documentation-lifecycle.html
Modified:
    websites/production/chemistry/   (props changed)
    websites/production/chemistry/content/java/opencmis-client-api.html
    websites/production/chemistry/content/java/opencmis-cookbook.html

Propchange: websites/production/chemistry/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb 28 14:45:35 2011
@@ -1 +1 @@
-/websites/staging/chemistry/trunk:785583-785980
+/websites/staging/chemistry/trunk:785583-786218

Modified: websites/production/chemistry/content/java/opencmis-client-api.html
==============================================================================
--- websites/production/chemistry/content/java/opencmis-client-api.html (original)
+++ websites/production/chemistry/content/java/opencmis-client-api.html Mon Feb 28 14:45:35
2011
@@ -264,6 +264,7 @@ In order to create a session, the Sessio
 ).</p>
 <p><a name="OpenCMISClientAPI-ExampleCode"></a></p>
 <h2 id="example_code">Example Code</h2>
+<p>There are also more examples on the <a href="opencmis-cookbook.html">OpenCMIS
Cookbook page</a>.</p>
 <p><a name="OpenCMISClientAPI-SessionCreation-AtomPubBinding"></a></p>
 <h3 id="session_creation_-_atompub_binding">Session Creation - AtomPub Binding</h3>
 <p><DIV class="codeHeader">Opening a Atom Pub Connection</DIV></p>
@@ -280,10 +281,6 @@ In order to create a session, the Sessio
 <span class="n">parameter</span><span class="o">.</span><span
class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span
class="o">.</span><span class="na">BINDING_TYPE</span><span class="o">,</span>
<span class="n">BindingType</span><span class="o">.</span><span
class="na">ATOMPUB</span><span class="o">.</span><span class="na">value</span><span
class="o">());</span>
 <span class="n">parameter</span><span class="o">.</span><span
class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span
class="o">.</span><span class="na">REPOSITORY_ID</span><span class="o">,</span>
<span class="s">&quot;myRepository&quot;</span><span class="o">);</span>
 
-<span class="c1">// session locale</span>
-<span class="n">parameter</span><span class="o">.</span><span
class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span
class="o">.</span><span class="na">LOCALE_ISO3166_COUNTRY</span><span
class="o">,</span> <span class="s">&quot;&quot;</span><span
class="o">);</span>
-<span class="n">parameter</span><span class="o">.</span><span
class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span
class="o">.</span><span class="na">LOCALE_ISO639_LANGUAGE</span><span
class="o">,</span> <span class="s">&quot;de&quot;</span><span
class="o">);</span>
-
 <span class="c1">// create session</span>
 <span class="n">Session</span> <span class="n">s</span> <span
class="o">=</span> <span class="n">f</span><span class="o">.</span><span
class="na">createSession</span><span class="o">(</span><span class="n">parameter</span><span
class="o">);</span>
 </pre></div>
@@ -313,11 +310,6 @@ In order to create a session, the Sessio
 <span class="n">parameter</span><span class="o">.</span><span
class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span
class="o">.</span><span class="na">WEBSERVICES_REPOSITORY_SERVICE</span><span
class="o">,</span> <span class="s">&quot;http://&lt;host&gt;:&lt;port&gt;/cmis/services/RepositoryService?wsdl&quot;</span><span
class="o">);</span>
 <span class="n">parameter</span><span class="o">.</span><span
class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span
class="o">.</span><span class="na">WEBSERVICES_VERSIONING_SERVICE</span><span
class="o">,</span> <span class="s">&quot;http://&lt;host&gt;:&lt;port&gt;/cmis/services/VersioningService?wsdl&quot;</span><span
class="o">);</span>
 
-<span class="c1">// session locale</span>
-<span class="n">parameter</span><span class="o">.</span><span
class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span
class="o">.</span><span class="na">LOCALE_ISO3166_COUNTRY</span><span
class="o">,</span> <span class="s">&quot;&quot;</span><span
class="o">);</span>
-<span class="n">parameter</span><span class="o">.</span><span
class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span
class="o">.</span><span class="na">LOCALE_ISO639_LANGUAGE</span><span
class="o">,</span> <span class="s">&quot;de&quot;</span><span
class="o">);</span>
-<span class="n">parameter</span><span class="o">.</span><span
class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span
class="o">.</span><span class="na">LOCALE_VARIANT</span><span class="o">,</span>
<span class="s">&quot;&quot;</span><span class="o">);</span>
-
 <span class="c1">// create session</span>
 <span class="n">Session</span> <span class="n">s</span> <span
class="o">=</span> <span class="n">f</span><span class="o">.</span><span
class="na">createSession</span><span class="o">(</span><span class="n">parameter</span><span
class="o">);</span>
 </pre></div>

Modified: websites/production/chemistry/content/java/opencmis-cookbook.html
==============================================================================
--- websites/production/chemistry/content/java/opencmis-cookbook.html (original)
+++ websites/production/chemistry/content/java/opencmis-cookbook.html Mon Feb 28 14:45:35
2011
@@ -191,6 +191,7 @@ Apache Chemistry - OpenCMIS Cookbook
 <li><a href="#using_cookies">Using Cookies</a></li>
 </ul>
 </li>
+<li><a href="#tuning_the_performance">Tuning the performance</a></li>
 <li><a href="#understanding_the_client_side_cache">Understanding the client side
cache</a></li>
 <li><a href="#getting_the_id_of_an_object_from_its_path">Getting the id of an
object from its path</a></li>
 <li><a href="#reading_a_file">Reading a file</a></li>
@@ -231,17 +232,11 @@ Apache Chemistry - OpenCMIS Cookbook
 <span class="c1">// parameter.put(SessionParameter.REPOSITORY_ID, &quot;myRepository&quot;);
// Only necessary if there is more than one repository.</span>
 <span class="n">parameter</span><span class="o">.</span><span
class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span
class="o">.</span><span class="na">BINDING_TYPE</span><span class="o">,</span>
<span class="n">BindingType</span><span class="o">.</span><span
class="na">ATOMPUB</span><span class="o">.</span><span class="na">value</span><span
class="o">());</span>
 
-<span class="c1">// Session locale.</span>
-<span class="n">parameter</span><span class="o">.</span><span
class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span
class="o">.</span><span class="na">LOCALE_ISO3166_COUNTRY</span><span
class="o">,</span> <span class="s">&quot;&quot;</span><span
class="o">);</span>
-<span class="n">parameter</span><span class="o">.</span><span
class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span
class="o">.</span><span class="na">LOCALE_ISO639_LANGUAGE</span><span
class="o">,</span> <span class="s">&quot;en&quot;</span><span
class="o">);</span>
-<span class="n">parameter</span><span class="o">.</span><span
class="na">put</span><span class="o">(</span><span class="n">SessionParameter</span><span
class="o">.</span><span class="na">LOCALE_VARIANT</span><span class="o">,</span>
<span class="s">&quot;US&quot;</span><span class="o">);</span>
-
 <span class="c1">// Create session.</span>
 <span class="n">Session</span> <span class="n">session</span> <span
class="o">=</span> <span class="kc">null</span><span class="o">;</span>
 <span class="k">try</span> <span class="o">{</span>
     <span class="c1">// This supposes only one repository is available at the URL.</span>
-    <span class="n">Repository</span> <span class="n">soleRepository</span>
<span class="o">=</span>
-    <span class="n">sessionFactory</span><span class="o">.</span><span
class="na">getRepositories</span><span class="o">(</span><span class="n">parameter</span><span
class="o">).</span><span class="na">get</span><span class="o">(</span><span
class="mi">0</span><span class="o">);</span>
+    <span class="n">Repository</span> <span class="n">soleRepository</span>
<span class="o">=</span> <span class="n">sessionFactory</span><span
class="o">.</span><span class="na">getRepositories</span><span class="o">(</span><span
class="n">parameter</span><span class="o">).</span><span class="na">get</span><span
class="o">(</span><span class="mi">0</span><span class="o">);</span>
     <span class="n">session</span> <span class="o">=</span> <span
class="n">soleRepository</span><span class="o">.</span><span class="na">createSession</span><span
class="o">();</span>
 <span class="o">}</span>
 <span class="k">catch</span><span class="o">(</span><span class="n">CmisConnectionException</span>
<span class="n">e</span><span class="o">)</span> <span class="o">{</span>

@@ -285,7 +280,16 @@ See <a href="http://java.sun.com/docs/bo
 </pre></div>
 
 
-<p><a name="OpenCMISCookbook-Understandingtheclientsidecache"></a></p>
+<h3 id="tuning_the_performance">Tuning the performance</h3>
+<p>The client performance relies on two aspects: Caching and the requested data.</p>
+<p>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.</p>
+<p>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.</p>
 <h3 id="understanding_the_client_side_cache">Understanding the client side cache</h3>
 <p>Client side caching is turned on by default. That is, <code>getObject()</code>
will
 first look into the session cache if the object already exists there. If
@@ -427,7 +431,8 @@ can have a value.</p>
 <h3 id="connecting_from_a_net_client_via_the_web_services_binding">Connecting from
a .Net client via the Web Services binding</h3>
 <p>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.</p>
+allows UsernameTokens over HTTPS.
+(See also <a href="../dotnet/dotcmis.html">DotCMIS</a>).</p>
 <div class="codehilite"><pre><span class="n">using</span> <span
class="n">System</span><span class="p">;</span>
 <span class="n">using</span> <span class="n">System</span><span
class="p">.</span><span class="n">ServiceModel</span><span class="p">;</span>
 <span class="n">using</span> <span class="n">OpenCMISClient</span><span
class="p">.</span><span class="n">OpenCMISServer</span><span class="p">;</span>



Mime
View raw message