[jboss-jira] [JBoss JIRA] Created: (EJBTHREE-1667) Same stateless EJB's context used from one call to another

John Gonon (JIRA) jira-events at lists.jboss.org
Wed Jan 7 09:57:06 EST 2009


Same stateless EJB's context used from one call to another
----------------------------------------------------------

                 Key: EJBTHREE-1667
                 URL: https://jira.jboss.org/jira/browse/EJBTHREE-1667
             Project: EJB 3.0
          Issue Type: Bug
          Components: EJB3 Extensions
    Affects Versions: HEAD
         Environment: Windows + Oracle 10
JBOSS 5.0.0.GA
            Reporter: John Gonon
             Fix For: HEAD


1) I have Stateless EJBs with the EJBContext defined as a @Resource and a method getting the caller's name:
public class MyBean {
    @Resource
    private SessionContext ejbSession = null;

    private String getCallerName() {
        return this.ejbSession.getCallerPrincipal().getName();
    }
}

2) My client always always calls in authenticated mode

3) I execute my client once and everything goes fine

4) I execute it other times, but there, one in a while, I don't get my authenticated user but the one from a preious call.

I tracked that it was sometimes the same "EJBContextImpl" object from one call to the other. The first call to "getCallerPrincipal()" is cached, so when I use the same object the second time, it does not look for it but returns the value from a previous call.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list