i have bean scheduled method. method calls ejb's refresh() method has @aroundinvoke interceptor on it. interceptor in it's turn calls sessioncontext.getcallerprincipal().getname() find out calling user , writes info database. when same refresh() method called through web-interface logged in user cool. when scheduler calls method see 'anonymous' instead of real user name in database. how run scheduled method particular user programmatically?
sounds job @runas annotation! this question has example of use schedulers.
Comments
Post a Comment