Hi,
I have a need to filter the data returned by a ejb methods after the bean has executed them, and before it is piped back to the client caller for remote methods only. I cannot write the interceptor inside the bean methods themselves, since it cannot be enforced that way for obvious reasons (developer might not call it, choose to ignore it)
Basically I want a post processing interceptor for the methods for the return data. Can anyone provide any pointers on how I may tackle this problem?
Thanks,
-Mohsin
An interceptor looks like this, obviously simplified.
Look in org.jboss.ejb.plugins for examples.
public Object invoke(Invocation mi)
{
// Before processing
Object result = invokeNext(mi);
// After processing
return result;
}