blob: f6fa9ac7ebf911252c4903bf29c04ec99edff527 [file] [log] [blame]
Title: Remote Object Persistence Client Deployment
<P>Any J2SE or J2EE application can act as a CWS Client, so its structure and packaging depends on the type of application. Here is a few general hints related to Cayenne:</P>
<UL>
<LI>DO NOT include Cayenne XML files in a client distribution - this information will be loaded in runtime via CWS from the server.</LI>
<LI>Include client persistent objects.</LI>
<LI>Make sure <A href="remote-object-persistence-installation.html" title="Remote Object Persistence Installation">all needed jars</A> are available in runtime.</LI>
</UL>
<H3><A name="RemoteObjectPersistenceClientDeployment-ClientDeploymentwithJavaWebStart"></A>Client Deployment with Java Web Start</H3>
<P>One common approach for distributing J2SE applications (especially desktop applications) is via <A href="http://java.sun.com/products/javawebstart/" class="external-link" rel="nofollow">Java Web Start</A>. Below is a sample JNLP deployment descriptor that can be used as a template for Web Start based distribution:</P>
<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
<PRE class="code-java">&lt;?xml version=<SPAN class="code-quote">&quot;1.0&quot;</SPAN> encoding=<SPAN class="code-quote">&quot;UTF-8&quot;</SPAN>?&gt;
&lt;jnlp codebase=<SPAN class="code-quote">&quot;$$codebase&quot;</SPAN>&gt;
&lt;information&gt;
&lt;title&gt;Cayenne::Sample Client App&lt;/title&gt;
&lt;vendor&gt;MyCompany&lt;/vendor&gt;
&lt;/information&gt;
&lt;security&gt;
&lt;all-permissions/&gt;
&lt;/security&gt;
&lt;resources&gt;
&lt;j2se version=<SPAN class="code-quote">&quot;1.4+&quot;</SPAN> max-heap-size=<SPAN class="code-quote">&quot;256m&quot;</SPAN>/&gt;
&lt;jar href=<SPAN class="code-quote">&quot;myapp.jar&quot;</SPAN>/&gt;
&lt;jar href=<SPAN class="code-quote">&quot;cayenne-client-nodeps.jar&quot;</SPAN>/&gt;
&lt;jar href=<SPAN class="code-quote">&quot;commons-logging-1.0.4.jar&quot;</SPAN>/&gt;
&lt;jar href=<SPAN class="code-quote">&quot;commons-collections-3.1.jar&quot;</SPAN>/&gt;
&lt;jar href=<SPAN class="code-quote">&quot;commons-lang-2.1.jar&quot;</SPAN>/&gt;
&lt;jar href=<SPAN class="code-quote">&quot;hessian-3.0.13.jar&quot;</SPAN>/&gt;
&lt;/resources&gt;
&lt;application-desc main-class=<SPAN class="code-quote">&quot;my.app.Main&quot;</SPAN>/&gt;
&lt;/jnlp&gt;
</PRE>
</DIV></DIV>