Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-6677 Cleanup inactive timer service instances for Entity Beans
  3. JBAS-6894

PerTxEntityInstanceCache->removeTimerServiceIfAllCancelledOrExpired needs privileged blocks

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Major Major
    • JBossAS-5.1.0.GA
    • None
    • EJB2
    • None
    • Medium

      Basically, we have a couple of failures in the AS testsuite when running some tests under the Java security manager.

      The exception looks as follows:
      Caused by: java.security.AccessControlException: access denied (javax.management.MBeanPermission org.jboss.ejb.txtimer.EJBTimerServiceImpl#getTimerService[jboss.ejb:service=EJBTimerService] invoke)
      at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
      at java.security.AccessController.checkPermission(AccessController.java:427)
      at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
      at org.jboss.mx.server.MBeanServerImpl.checkMBeanPermission(MBeanServerImpl.java:1735)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:663)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy432.getTimerService(Unknown Source)
      at org.jboss.ejb.plugins.PerTxEntityInstanceCache.removeTimerServiceIfAllCancelledOrExpired(PerTxEntityInstanceCache.java:228)
      at org.jboss.ejb.plugins.PerTxEntityInstanceCache.remove(PerTxEntityInstanceCache.java:121)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:150)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:76)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:45)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:56)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:125)

      Please add privileged blocks around the lines:
      TimerService timerService = service.getTimerService(containerId, id);
      and
      service.removeTimerService(containerId, id);

      Assign it back to me, if you need help.

            anil.saldhana Anil Saldanha (Inactive)
            anil.saldhana Anil Saldanha (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: