interceptor

Seam - Interceptors

Hi all, I want to intercept all method invocations to all seam components to see if that would help in logging exceptions. I was thinking that I could do this by getting the list of all components and registered interceptors and simply adding the one I want to that list. Walter ...

Hibernate interceptor: entity intercepted when a collection element updated

Hi all. I need to know how can I set Hibernate (...) to achieve the following issue: I have a bidirectional (composition) one-to-many association (a.bs is a Set object and b.a is a A object). When I load "a" from DB and I update one of its "bs" I need Hiernate intercept A entity when saveOrUpdate A. Code: public class A { Set<B> b...

Update father on interceptor

My model: public class Father { Set<Son> sons = new HashSet<Son>(); String name = null; Date lastSonModifyDate = null; // ... other fields and setters/getters } public class Son { Father father = null; String name = null; Date lastModifyDate = null; // ... other fields and setters/getters } Use case: There is in ...

Lazy load a collection of data from a service, not the database

My domain objects support custom fields that are stored in such a way that requires metadata and logic to be applied before their values can be stored and retrieved. I already have a Custom Field Repository that handles the persistence of custom fields, and I don't want to try to recreate that logic in NHibernate mappings. I would ho...

Castle Windsor Interceptor for private/protected method

Hi all, Is it true that in order for castle windsor's interceptor to intercept a method, that method needs to be declare public? ...

SEAM: Component "disinjected" "too soon" in interceptor?

Hello, Let's say I have the following interceptor in a SEAM app: public class MyInterceptor { @In private Monitor myMonitor; @AroundInvoke public Object aroundInvoke(InvocationContext ctx) throws Exception { try { myMonitor.a(); return ctx.proceed(); } finally { myMonitor.b(); } } } myMoni...

Using the Struts 2 Message Store Interceptor with Annotations

I am currently converting a Struts 2 application to use the Convention plugin and Annotations instead of the XML configuration. The original XML looks like: <action name="store" method="store" class="com.company.webapp.dop.AuthorAction"> <result name="success" type="redirectAction">list</result> <result name...

Implementing Struts 2 Interceptors using Struts 1

Hello all, I have a legacy application written with Struts 1. The only feature I was asked to add is to protect some actions. Currently any user can do whatever he/she wants. The idea is to allows all user see the data, but block modification operation, i.e. to modify data a user should log in. I know Struts2 has interceptors, so I cou...

NHibernate Interceptor - What is it

I am new in NHibernate, you can say I am almost at dummy level :( . What I want to know is that what is NHibernate Interceptor, and for what purpose does it serve in an application? Also, in this article, I learned that using NHibernate makes a desktop application slower at startup, so to avoid this, I need to save the configuration in ...

WCF Interceptor On Compact Framework

I would like to add an interceptor layer to my WCF service to send the Device ID to authenticate the device. I am very very new to WCF Interceptors. Before I take all the time to figure them out, I would like to know if they even work with the Compact Framework. So, do WCF Interceptors work with the Compact Framework and if so are the...

WCF - How to create a custom header sent from a Compact Framework Client

I want to add a custom header for WCF service communications (add it in for the client and read it out for the service). There are many examples of this on the internet, but they use classes and interfaces in System.ServiceModel that do not exist in the Compact Framework (IEndpointBehavior, IClientMessageInspector, etc). This link has ...

spring 3 mvc intercept all requests

Hi im wondering would it be possible to create global interceptor and set locale there. I have urlrewrite rules to rewrite /fr/* to /*?siteLang=fr I see examples how to set locale based on parameter but they all are the same and require me to use url mappings. Is it possible to do it globally so that locale interceptor gets called on e...

NHibernate Interceptor Not Used When Saving

I have a NHibernate Interceptor that is set in the HibernateTemplate using Spring.Net (I'm using ASP.NET MVC, fwiw), which is used for Auditing. However, for some reason, while the OnLoad method is being triggered when I call genericDAO.Get(id), when I try to save something using genericDAO.SaveOrUpdate(object) neither the OnSave or OnFl...

Intercept only interface methods with DynamicProxy

I got an interface like this public interface IService { void InterceptedMethod(); } A class that implements that interface and also has another method public class Service : IService { public virtual void InterceptedMethod() { Console.WriteLine("InterceptedMethod"); } public virtual void SomeMethod() ...

Token Session Using tokens to prevent duplicate form submits ?

I use Token Session to prevent duplicate form submits, but the first time I make a request to server, I always get error page <action name="show" class="ClientAction"> <interceptor-ref name="tokenSession" /> <interceptor-ref name="basicStack" /> <result name="invalid.token">/WEB-INF/error.jsp</result> result type="tiles"...

StructureMap 202 - Why?

OK, I'm trying to set a property on a type I'm registering with SM. Here's the code from the registry in one of my components. This registry is being added during the configuration from a console app. When I try to access the EndorsementSpecs property of the instance AutoMandatoryEndorsementAggregator object, I get the 202. What's int...

At what point should I change the way Struts acquires the session token?

It seems I have to find a different way to transmit the session token from a Flex client to a Struts backend without using cookies. If I were to put the session token in the payload of a request, at what point would I have to customize Struts' behaviour so that I can reuse as much of the existing session handling as possible? In particu...

Struts what method is being called?

How can I get the name of the method that will be called in the action from within an interceptor? ...

Access bean name in custom method interceptor

I want to write bean name and method executed in database so decide to create an custom interceptor. However, I am not able to access the bean name. I found ExposeBeanNameAdvisors may be one of the solution, but not able to find a point to set the name. Anyone have the ideas about this? Many thanks!! ...

nhibernate interceptors with domain context

Hi Is it possible (in a clean fashion) to create an audit interceptor in hibernate 2.1 and pass in a domain context to it? What I would like to achieve is to set a Date Time (can be done easy peasy - found loadsa articles after a quick google), but setting an object e.g. a user who created the item, or altered an entity I have yet to f...