java - Using EJB default interceptor to match on parameters -
i'd create ejb default interceptor acts on business method contains set of parameters, doesn't need match exactly. there's classic method of matching parameter set, i.e:
<assembly-descriptor>. <!-- method interceptor apply sendbookingcancellationmessage emailsystembean --> <interceptor-binding> <ejb-name>mybean</ejb-name> <interceptor-class>someinterceptor</interceptor-class> <method> <method-name>overloadedmethod</method-name> <method-params> <method-param>int</method-param> <method-param>java.lang.string[][]</method-param> </method-params> </method> </interceptor-binding> </assembly-descriptor>
but i'd instead match on method takes int , string[][] , whatever else, instead of exact two. know if can done?
on glassfish v3, using wildcard value '*' method name seems work @ individual bean level:
<interceptor-binding> <ejb-name>mybean</ejb-name> <interceptor-class>someinterceptor</interceptor-class> <method> <method-name>*</method-name> <method-params> <method-param>int</method-param> <method-param>java.lang.string[][]</method-param> </method-params> </method> </interceptor-binding>
however, behavior isn't called out in interceptors specification far can see, shouldn't relied upon.
Comments
Post a Comment