Hm I don't think calling flushAuthenticationCache(null) helps here.
I am not planning to call flushAuthenticationCache(null). Just pointed out that the above said code block wont get executed as Principal object is null. The question is why the Principal object is coming as Null. Even if the thread is not associated with a Http request, Principal object should have value which is accociated with the session
I am anxiously awaiting for your reply....
Any help related to this in any means would be
really helpful for me...