0 Replies Latest reply on Oct 18, 2005 8:28 AM by morenito9000

    ejbActivate exception and max-bean-life value

    morenito9000

      Hi all,
      I put inside ejbActivate() method (of a Stateful Session Bean)
      the following code:

      ejbActivate() {
      username = context.getCallerPrincipal().getName();
      log.info("Bean called by " + username);
      }

      When JBoss try to activate a previously passivated bean
      I get this exception:

      ERROR [org.jboss.ejb.plugins.LogInterceptor] RuntimeException:
      java.lang.IllegalStateException: No security context set
      at org.jboss.ejb.EnterpriseContext$EJBContextImpl.getCallerPrincipal(EnterpriseContext.java:276)
      at server.session.beans.ModifyBean.ejbActivate()

      Is it uncorrect to call the getCallerPrincipal() method inside ejbActivate ?

      -------------------------------------

      Another simple question:

      I'd like to increase values for max-bean-life, remover period,
      max-bean-age and overager period in standardjboss.xml (for
      Standard Stateful Session Bean Container).
      Do I need to restart JBoss after having changed these values ?

      Many thanks in advance for your help.

      Moreno