We utilized a Hibernate interceptor in our solution, though that is only a part of the solution (the interceptor didn't give us everything we needed).
- Andy On Wednesday 09 February 2005 09:40 pm, Ben Alex wrote: > Gavin Terrill wrote: > >We recently adopted Acegi Security for one of our enterprise products > >security requirement, and we will be facing the same issues, so this > >thread is very useful and timely. > > > >Thought out of the blue: instead of mutating the domain objects, would > >it be possible to wrap them up in a dynamic 'secure' proxy? The proxy > >would essentially act in the role of a 'caretaker' > >(http://c2.com/cgi/wiki?CaretakerPattern), preventing access to the > >secured properties. I guess the downside would be that a dynamic proxy > >would require your domain objects implementing an interface, which may > >be cumbersome. Ok, what about utilizing CGLIB to extend the class then > >(MethodInterceptor)? > > I have previously played with GCLIBing domain object instances, but that > caused some complications with Hibernate. In the end that's what > motivated me to write the AspectJ integration, but I was disappointed by > the poor incremental compilation reliability in the Eclipse IDE. That's > going back probably six months, so it might have improved and using > AspectJ is a realistic/viable option for a "caretaker"-style solution to > method invocation. > > Alternatively, I am just wondering if a Hibernate Interceptor > (http://www.hibernate.org/hib_docs/api/net/sf/hibernate/Interceptor.html) > might be able to help in this case? It seems to offer the necessary > hooks to introspect the object. > > Ben > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Home: http://acegisecurity.sourceforge.net > Acegisecurity-developer mailing list > Acegisecurity-developer@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Home: http://acegisecurity.sourceforge.net Acegisecurity-developer mailing list Acegisecurity-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer