Version 3

    How do I remove the EJB 2.1 timer functionality

     

    Instructions

     

    1. Remove the the entry in the EJBDeployer.xml file that creates the timer.

     

    Only remove the following mbean blocks in the deploy/EJBDeployer.xml

    Do not remove anything else or else ejb 2.1 deployment will be affected.

     

    <!-- ==================================================================== -->
      <!-- J2EE Timer Service                                                   -->
      <!-- ==================================================================== -->
    
      <!-- An EJB Timer Service that is Tx aware -->
      <mbean code="org.jboss.ejb.txtimer.EJBTimerServiceImpl"
        name="jboss.ejb:service=EJBTimerService">
        <attribute name="RetryPolicy">jboss.ejb:service=EJBTimerService,retryPolicy=fixedDelay</attribute>
        <attribute name="PersistencePolicy">jboss.ejb:service=EJBTimerService,persistencePolicy=database</attribute>
        <attribute name="TimerIdGeneratorClassName">org.jboss.ejb.txtimer.BigIntegerTimerIdGenerator</attribute>
        <attribute name="TimedObjectInvokerClassName">org.jboss.ejb.txtimer.TimedObjectInvokerImpl</attribute>
        <depends optional-attribute-name="TransactionManagerFactory" proxy-type="org.jboss.tm.TransactionManagerFactory">
          jboss:service=TransactionManager
        </depends>
      </mbean>
    
      <!-- A retry policy that uses a fixed interval in milli seconds -->
      <mbean code="org.jboss.ejb.txtimer.FixedDelayRetryPolicy" name="jboss.ejb:service=EJBTimerService,retryPolicy=fixedDelay">
        <attribute name="Delay">100</attribute>
      </mbean>
    
      <!-- A persistence policy that does not persist the timers
      <mbean code="org.jboss.ejb.txtimer.NoopPersistencePolicy" name="jboss.ejb:service=EJBTimerService,persistencePolicy=noop"></mbean>
      -->
    
      <!--
        A persistence policy that persists timers to a database.
        
        The 2 supported db persistence plugins are:
          org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin
          org.jboss.ejb.txtimer.OracleDatabasePersistencePlugin
          
        The table name defaults to "TIMERS". It can be overriden using the
        'TimersTable' attribute if the persistence plugin supports it.
        When overriding the timers table, an optional schema can be specified
        using the syntax [schema.]table
      -->
      <mbean code="org.jboss.ejb.txtimer.DatabasePersistencePolicy" name="jboss.ejb:service=EJBTimerService,persistencePolicy=database">
        <!-- DataSourceBinding ObjectName -->
        <depends optional-attribute-name="DataSource">jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
        <!-- The plugin that handles database persistence -->
        <attribute name="DatabasePersistencePlugin">org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin</attribute>
        <!-- The timers table name -->
        <attribute name="TimersTable">TIMERS</attribute>
      </mbean>
    

     

     

    Finished

     

    Consequences: You will not be able to use timer beans anymore in EJB 2.1