Let me start with a real-life use case:
DWR is getting confused when server-side authentication filters attempt to redirect AJAX requests to the login page due to an expired session. You'd like to add some filters so that
Requests whose HTTP status code equal 3xx execute a client-side redirect, like window.location = ...login.html
Req...
I'm trying to intercept a method call (afterInsert() of a domain class) in a Grails application. In doWithDynamicMethods closure of my plugin I have:
for (dc in application.domainClasses) {
// What I'm basically doing is renaming method A to B
// and creating a new method A with its own business logic
// and a call to B() at...
Hey, So I may be completely off the mark here but I'm still new to nhibernate so bare with me.
I've read this article
http://www.mattfreeman.co.uk/2009/01/nhibernate-21-trunk-entity-name-some-inheritance-and-dynamic-component/
And am looking for a way to dynamically change my mapping at runtime to bind to a different table using a on...
I am trying to access a custom attribute applied to a method within a castle interceptor, e.g.:
[MyCustomAttribute(SomeParam = "attributeValue")]
public virtual MyEntity Entity { get; set; }
using the following code:
internal class MyInterceptor : IInterceptor
{
public void Intercept(IInvocation invocation)
{
if (invo...
I have my business bean defined thus:
@Local
@Interceptors(BusinessInterceptor.class})
public class MyBean implements SomeBean { ... }
And then I want my BusinessInterceptor to be configured with Spring's SpringBeanAutowiringInterceptor:
@Interceptors(SpringBeanAutowiringInterceptor.class)
public class BusinessInterceptor {
@Auto...
I was asked to implement castle dynamic proxy in my asp.net web application and i was going through couple of articles which i got from Castle Project and Code Project about castle dynamic proxy in asp.net web application....
Both articles delt with creating interceptors but i can't get the idea why interceptors are used with classes.....
hi
When i try to update a property on a item that is in a list from an interceptor, the update is not persisted. Is this possible at all? or am i doing something wrong?
The child is mapped as a list of composite elements.
The context is, i am trying to enforce read consistency for aggregates using Read committed isolation level and ...
Hello,
In my previous project we used NHibernate and Spring.NET.
Transactions were handled by adding [Transaction] attribute to service methods.
In my current project I'm using NHibernate and NInject 2 and I was wondering if it's possible to solve transaction handling using "Ninject.Extensions.Interception" and similar [Transaction] ...
Hi everybody,
I'm implementing a Log system for PHP, and I'm a bit stuck.
All the configuration is defined in an XML file, that declares every method to be logged. XML is well parsed and converted into a multidimensionnal array (classname => array of methods). So far, so good.
Let's take a simple example:
#A.php
class A {
publ...
Hi all,
Is this possible somehow?
@Name("geolocationService")
public interface GeolocationService
{
@Query("SELECT g FROM Geolocation geolocation INNER JOIN geolocation.deployment deployment WHERE geolocation.ipStart <= INET_ATON(:ipAddress) AND deployment.active = TRUE")
Geolocation findByIpAddress(@NamedParameter("ipAddress")fi...
Lets consider some cases:
_windsor.Register(Component.For<IProductServices>().ImplementedBy<ProductServices>().Interceptors(typeof(SomeInterceptorType));
In this case, when I ask for a IProductServices windsor will proxy the interface to intercept the interface method calls.
If instead I do this :
_windsor.Register(Component.For<Pr...
I have many virtual methods in a class, but only one should be intercepted, Can I tell Castle Windsor to override only that method so I dont have to do validation in the Intercept method?
Edit:
I use the IKernelEvents.ComponentRegistered event to choose which types get the interceptor.
...
I have a .net test class. In the Initialize method, I create a windsor container and make some registrations. In the actual test method, I call a method on the controller class but the interceptor does not work and the method gets directly called. What are potential reasons for this?
Here is all the related code:
Test.cs:
private Some...
I use Fiddler for intercepting HTTP traffic when using IE or Firefox. Now that I'm using chrome for most of my day, I would like to be able to see the http traffic using something like Fiddler. What do chrome developers use ? I prefer something automatic like Fiddler but something that needs config, etc would also help.
P.S : I'm on win...
Hi,
I have an event listener (for Audit Logs) which needs to append audit log entries to the association of the object:
public Company : IAuditable {
// Other stuff removed for bravety
IAuditLog IAuditable.CreateEntry() {
var entry = new CompanyAudit();
this.auditLogs.Add(entry);
return entry;
}
...
Hey,
I'm looking at the nhibernate interceptor. It seems to be able to intercept save, update and delete queries but is there anyway I can intercept a select query.
The problem I have is that I automatically want to append some additional sql filters to the executing sql statement in certain cases.
Any thoughts
Thanks
Mat
...
I don't whether this is even possible which is obviously why I am asking this question :)
Is it in any way possible to leverage functionality the Cellular Emulator on a REAL PHYSICAL device?? :)
So when I test it on my device, I really do not have to send real SMS(s) to test my MessageInteceptor.
On a sidenote, why does MessageIntecept...
Referring to my possible answer to this question: http://stackoverflow.com/questions/2907535/how-would-you-audit-asp-net-membership-tables-while-recording-what-user-made-the/2911616#2911616
Is it possible to intercept a call, coming from code you do not own, to a ctor on a sealed internal class that you do not own with the intention of ...
Hi,
How would I go about globally intercepting the creation/resolution of all instances by my container? I know I can do this individually with OnCreated on a per-component basis, but I want to do this globally for all objects resolved by the container.
Thanks.
...
I am currently in the process of learning Struts 2 and I am currently building a simple application where unverified users are redirected to a login form.
I have a login form and action functional which takes the users credentials, verifies them and stores a User object in the session however I am now trying to prevent access to pages b...