3 Replies Latest reply on Jul 14, 2004 3:09 PM by auckyboy

    Security exception when removing stateful EJB

    elaineqs

      Hi all,

      My web application has a protected stateful EJB that is accessed by a servlet. I use JAAS authentication to the servlet and EJB. At the first access after authentication, the servlet creates an instance of the stateful EJB and stores the EJB's handle in a private variable. This handle is used to execute methods on the stateful EJB in the next access to the servlet. It is working well.
      When the servlet is removed, i would like to remove also the bean instance, but when i try to call remove on the EJBObject returned by the handle, i get an exception:

      10:52:58,766 ERROR [LogInterceptor] EJBException, causedBy:
      java.lang.SecurityException: Authentication exception, principal=null

      What is happening?

      Thanks for any help!