0 Replies Latest reply on Mar 22, 2003 1:12 PM by kanagawa

    session bean run-as role not honored in ejbPassivate?

    kanagawa


      I have a session bean that's throwing an authentication excpetion whenever ejbPassivate() is called. My session bean's initialize() method (called from ejbCreate() and ejbActive()) gets an entity bean (calls create()) that it uses for various ejbSelect queries. When it passivates, it wants to remove() that bean. However, the entity bean requires the session bean be running as the appropriate role. It doesn't seem like that's happening. Is this behavior correct? Any advice on a work-around? I'm running 3.2RC3 under JVM 1.4.0_03 on XP, if that helps.

      java.lang.SecurityException: Authentication exception, principal=null
      at org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(SecurityInterceptor.java:175)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:119)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:154)
      at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:483)
      at org.jboss.ejb.Container.invoke(Container.java:652)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:353)
      at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38)
      at $Proxy85.remove(Unknown Source)
      at CapOneRM.session.TemplateBrowser.deinitialize(TemplateBrowser.java:1301)
      at CapOneRM.session.TemplateBrowser.ejbPassivate(TemplateBrowser.java:1226)
      at CapOneRM.session.TemplateBrowserSession.ejbPassivate(TemplateBrowserSession.java:20)
      at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceMa
      nager.java:351)