﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Ayende Rahien commented on NH Prof documentation: Transaction and the second level cache</title><description>Doesn't matter.
  
Trying to find edge cases would make the code more complex, commit the transaction, and good things will happen
</description><link>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment12</link><guid>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment12</guid><pubDate>Mon, 19 Jan 2009 05:54:08 GMT</pubDate></item><item><title>Jafin commented on NH Prof documentation: Transaction and the second level cache</title><description>If the entity has been marked mutable=false, would it make sense to automatically cache that? since it can't be changed?  The Transaction doesn't make sense in that case.
  
  
</description><link>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment11</link><guid>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment11</guid><pubDate>Mon, 19 Jan 2009 05:46:53 GMT</pubDate></item><item><title>Ayende Rahien commented on NH Prof documentation: Transaction and the second level cache</title><description>Stuart,
  
Not really.
  
It can be anything. 
  
NH can't know about that, so it doesn't put things to the cache, so it will only put it in the cache after commit.
  
</description><link>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment10</link><guid>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment10</guid><pubDate>Mon, 12 Jan 2009 12:57:47 GMT</pubDate></item><item><title>Stuart C commented on NH Prof documentation: Transaction and the second level cache</title><description>When you say, //Do something with post...
  
I assume you mean changing the Post object you just received? If it was just a read I can't see why commiting the transaction makes any difference to the 2nd level cache?
</description><link>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment9</link><guid>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment9</guid><pubDate>Mon, 12 Jan 2009 12:47:54 GMT</pubDate></item><item><title>Fabio Maulo commented on NH Prof documentation: Transaction and the second level cache</title><description>Well... all this stuff are enough to implement a TransactionProtection wrapper in our session-handling implementation ;)
  
[code.google.com/.../...sactionProtectionWrapper.cs](http://code.google.com/p/unhaddins/source/browse/trunk/uNhAddIns/uNhAddIns/SessionEasier/BasicTransactionProtectionWrapper.cs)  
  
In uNhAddIns there is one implemented for Castle.DynamicProxy (obviously)
  
  
</description><link>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment8</link><guid>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment8</guid><pubDate>Sat, 10 Jan 2009 21:05:12 GMT</pubDate></item><item><title>Ayende Rahien commented on NH Prof documentation: Transaction and the second level cache</title><description>NHibernate is too low level to manage transactions internally
</description><link>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment7</link><guid>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment7</guid><pubDate>Sat, 10 Jan 2009 14:24:34 GMT</pubDate></item><item><title>alberto commented on NH Prof documentation: Transaction and the second level cache</title><description>Maybe implicit is not the correct term, regarding your previous post.
  
  
What I meant was that if you are always supposed to use those 2 usings together, wouldn't it be better to merge them in one, and enforce the use of transactions at the uow level? Is this still a bad idea?
  
</description><link>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment6</link><guid>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment6</guid><pubDate>Sat, 10 Jan 2009 14:23:07 GMT</pubDate></item><item><title>Ayende Rahien commented on NH Prof documentation: Transaction and the second level cache</title><description>Alberto,
  
Because implicit transactions are a very bad idea.
</description><link>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment5</link><guid>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment5</guid><pubDate>Sat, 10 Jan 2009 12:13:45 GMT</pubDate></item><item><title>alberto commented on NH Prof documentation: Transaction and the second level cache</title><description>Dammit, I had already read that. I think I have a memory leak.
  
  
If you are always supposed to use transactions, then why doesn't NH do it implicitly for us?
</description><link>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment4</link><guid>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment4</guid><pubDate>Sat, 10 Jan 2009 12:07:36 GMT</pubDate></item><item><title>Ayende Rahien commented on NH Prof documentation: Transaction and the second level cache</title><description>[nhprof.com/.../Alert](http://nhprof.com/Learn/Alert?name=DoNotUseImplicitTransactions)</description><link>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment3</link><guid>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment3</guid><pubDate>Sat, 10 Jan 2009 11:56:00 GMT</pubDate></item><item><title>Ayende Rahien commented on NH Prof documentation: Transaction and the second level cache</title><description>See my previous discussion on that.
</description><link>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment2</link><guid>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment2</guid><pubDate>Sat, 10 Jan 2009 11:55:15 GMT</pubDate></item><item><title>alberto commented on NH Prof documentation: Transaction and the second level cache</title><description>Interesting. Is this the solely reason to use transactions with selects or are there more reasons?
  
</description><link>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment1</link><guid>http://ayende.com/3799/nh-prof-documentation-transaction-and-the-second-level-cache#comment1</guid><pubDate>Sat, 10 Jan 2009 11:50:43 GMT</pubDate></item></channel></rss>