Thanks Fabio. I'm using Rhino, but sure it's not to difficult to
switch to FlushMode.Never.

I've got 2nd level cache set up already, hoping to try it with
Velocity soon.

T

On Dec 9, 1:04 pm, "Fabio Maulo" <[EMAIL PROTECTED]> wrote:
> All mapping as read-only give you some benefit but, a this point, you have a
> big-one if you never call flush/commit using FlushMode.Never (you can avoid
> dirty checking at all).
> Considerer to add cache-stuff to your mappings at run-time, in the AppB, if
> you don't want to have two mappings.
>
> 2008/12/9 Tobes <[EMAIL PROTECTED]>
>
>
>
>
>
> > Hi Folks
>
> > We have an NHibernate application that reads and writes data (App A).
> > We have a front end web site to that application that only needs to
> > read the data (App B). Both share a common DLL containing the domain
> > layer & services.
>
> > I can obviously use DB permissions to ensure that App B cannot write
> > to the database. Are there any gains to telling NHibernate that it is
> > working as "read only mode" too, and if so what's the best way of
> > doing this?
>
> > This seems to work:
>
> >     var config = new Configuration().Configure();
>
> >     //manually make all classes readonly
> >     foreach (var mapping in config.ClassMappings)
> >     {
> >                mapping.IsMutable = false;
> >     }
>
> >     var factory = config.BuildSessionFactory();
>
> > But I doubt it gives any benefits. I should probably go dig around the
> > code base, but thought I'd check to see if anyone has any comment on
> > this read-only scenario.
>
> > Cheers
>
> --
> Fabio Maulo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" 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/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to