Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 864d1c3c3cd8df4e3a2692faf8776e05 > files > 989

db4o-doc-7.4-2.fc13.i686.rpm

<html>
  <head>
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>TP Enhancement On Java</title>
    <link rel="stylesheet" type="text/css" href="../../../../style.css">
  </head>
  <body>
    <div class="CommonContent">
      <div class="CommonContentArea">
        <h1>TP Enhancement On Java</h1><script>
//We attach this function to a browser object as a variable so that if multiple of these blocks are
//present on the same page, then they will simply over-write eachother with the same function instead
//of generating a naming collision.
window.WikiCodeFormattingCopyToClipboard = function copyToClipboard(sID){
	var sContent = document.getElementById(sID).innerText;
	if( window.clipboardData && clipboardData.setData )
	{
		clipboardData.setData("Text", sContent);
	}
	else
	{
		alert("You must enable javascript access to your clipboard for this feature to work. Please referr to your browser documentation or Google search for instructions.");
	}
}
</script><p><font color="#990000">This topic applies to Java version only</font>&nbsp;</p><p>TP Enhancement on Java platform can be done by customizing the ant build script to include instrumentation for persistent classes.&nbsp;</p><p>For a simple example we will use <a href="tp_enhancement_on_java/sensorpanel.html" class="wikiLink">SensorPanel</a> class, which represents a simple linked list. In our example application we will first store several objects of this class, then retrieve and modify them. Transparent Persistence mechanism should take care of modified objects and persist them to the database when the transaction is committed or the database is closed. As SensorPanel does not implement Activatable interface, we will need to use db4o enhancement tools to implement this interface after the class is built.</p><p>Let's look at our example code.</p><p>First, we need to configure Transparent Persistence:</p><div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">TPExample.java: <span class="fscMemberName">configureTP</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_ConfigureTP_850_55"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #008080;">1</span><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_ConfigureTP_850_55_43_206_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_ConfigureTP_850_55_43_206_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_ConfigureTP_850_55_43_206_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_ConfigureTP_850_55_43_206_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_ConfigureTP_850_55_43_206_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_ConfigureTP_850_55_43_206_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_ConfigureTP_850_55_43_206_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_ConfigureTP_850_55_43_206_Open_Text').style.display='inline';"/><span style="color: #0000FF;">private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">static</span><span style="color: #000000;"> Configuration configureTP() </span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_ConfigureTP_850_55_43_206_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_ConfigureTP_850_55_43_206_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">2</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    Configuration configuration </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4o.newConfiguration();
</span><span style="color: #008080;">3</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #008000;">//</span><span style="color: #008000;"> add TP support</span><span style="color: #008000;">
</span><span style="color: #008080;">4</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">    configuration.add(</span><span style="color: #0000FF;">new</span><span style="color: #000000;"> TransparentPersistenceSupport());
</span><span style="color: #008080;">5</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #0000FF;">return</span><span style="color: #000000;"> configuration;
</span><span style="color: #008080;">6</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>  }</span></span></div></pre></div></div>&nbsp;</p><p>Now we will store a linked list of 10 elements:&nbsp;</p><div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">TPExample.java: <span class="fscMemberName">storeSensorPanel</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #008080;">01</span><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_39_353_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_39_353_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_39_353_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_39_353_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_39_353_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_39_353_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_39_353_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_39_353_Open_Text').style.display='inline';"/><span style="color: #0000FF;">private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">static</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> storeSensorPanel() </span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_39_353_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_39_353_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> File(DB4O_FILE_NAME).delete();
</span><span style="color: #008080;">03</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    ObjectContainer container </span><span style="color: #000000;">=</span><span style="color: #000000;"> database(Db4o.newConfiguration());
</span><span style="color: #008080;">04</span><span style="color: #000000;"><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_168_350_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_168_350_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_168_350_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_168_350_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_168_350_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_168_350_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_168_350_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_168_350_Open_Text').style.display='inline';"/>    </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (container </span><span style="color: #000000;">!=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">null</span><span style="color: #000000;">) </span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_168_350_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_168_350_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">05</span><span style="color: #000000;"><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_177_310_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_177_310_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_177_310_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_177_310_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_177_310_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_177_310_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_177_310_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_177_310_Open_Text').style.display='inline';"/>      </span><span style="color: #0000FF;">try</span><span style="color: #000000;"> </span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_177_310_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_177_310_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">06</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #008000;">//</span><span style="color: #008000;"> create a linked list with length 10</span><span style="color: #008000;">
</span><span style="color: #008080;">07</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">        SensorPanel list </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> SensorPanel().createList(</span><span style="color: #000000;">10</span><span style="color: #000000;">);
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        container.store(list);
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_319_346_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_319_346_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_319_346_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_319_346_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_319_346_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_319_346_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_319_346_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_319_346_Open_Text').style.display='inline';"/>      }</span></span><span style="color: #000000;"> </span><span style="color: #0000FF;">finally</span><span style="color: #000000;"> </span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_319_346_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_StoreSensorPanel_975_60_319_346_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        closeDatabase();
</span><span style="color: #008080;">11</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>      }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">12</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>    }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">13</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>  }</span></span></div></pre></div></div> </p><p>And the following procedure will test the effect of TP:</p><div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">TPExample.java: <span class="fscMemberName">testTransparentPersistence</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #008080;">01</span><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_49_1692_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_49_1692_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_49_1692_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_49_1692_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_49_1692_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_49_1692_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_49_1692_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_49_1692_Open_Text').style.display='inline';"/><span style="color: #0000FF;">private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">static</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> testTransparentPersistence() </span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_49_1692_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_49_1692_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    storeSensorPanel();
</span><span style="color: #008080;">03</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    Configuration configuration </span><span style="color: #000000;">=</span><span style="color: #000000;"> configureTP();
</span><span style="color: #008080;">04</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">05</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    ObjectContainer container </span><span style="color: #000000;">=</span><span style="color: #000000;"> database(configuration);
</span><span style="color: #008080;">06</span><span style="color: #000000;"><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_201_1127_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_201_1127_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_201_1127_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_201_1127_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_201_1127_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_201_1127_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_201_1127_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_201_1127_Open_Text').style.display='inline';"/>    </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (container </span><span style="color: #000000;">!=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">null</span><span style="color: #000000;">) </span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_201_1127_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_201_1127_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">07</span><span style="color: #000000;"><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_210_915_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_210_915_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_210_915_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_210_915_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_210_915_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_210_915_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_210_915_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_210_915_Open_Text').style.display='inline';"/>      </span><span style="color: #0000FF;">try</span><span style="color: #000000;"> </span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_210_915_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_210_915_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        ObjectSet result </span><span style="color: #000000;">=</span><span style="color: #000000;"> container.queryByExample(</span><span style="color: #0000FF;">new</span><span style="color: #000000;"> SensorPanel(</span><span style="color: #000000;">1</span><span style="color: #000000;">));
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        listResult(result);
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        SensorPanel sensor </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">null</span><span style="color: #000000;">;
</span><span style="color: #008080;">11</span><span style="color: #000000;"><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_363_910_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_363_910_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_363_910_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_363_910_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_363_910_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_363_910_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_363_910_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_363_910_Open_Text').style.display='inline';"/>        </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (result.size() </span><span style="color: #000000;">&gt;</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">) </span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_363_910_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_363_910_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">12</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>          System.out.println(</span><span style="color: #000000;">&quot;</span><span style="color: #000000;">Before modification: </span><span style="color: #000000;">&quot;</span><span style="color: #000000;">);
</span><span style="color: #008080;">13</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>          sensor </span><span style="color: #000000;">=</span><span style="color: #000000;"> (SensorPanel) result.get(</span><span style="color: #000000;">0</span><span style="color: #000000;">);
</span><span style="color: #008080;">14</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>          </span><span style="color: #008000;">//</span><span style="color: #008000;"> the object is a linked list, so each call to next()
</span><span style="color: #008080;">15</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>          </span><span style="color: #008000;">//</span><span style="color: #008000;"> will need to activate a new object</span><span style="color: #008000;">
</span><span style="color: #008080;">16</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">          SensorPanel next </span><span style="color: #000000;">=</span><span style="color: #000000;"> sensor.getNext();
</span><span style="color: #008080;">17</span><span style="color: #000000;"><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_629_797_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_629_797_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_629_797_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_629_797_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_629_797_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_629_797_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_629_797_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_629_797_Open_Text').style.display='inline';"/>          </span><span style="color: #0000FF;">while</span><span style="color: #000000;"> (next </span><span style="color: #000000;">!=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">null</span><span style="color: #000000;">) </span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_629_797_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_629_797_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">18</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            System.out.println(next);
</span><span style="color: #008080;">19</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #008000;">//</span><span style="color: #008000;"> modify the next sensor</span><span style="color: #008000;">
</span><span style="color: #008080;">20</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">            next.setSensor(</span><span style="color: #0000FF;">new</span><span style="color: #000000;"> Integer(</span><span style="color: #000000;">10</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> (Integer)next.getSensor()));
</span><span style="color: #008080;">21</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            next </span><span style="color: #000000;">=</span><span style="color: #000000;"> next.getNext();
</span><span style="color: #008080;">22</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>          }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">23</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>          </span><span style="color: #008000;">//</span><span style="color: #008000;"> Explicit commit stores and commits the changes at any time</span><span style="color: #008000;">
</span><span style="color: #008080;">24</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">                    container.commit();
</span><span style="color: #008080;">25</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">26</span><span style="color: #000000;"><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_924_1123_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_924_1123_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_924_1123_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_924_1123_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_924_1123_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_924_1123_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_924_1123_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_924_1123_Open_Text').style.display='inline';"/>      }</span></span><span style="color: #000000;"> </span><span style="color: #0000FF;">finally</span><span style="color: #000000;"> </span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_924_1123_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_924_1123_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">27</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #008000;">//</span><span style="color: #008000;"> If there are unsaved changes to activatable objects, they 
</span><span style="color: #008080;">28</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #008000;">//</span><span style="color: #008000;"> will be implicitly saved and committed when the database 
</span><span style="color: #008080;">29</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #008000;">//</span><span style="color: #008000;"> is closed</span><span style="color: #008000;">
</span><span style="color: #008080;">30</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">        closeDatabase();
</span><span style="color: #008080;">31</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>      }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">32</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>    }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">33</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #008000;">//</span><span style="color: #008000;"> reopen the database and check the modifications</span><span style="color: #008000;">
</span><span style="color: #008080;">34</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">    container </span><span style="color: #000000;">=</span><span style="color: #000000;"> database(configuration);
</span><span style="color: #008080;">35</span><span style="color: #000000;"><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1245_1689_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1245_1689_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1245_1689_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1245_1689_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1245_1689_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1245_1689_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1245_1689_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1245_1689_Open_Text').style.display='inline';"/>    </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (container </span><span style="color: #000000;">!=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">null</span><span style="color: #000000;">) </span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1245_1689_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1245_1689_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">36</span><span style="color: #000000;"><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1254_1649_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1254_1649_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1254_1649_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1254_1649_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1254_1649_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1254_1649_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1254_1649_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1254_1649_Open_Text').style.display='inline';"/>      </span><span style="color: #0000FF;">try</span><span style="color: #000000;"> </span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1254_1649_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1254_1649_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">37</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        ObjectSet result </span><span style="color: #000000;">=</span><span style="color: #000000;"> container.queryByExample(</span><span style="color: #0000FF;">new</span><span style="color: #000000;"> SensorPanel(</span><span style="color: #000000;">1</span><span style="color: #000000;">));
</span><span style="color: #008080;">38</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        listResult(result);
</span><span style="color: #008080;">39</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        SensorPanel sensor </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">null</span><span style="color: #000000;">;
</span><span style="color: #008080;">40</span><span style="color: #000000;"><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1407_1644_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1407_1644_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1407_1644_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1407_1644_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1407_1644_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1407_1644_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1407_1644_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1407_1644_Open_Text').style.display='inline';"/>        </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (result.size() </span><span style="color: #000000;">&gt;</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">) </span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1407_1644_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1407_1644_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">41</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>          System.out.println(</span><span style="color: #000000;">&quot;</span><span style="color: #000000;">After modification: </span><span style="color: #000000;">&quot;</span><span style="color: #000000;">);
</span><span style="color: #008080;">42</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>          sensor </span><span style="color: #000000;">=</span><span style="color: #000000;"> (SensorPanel) result.get(</span><span style="color: #000000;">0</span><span style="color: #000000;">);
</span><span style="color: #008080;">43</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>          SensorPanel next </span><span style="color: #000000;">=</span><span style="color: #000000;"> sensor.getNext();
</span><span style="color: #008080;">44</span><span style="color: #000000;"><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1569_1638_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1569_1638_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1569_1638_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1569_1638_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1569_1638_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1569_1638_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1569_1638_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1569_1638_Open_Text').style.display='inline';"/>          </span><span style="color: #0000FF;">while</span><span style="color: #000000;"> (next </span><span style="color: #000000;">!=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">null</span><span style="color: #000000;">) </span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1569_1638_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1569_1638_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">45</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            System.out.println(next);
</span><span style="color: #008080;">46</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            next </span><span style="color: #000000;">=</span><span style="color: #000000;"> next.getNext();
</span><span style="color: #008080;">47</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>          }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">48</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">49</span><span style="color: #000000;"><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1658_1685_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1658_1685_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1658_1685_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1658_1685_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1658_1685_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1658_1685_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1658_1685_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1658_1685_Open_Text').style.display='inline';"/>      }</span></span><span style="color: #000000;"> </span><span style="color: #0000FF;">finally</span><span style="color: #000000;"> </span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1658_1685_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_JavaTPExamplesJava.ZipsTPExample.Java_TPExample.Java_TestTransparentPersistence_1102_70_1658_1685_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">50</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        closeDatabase();
</span><span style="color: #008080;">51</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>      }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">52</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>    }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">53</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>  }</span></span></div></pre></div></div> </p><p>Of course, if you will run the code above as is, you will see that all the changes were lost. In order to fix it we will need to build the application with a special build script:</p><div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">Build.Xml</span></div><div class="fscCode"><pre ID="ResourcesReferenceObject_LifecycleTransparent_PersistenceTP_Enhanced_ExampleTP_Enhancement_On_Javabuild.Xml_1363_23"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #008080;">01</span><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/><span style="color: #0000FF;">&lt;?</span><span style="color: #FF00FF;">xml version=&quot;1.0&quot;</span><span style="color: #0000FF;">?&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>
</span><span style="color: #008080;">03</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/></span><span style="color: #008000;">&lt;!--</span><span style="color: #008000;"> 
</span><span style="color: #008080;">04</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>  TP build time enhancement sample.
</span><span style="color: #008080;">05</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/></span><span style="color: #008000;">--&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">06</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>
</span><span style="color: #008080;">07</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/></span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">project </span><span style="color: #FF0000;">name</span><span style="color: #0000FF;">=&quot;tpexamples&quot;</span><span style="color: #FF0000;"> default</span><span style="color: #0000FF;">=&quot;buildall&quot;</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>  </span><span style="color: #008000;">&lt;!--</span><span style="color: #008000;"> 
</span><span style="color: #008080;">10</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>  Set up the required class path for the enhancement task.
</span><span style="color: #008080;">11</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/></span><span style="color: #008000;">--&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">12</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>  </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">path </span><span style="color: #FF0000;">id</span><span style="color: #0000FF;">=&quot;db4o.enhance.path&quot;</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">13</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>    </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">pathelement </span><span style="color: #FF0000;">path</span><span style="color: #0000FF;">=&quot;${basedir}&quot;</span><span style="color: #FF0000;"> </span><span style="color: #0000FF;">/&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">14</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>    </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">fileset </span><span style="color: #FF0000;">dir</span><span style="color: #0000FF;">=&quot;lib&quot;</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">15</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>      </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">include </span><span style="color: #FF0000;">name</span><span style="color: #0000FF;">=&quot;**/*.jar&quot;</span><span style="color: #FF0000;"> </span><span style="color: #0000FF;">/&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">16</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>    </span><span style="color: #0000FF;">&lt;/</span><span style="color: #800000;">fileset</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">17</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>  </span><span style="color: #0000FF;">&lt;/</span><span style="color: #800000;">path</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">18</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>
</span><span style="color: #008080;">19</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>  </span><span style="color: #008000;">&lt;!--</span><span style="color: #008000;"> Define enhancement task. </span><span style="color: #008000;">--&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">20</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>  </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">taskdef </span><span style="color: #FF0000;">name</span><span style="color: #0000FF;">=&quot;db4o-enhance&quot;</span><span style="color: #FF0000;"> classname</span><span style="color: #0000FF;">=&quot;com.db4o.instrumentation.ant.Db4oFileEnhancerAntTask&quot;</span><span style="color: #FF0000;"> classpathref</span><span style="color: #0000FF;">=&quot;db4o.enhance.path&quot;</span><span style="color: #FF0000;"> loaderref</span><span style="color: #0000FF;">=&quot;db4o.enhance.loader&quot;</span><span style="color: #FF0000;"> </span><span style="color: #0000FF;">/&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">21</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>
</span><span style="color: #008080;">22</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>  </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">typedef </span><span style="color: #FF0000;">name</span><span style="color: #0000FF;">=&quot;transparent-persistence&quot;</span><span style="color: #FF0000;"> classname</span><span style="color: #0000FF;">=&quot;com.db4o.ta.instrumentation.ant.TAAntClassEditFactory&quot;</span><span style="color: #FF0000;"> classpathref</span><span style="color: #0000FF;">=&quot;db4o.enhance.path&quot;</span><span style="color: #FF0000;"> loaderref</span><span style="color: #0000FF;">=&quot;db4o.enhance.loader&quot;</span><span style="color: #FF0000;"> </span><span style="color: #0000FF;">/&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">23</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>
</span><span style="color: #008080;">24</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>
</span><span style="color: #008080;">25</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>
</span><span style="color: #008080;">26</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>  </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">target </span><span style="color: #FF0000;">name</span><span style="color: #0000FF;">=&quot;buildall&quot;</span><span style="color: #FF0000;"> depends</span><span style="color: #0000FF;">=&quot;compile&quot;</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">27</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>
</span><span style="color: #008080;">28</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>    </span><span style="color: #008000;">&lt;!--</span><span style="color: #008000;"> Create enhanced output directory</span><span style="color: #008000;">--&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">29</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>    </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">mkdir </span><span style="color: #FF0000;">dir</span><span style="color: #0000FF;">=&quot;${basedir}/enhanced-bin&quot;</span><span style="color: #FF0000;"> </span><span style="color: #0000FF;">/&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">30</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>    </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">delete </span><span style="color: #FF0000;">dir</span><span style="color: #0000FF;">=&quot;${basedir}/enhanced-bin&quot;</span><span style="color: #FF0000;"> quiet</span><span style="color: #0000FF;">=&quot;true&quot;</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">31</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>      </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">include </span><span style="color: #FF0000;">name</span><span style="color: #0000FF;">=&quot;**/*&quot;</span><span style="color: #FF0000;"> </span><span style="color: #0000FF;">/&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">32</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>    </span><span style="color: #0000FF;">&lt;/</span><span style="color: #800000;">delete</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">33</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>
</span><span style="color: #008080;">34</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>    </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">db4o-enhance </span><span style="color: #FF0000;">classtargetdir</span><span style="color: #0000FF;">=&quot;${basedir}/enhanced-bin&quot;</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">35</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>
</span><span style="color: #008080;">36</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>      </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">classpath </span><span style="color: #FF0000;">refid</span><span style="color: #0000FF;">=&quot;db4o.enhance.path&quot;</span><span style="color: #FF0000;"> </span><span style="color: #0000FF;">/&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">37</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>      </span><span style="color: #008000;">&lt;!--</span><span style="color: #008000;"> Use compiled classes as an input </span><span style="color: #008000;">--&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">38</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>      </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">sources </span><span style="color: #FF0000;">dir</span><span style="color: #0000FF;">=&quot;${basedir}/bin&quot;</span><span style="color: #FF0000;"> </span><span style="color: #0000FF;">/&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">39</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>
</span><span style="color: #008080;">40</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>      </span><span style="color: #008000;">&lt;!--</span><span style="color: #008000;"> Call transparent persistence enhancement </span><span style="color: #008000;">--&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">41</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>      </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">transparent-persistence </span><span style="color: #0000FF;">/&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">42</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>
</span><span style="color: #008080;">43</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>    </span><span style="color: #0000FF;">&lt;/</span><span style="color: #800000;">db4o-enhance</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">44</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>
</span><span style="color: #008080;">45</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>  </span><span style="color: #0000FF;">&lt;/</span><span style="color: #800000;">target</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">46</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>
</span><span style="color: #008080;">47</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>  </span><span style="color: #008000;">&lt;!--</span><span style="color: #008000;"> Simple compilation. Note that db4o version 
</span><span style="color: #008080;">48</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>  should be adjusted to correspond to the version 
</span><span style="color: #008080;">49</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>  you are using
</span><span style="color: #008080;">50</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>  </span><span style="color: #008000;">--&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">51</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>  </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">target </span><span style="color: #FF0000;">name</span><span style="color: #0000FF;">=&quot;compile&quot;</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">52</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>    </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">javac </span><span style="color: #FF0000;">fork</span><span style="color: #0000FF;">=&quot;true&quot;</span><span style="color: #FF0000;"> destdir</span><span style="color: #0000FF;">=&quot;${basedir}/bin&quot;</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">53</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>      </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">classpath</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">54</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>        </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">pathelement </span><span style="color: #FF0000;">location</span><span style="color: #0000FF;">=&quot;${basedir}/lib/db4o-7.1.26.8872-java5.jar&quot;</span><span style="color: #FF0000;"> </span><span style="color: #0000FF;">/&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">55</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>      </span><span style="color: #0000FF;">&lt;/</span><span style="color: #800000;">classpath</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">56</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>      </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">src </span><span style="color: #FF0000;">path</span><span style="color: #0000FF;">=&quot;${basedir}/src&quot;</span><span style="color: #FF0000;"> </span><span style="color: #0000FF;">/&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">57</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>      </span><span style="color: #0000FF;">&lt;</span><span style="color: #800000;">include </span><span style="color: #FF0000;">name</span><span style="color: #0000FF;">=&quot;**/*.java&quot;</span><span style="color: #FF0000;"> </span><span style="color: #0000FF;">/&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">58</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>    </span><span style="color: #0000FF;">&lt;/</span><span style="color: #800000;">javac</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">59</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>  </span><span style="color: #0000FF;">&lt;/</span><span style="color: #800000;">target</span><span style="color: #0000FF;">&gt;</span><span style="color: #000000;">
</span><span style="color: #008080;">60</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>
</span><span style="color: #008080;">61</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/></span><span style="color: #0000FF;">&lt;/</span><span style="color: #800000;">project</span><span style="color: #0000FF;">&gt;</span></div></pre></div></div><p>The build script relies on several jars:</p><ul><li>ant.jar - <a href="http://ant.apache.org/">Ant</a> library<br> </li><li>bloat-1.0.jar - bloat bytecode instrumentation library<br></li><li>db4o-x.x-instrumentation.jar - db4o instrumentation library on top of bloat<br></li><li>db4o-x.x-java5.jar - db4o jar<br></li><li>db4o-x.x-taj.jar - db4o transparent activation support<br></li><li>db4o-x.x-tools.jar - db4o tools</li></ul><p>All these jars should be added to /lib folder in the project directory.</p><p>After running the build script above you will get /bin and /enhanced-bin folders produced in your project folder. /bin folder contains compiled application classes, whereas /enhanced-bin contains compiled and enhanced classes. For testing the result of the enhancement you can use the following batch file (to be run from /enhanced-bin folder):</p><p><code>set
CLASSPATH=.;{$PROJECT_ROOT}\lib\db4o-x.x-java5.jar</code></p>

<p><code>java
com.db4odoc.tpbuildtime.TPExample</code></p></div>
    </div>
    <div id="footer">
					This revision (3) was last Modified 2008-01-20T14:31:55 by Tetyana.
				</div>
  </body>
</html>