| 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"><?xml version=<SPAN class="code-quote">"1.0"</SPAN> encoding=<SPAN class="code-quote">"UTF-8"</SPAN>?> |
| <jnlp codebase=<SPAN class="code-quote">"$$codebase"</SPAN>> |
| |
| <information> |
| <title>Cayenne::Sample Client App</title> |
| <vendor>MyCompany</vendor> |
| </information> |
| |
| <security> |
| <all-permissions/> |
| </security> |
| |
| <resources> |
| <j2se version=<SPAN class="code-quote">"1.4+"</SPAN> max-heap-size=<SPAN class="code-quote">"256m"</SPAN>/> |
| |
| <jar href=<SPAN class="code-quote">"myapp.jar"</SPAN>/> |
| <jar href=<SPAN class="code-quote">"cayenne-client-nodeps.jar"</SPAN>/> |
| <jar href=<SPAN class="code-quote">"commons-logging-1.0.4.jar"</SPAN>/> |
| <jar href=<SPAN class="code-quote">"commons-collections-3.1.jar"</SPAN>/> |
| <jar href=<SPAN class="code-quote">"commons-lang-2.1.jar"</SPAN>/> |
| <jar href=<SPAN class="code-quote">"hessian-3.0.13.jar"</SPAN>/> |
| </resources> |
| |
| <application-desc main-class=<SPAN class="code-quote">"my.app.Main"</SPAN>/> |
| </jnlp> |
| </PRE> |
| </DIV></DIV> |