I am trying to call an
EJB session bean method from within a java.util.Timer object. I want this method to be executed repeatedly over specific intervals. I have implemented JAAS security.
The Timer is called from a
servlet's init() method. This results in the following error:
Authorization failed for /UNAUTHENTICATED while invoking (Home)ejb/com/dcx/sp/bl/bcf/ejb/AdministrativeQueryProviderHome create:2 securityName: /UNAUTHENTICATED;accessID: null is not granted any of the required roles: All
Non-application exception occurred while processing method "create". Exception data: com.ibm.websphere.csi.CSIException: SECJ0053E: Authorization failed for /UNAUTHENTICATED while invoking (Home)ejb/com/dcx/sp/bl/bcf/ejb/AdministrativeQueryProviderHome create:2 securityName: /UNAUTHENTICATED;accessID: null is not granted any of the required roles: All
Now, the same code (without the Timer part), if executed from the servlet's init() method, works correctly. When executed with Timer functionality, the call to the session bean's create() method is failing with the above error.
What could be the reason that the code fails when invoked through a Timer object? BTW, i am using J2EE 1.3.