Reputation: 12585
How to pass data from stateless session bean to the method level interceptor for the current request. For each client request we need to have its own local data and should not conflict.
Upvotes: 0
Views: 763
Reputation: 11622
If you want to pass data to & from interceptors, you can try looking at methods of InvocationContext
interface.
# java.lang.Object[] getParameters : Returns the parameter values that will be passed to the method of the target class.
# setParameters(java.lang.Object[] params) : Sets the parameter values that will be passed to the method of the target class.
Therefore, if you want to pass some data to interceptor, you can pass it as parameter & fetch them later in interceptor. Again, after processing, you can set appropriate data as parameter, which will be received by the final method.
Upvotes: 2