Hello Jordan,

I'm a bit late to the party, but seeing that I'm in the process of
doing some minor fixes to the project, I felt it would be good to have
a say about this as well.

It's been stated that read-only transactions do exist:
 * 
http://download.oracle.com/docs/cd/B28359_01/server.111/b28318/consist.htm#BABIJEJI

Which might be great for things such as Read-Only entities:
 * http://216.121.112.228/browse/NH-908
or stateless sessions that don't need dirty-tracking.

However, after thinking about the actual transaction facility and what
it does and doesn't do, I've decided not to have it as a typed
property on the new 'ITransactionOptions'/'TransactionAttribute',
because it's not relevant to all types of transactions. However, I
have added a property called 'CustomContext :
IEnumerable<KeyValuePair<string,object>>', which can be used for
attaching the knowledge that the infrastructure should try and make
the transaction read only. As far as I understand, your patch only
introduced this property but didn't add the infrastructure required
for NHibernate to make use of it? Is that correct?

In that case, perhaps you would be interested in adding those features
to the current develop branch of C.S.Transaction and also create a
wiki page on the new NHibernateFacility about how to use read-only
sessions and how to write your IConnectionFactory/session wrapper/db
dialect to enable read-only transactions, together with a read-only
setting on the attribute?

Cheers,
Henrik



On Mar 15, 12:25 pm, Jordan <[email protected]> wrote:
> Just briefly, a read only session in this scenario is not suitable
> because the session is already open. The example in my first post
> demonstrates this. AFAIK it is strongly against the advice of the
> hibernate developers to have 2 sessions (persistence contexts) open at
> the same time. This patch fixes a very real problem faced by
> developers using nhibernate.
>
> regards,
> Jordan.
>
> btw - Henry, I am not really trying to change your mind about this, I
> accept that you don't like it :)
> I'm just explaining my case for anyone else who might be reading and
> want to help apply the patch.

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Development List" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-devel?hl=en.

Reply via email to