<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>Comments on: JC101-5C: Data management and transactions</title>
	<atom:link href="http://javacard.vetilles.com/2008/01/07/jc101-5c-data-management-and-transactions/feed/" rel="self" type="application/rss+xml" />
	<link>http://javacard.vetilles.com/2008/01/07/jc101-5c-data-management-and-transactions/</link>
	<description>A weblog on Java Card, security, and other things personal</description>
	<lastBuildDate>Thu, 18 May 2017 07:26:32 +0000</lastBuildDate>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.0.32</generator>
	<item>
		<title>By: Eric VÃ©tillard</title>
		<link>http://javacard.vetilles.com/2008/01/07/jc101-5c-data-management-and-transactions/#comment-3134</link>
		<dc:creator><![CDATA[Eric VÃ©tillard]]></dc:creator>
		<pubDate>Thu, 24 Jan 2008 21:11:10 +0000</pubDate>
		<guid isPermaLink="false">http://javacard.vetilles.com/2008/01/07/jc101-5c-data-management-and-transactions/#comment-3134</guid>
		<description><![CDATA[Well, lots of questions here ...

About transactions, you are right to notice that there is a similarity between Java Card transactions and database transactions. However, persistence in Java Card is embedded in the VM, and it is much simpler than for databases.  Just look at a definition of &lt;a href=&quot;http://en.wikipedia.org/wiki/ACID&quot; rel=&quot;nofollow&quot;&gt;ACID&lt;/a&gt; on wikipedia, and you will notice that the guarantees are quite complex.

The constructor is private on purpose, because I have defined a factory, and I want all allocations to go through it (mostly because there is a recycling mechanism).

About the constructor, you are right about the fact that a tear at the wrong time could lead to an unreachable object (the object is created before the invocation of its constructor, in all cases). What I mean by saying that the transaction is not mandatory is that there is no risk of inconcistency.

Overall, I must admit that this example is too simple to correctly explain transactions. Better examples should come when we will cover the protection of the data&#039;s integrity, a few weeks or months from now.

About deletion, you are right. However, I will cover this in a separate post.

Finally, about the search method, yes, there is an issue about the initialization of the field, because the code presented in the JC101-4C post is incomplete. I will fix that.]]></description>
		<content:encoded><![CDATA[<p>Well, lots of questions here &#8230;</p>
<p>About transactions, you are right to notice that there is a similarity between Java Card transactions and database transactions. However, persistence in Java Card is embedded in the VM, and it is much simpler than for databases.  Just look at a definition of <a href="http://en.wikipedia.org/wiki/ACID" rel="nofollow" class="liwikipedia">ACID</a> on wikipedia, and you will notice that the guarantees are quite complex.</p>
<p>The constructor is private on purpose, because I have defined a factory, and I want all allocations to go through it (mostly because there is a recycling mechanism).</p>
<p>About the constructor, you are right about the fact that a tear at the wrong time could lead to an unreachable object (the object is created before the invocation of its constructor, in all cases). What I mean by saying that the transaction is not mandatory is that there is no risk of inconcistency.</p>
<p>Overall, I must admit that this example is too simple to correctly explain transactions. Better examples should come when we will cover the protection of the data&#8217;s integrity, a few weeks or months from now.</p>
<p>About deletion, you are right. However, I will cover this in a separate post.</p>
<p>Finally, about the search method, yes, there is an issue about the initialization of the field, because the code presented in the JC101-4C post is incomplete. I will fix that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lexdabear</title>
		<link>http://javacard.vetilles.com/2008/01/07/jc101-5c-data-management-and-transactions/#comment-3129</link>
		<dc:creator><![CDATA[lexdabear]]></dc:creator>
		<pubDate>Wed, 23 Jan 2008 10:18:50 +0000</pubDate>
		<guid isPermaLink="false">http://javacard.vetilles.com/2008/01/07/jc101-5c-data-management-and-transactions/#comment-3129</guid>
		<description><![CDATA[Nice post, Eric. There is not much tutorial material for the Java Card technology. The only other good source I can think of is from Sun, but they did not contribute since many years.

Some remarks:
- Why is JC&#039;s transaction mechanism not comparable with the database one? To me it&#039;s pretty the same concept, but maybe I misunderstood something ..
- Did you declare the constructor private on purpose? I thought it must be at least protected, otherwise it cannot called directly, and only usable from within the factory method getInstance().
- In the PasswordEntry constructor you mention that the transaction mechanism is not required. What if there is a tear between next = first ; and first = this ;? Is the instance created? If yes, this instance is connected to the list, but not retrievable because &#039;first&#039; is the only entry point.
- In your deletion mechanism you take only the recycle scenario into account. Thus in case of a lot of deletion the memory space is always occupied. What if the user wants to free up memory space? It could be accomplished with e.g. a parameter for the delete method: boolean deleteObject --&gt; in the delete method check if object deletion is supported, set pe == null and apply for the object deletion mechanism.
- The search method uses the variable pe.idLength, but you do not initialize this  field in the PasswordEntry constructor, not in the getInstance() method.]]></description>
		<content:encoded><![CDATA[<p>Nice post, Eric. There is not much tutorial material for the Java Card technology. The only other good source I can think of is from Sun, but they did not contribute since many years.</p>
<p>Some remarks:<br />
&#8211; Why is JC&#8217;s transaction mechanism not comparable with the database one? To me it&#8217;s pretty the same concept, but maybe I misunderstood something ..<br />
&#8211; Did you declare the constructor private on purpose? I thought it must be at least protected, otherwise it cannot called directly, and only usable from within the factory method getInstance().<br />
&#8211; In the PasswordEntry constructor you mention that the transaction mechanism is not required. What if there is a tear between next = first ; and first = this ;? Is the instance created? If yes, this instance is connected to the list, but not retrievable because &#8216;first&#8217; is the only entry point.<br />
&#8211; In your deletion mechanism you take only the recycle scenario into account. Thus in case of a lot of deletion the memory space is always occupied. What if the user wants to free up memory space? It could be accomplished with e.g. a parameter for the delete method: boolean deleteObject &#8211;&gt; in the delete method check if object deletion is supported, set pe == null and apply for the object deletion mechanism.<br />
&#8211; The search method uses the variable pe.idLength, but you do not initialize this  field in the PasswordEntry constructor, not in the getInstance() method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Igor Medeiros</title>
		<link>http://javacard.vetilles.com/2008/01/07/jc101-5c-data-management-and-transactions/#comment-3127</link>
		<dc:creator><![CDATA[Igor Medeiros]]></dc:creator>
		<pubDate>Tue, 08 Jan 2008 11:44:35 +0000</pubDate>
		<guid isPermaLink="false">http://javacard.vetilles.com/2008/01/07/jc101-5c-data-management-and-transactions/#comment-3127</guid>
		<description><![CDATA[Very nice post Eric, thanks for your contribution for the Java Card Community

rgds
Igor]]></description>
		<content:encoded><![CDATA[<p>Very nice post Eric, thanks for your contribution for the Java Card Community</p>
<p>rgds<br />
Igor</p>
]]></content:encoded>
	</item>
</channel>
</rss>
