If you don't need lazy-property feature then do the same you are seeing in
Linfu proxy factory.

On Fri, May 6, 2011 at 11:16 AM, michal <[email protected]> wrote:

> Yes I know it can look little odd. This it result of some bad
> decisions made some years ago by our team (me too!) . We put huge
> number of ASP.NET sites with large number of mappings on single server
> so dynamic proxy generation just kills our servers when session
> factory is lost somehow (expired cache , iis pool recycling etc). The
> cost of re-design is too high for now, so we are stuck with it.
>
> The solution was NH Proxy Generators, which unfortunately is no longer
> supported/developed and does not work with current versions of NH. So
> we decided to create custom proxy factory, with static proxies, mostly
> based on NHPG project.
>
> I don't know what exactly return at GetFieldInterceptorProxy so that's
> why I copied LinFu solution (NotSupportedException). As I understand I
> should set IsInstrumented to false then ? What can be consequences of
> that ( performance hit ? lack of some new features ? )
>
>
> On 6 Maj, 15:40, Fabio Maulo <[email protected]> wrote:
> > you can put true and return a proxy in GetFieldInterceptorProxy.
> > More than that, we have to know which is the target of your custom
> > proxyfactoryfactory (95% of users does not need a custom proxy factory).
> >
> >
> > On Fri, May 6, 2011 at 9:38 AM, michal <[email protected]> wrote:
> > > Thank you for the answer, but I still don't know what to do.
> >
> > > IsInstrumented should be true or false in my case ? Proxies are
> > > generated by Castle, but GetFieldInterceptionProxy from IProxyFactory
> > > not implemented (like LinFu).
> >
> > > On 6 Maj, 14:30, Fabio Maulo <[email protected]> wrote:
> > > > It is to manage lazy-properties
> >
> > > > On Fri, May 6, 2011 at 9:16 AM, michal <[email protected]>
> wrote:
> > > > > Hi
> >
> > > > > I am using custom ProxyFactory in my project (it is based on the
> one
> > > > > from the old Proxy Generators project). I almost finished to make
> it
> > > > > compatible with NH 3.1 (used 2.1.2 before) , only one thing is
> left.
> >
> > > > > There is new method "IsInstrumented" in the IProxyFactoryFactory
> > > > > interface. I saw it is implemented as follow - in the new default
> > > > > NHibernate.ByteCode.Castle.ProxyFactoryFactory:
> > > > > public bool IsInstrumented(Type entityClass)
> > > > >        {
> > > > >            return true;
> > > > >        }
> >
> > > > > for the default LinFu it is :
> > > > > public bool IsInstrumented(Type entityClass)
> > > > >        {
> > > > >            return false;
> > > > >        }
> >
> > > > > I have no idea what is this method used for, so I don't know which
> > > > > version I should use. My first guess was "Castle" (always return
> > > > > true), because I am using Castle library to generate proxies. But
> > > > > another new method, from IProxyFacory -
>  GetFieldInterceptionProxy() ,
> > > > > I took from the LinFu implementation (just throwing
> > > > > NotImplementedException). So that can suggest I should set
> > > > > IsInstrumented to always return false.
> >
> > > > > Can you help me ?
> >
> > > > > --
> > > > > 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.
> >
> > > > --
> > > > 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.
> >
> > --
> > 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.
>
>


-- 
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